Problems with US dicom files

Hi, Thanks for making OHIF v3 :confetti_ball:

I鈥檓 trying to use Ultra Sound Files for OHIF.

I found some bugs and fixed them temporarily.

I finally get cine, But the measurement doesn鈥檛 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鈥檛 know if it鈥檚 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 鈥榗onsole.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鈥檝e the next questions :disappointed_relieved::fearful:

  1. As a result, I finally get frames, But the measurement doesn鈥檛 work :sweat:
    Please help me to render US file, cine, and measure:pray:
  1. I can鈥檛 open the dicom folder.
    Selecting multiple images renders the same image and doesn鈥檛 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. 鈥淓rror 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鈥檓 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