Problems with US dicom files

Hi, Thanks for making OHIF v3 :confetti_ball:

I’m trying to use Ultra Sound Files for OHIF.

I found some bugs and fixed them temporarily.

I finally get cine, But the measurement doesn’t work :sweat:

Please test it using my US file

https://drive.google.com/file/d/1RNskWrzaPn24SpyBt-CNvENmJsPvyMZQ/view?usp=sharing


First, there is a problem that the US file cannot be rendered.

I added the code by referring to github issues.
[Problem viewer displaying US modality · Issue #2426 · OHIF/Viewers · GitHub]
I don’t know if it’s the correct code, but US file rendering was possible.

[ platform/core/src/classes/MetadataProvider.js ]

case WADO_IMAGE_LOADER_TAGS.IMAGE_PIXEL_MODULE:

if(instance.Row !== 512 && instance.Columns !== 512){
return;
}

Second, cine was possible in v2 version, but cine was not available in v3 version, so I compared the two versions using ‘console.log’.

[ extensions/default/src/DicomLocalDataSource/index.js ]

getImageIdsForDisplaySet(displaySet) {
      const images = displaySet.images
      const imageIds = []

      if (!images) {
        return imageIds
      }

      displaySet.images.forEach((instance) => {
        const NumberOfFrames = instance.NumberOfFrames

        if (NumberOfFrames > 1) {
          for (let i = 0; i < NumberOfFrames; i++) {
            const imageId = this.getImageIdsForInstance({
              instance,
              frame: i,
            })
            console.log('imageIds???', imageIds); ✨
            imageIds.push(imageId)
          }
        } else {
          const imageId = this.getImageIdsForInstance({ instance })
          imageIds.push(imageId)
        }
      })

      return imageIds
    },

It can be confirmed that there is no information about the frame.

I changed the code to get information about the frame.

getImageIdsForDisplaySet(displaySet) {
      const images = displaySet.images
      const imageIds = []

      if (!images) {
        return imageIds
      }

      displaySet.images.forEach((instance) => {
        const NumberOfFrames = instance.NumberOfFrames

        if (NumberOfFrames > 1) {
          for (let i = 0; i < NumberOfFrames; i++) {
            const imageId = this.getImageIdsForInstance({
              instance,
              frame: i,
            })
            console.log('imageIds???', imageIds); ✨
            // imageIds.push(imageId) ✨
            imageIds.push(`dicomfile:0?frame=${i}`); ✨
          }
        } else {
          const imageId = this.getImageIdsForInstance({ instance })
          imageIds.push(imageId)
        }
      })


I’ve the next questions :disappointed_relieved::fearful:

  1. As a result, I finally get frames, But the measurement doesn’t work :sweat:
    Please help me to render US file, cine, and measure:pray:
  1. I can’t open the dicom folder.
    Selecting multiple images renders the same image and doesn’t work.
  1. Please help me to properly render the dicom file I got from orthac.
    This is a problem that also occurred in v2. This is the screen when the US image is loaded with orthac. “Error Loading Image An error has occurred”
  1. The branch of v3-stable is higher than version 3.7.8, so I can use The JSON format? I’m also confused by this explanation. What version is the branch of v3-stable now?
  1. US image has no information about PixelSpacing, how do I write JSON format? please let me know example json file for US image.

Hi – Do you know of a good freelancer that can assist us with our OHIF viewer?

kb

Can you check the last fix that was pushed to v3-stable to see if it has resolved your issue?
I suspect your metadata is not correctly organized (see the sample JSON file)

latest v3-stable includes fix for cine loops in ultrasound, but
no “previous | next instance” toolbar buttons and no autoplay of cineloops