OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
3.13k stars 3.29k forks source link

Standalone S3 Viewer is only showing the first .dcm image with an S3 data source? #2261

Closed evan-morgan closed 3 years ago

evan-morgan commented 3 years ago

Hi guys,

Firstly thanks so much for contributing and maintaining this project, it's a great piece of software and I really appreciate the work you do! Secondly, I'm stuck and would appreciate any help you can give me 👍

I'm hosting the viewer itself from an S3 bucket and a data source of dicom files with JSON maps from another S3 bucket which, for the purposes of this is completely public(just as a test case, I'm aware of the security implications). The issue is that when I enter the URL https://example-ohif-viewer-location.com/viewer?url=dicom-map.json it loads all of the data except for, as far as I can tell, anything past the first slice.

What I know:

I suspect it might have something to do with my JSON maps so I'll provide a short snippet of one without any sensitive data, although I could be wrong:

{
   "studies":[
      {
         "StudyInstanceUID":"StudyID",
         "StudyDescription":"CT CHEST",
         "StudyDate":"10101010",
         "StudyTime":"100937.000",
         "PatientName":"NA",
         "PatientId":"NA",
         "series":[
            {
               "instances":[
                  {
                     "metadata":{
                        "Columns":512,
                        "Rows":512,
                        "InstanceNumber":8,
                        "AcquisitionNumber":3,
                        "PhotometricInterpretation":"MONOCHROME2",
                        "BitsAllocated":16,
                        "BitsStored":16,
                        "PixelRepresentation":1,
                        "SamplesPerPixel":1,
                        "PixelSpacing":[
                           0.708,
                           0.708
                        ],
                        "HighBit":15,
                        "ImageOrientationPatient":[
                           1,
                           0,
                           0,
                           0,
                           1,
                           0
                        ],
                        "ImagePositionPatient":[
                           -180.896,
                           -180.896,
                           1772.4
                        ],
                        "FrameOfReferenceUID":"FrameOfReferenceUID",
                        "ImageType":[
                           "ORIGINAL",
                           "PRIMARY",
                           "AXIAL"
                        ],
                        "Modality":"CT",
                        "SOPInstanceUID":"SOP",
                        "SeriesInstanceUID":"SeriesID",
                        "StudyInstanceUID":"StudyID"
                     },
                     "url":"dicomweb://aws-bucket.s3.amazonaws.com/folder/filename1.dcm"
                  },
                  {
                     "metadata":{
                        "Columns":512,
                        "Rows":512,
                        "InstanceNumber":301,
                        "AcquisitionNumber":3,
                        "PhotometricInterpretation":"MONOCHROME2",
                        "BitsAllocated":16,
                        "BitsStored":16,
                        "PixelRepresentation":1,
                        "SamplesPerPixel":1,
                        "PixelSpacing":[
                           0.708,
                           0.708
                        ],
                        "HighBit":15,
                        "ImageOrientationPatient":[
                           1,
                           0,
                           0,
                           0,
                           1,
                           0
                        ],
                        "ImagePositionPatient":[
                           -180.896,
                           -180.896,
                           1538
                        ],
                        "FrameOfReferenceUID":"FrameOfReferenceUID",
                        "ImageType":[
                           "ORIGINAL",
                           "PRIMARY",
                           "AXIAL"
                        ],
                        "Modality":"CT",
                        "SOPInstanceUID":"SOPInstanceUID",
                        "SeriesInstanceUID":"SeriesID",
                        "StudyInstanceUID":"StudyID"
                     },
                     "url":"dicomweb://aws-bucket.s3.amazonaws.com/folder/filename2.dcm"
                  },
                  {
                     "metadata":{
                        "Columns":512,
                        "Rows":512,
                        "InstanceNumber":275,
                        "AcquisitionNumber":3,
                        "PhotometricInterpretation":"MONOCHROME2",
                        "BitsAllocated":16,
                        "BitsStored":16,
                        "PixelRepresentation":1,
                        "SamplesPerPixel":1,
                        "PixelSpacing":[
                           0.708,
                           0.708
                        ],
                        "HighBit":15,
                        "ImageOrientationPatient":[
                           1,
                           0,
                           0,
                           0,
                           1,
                           0
                        ],
                        "ImagePositionPatient":[
                           -180.896,
                           -180.896,
                           1558.8
                        ],
                        "FrameOfReferenceUID":"1.2.392.200036.9116.2.6.1.3268.2060387192.1513905058.104502",
                        "ImageType":[
                           "ORIGINAL",
                           "PRIMARY",
                           "AXIAL"
                        ],
                        "Modality":"CT",
                        "SOPInstanceUID":"SOPID",
                        "SeriesInstanceUID":"SeriesID",
                        "StudyInstanceUID":"StudyID"
                     },
                     "url":"dicomweb://aws-bucket.s3.amazonaws.com/folder/filename3.dcm"
                  }
               ],
               "SeriesDate":"10101010",
               "SeriesDescription":"1.0 Lung Std. Volume   Vol.",
               "SeriesInstanceUID":"SeriesID",
               "SeriesNumber":"6",
               "SeriesTime":"101129.105",
               "Modality":"CT"
            }
         ]
      }
   ]
}

Any help is appreciated!

olivert1969 commented 3 years ago

Hi @Signo-Alaris You may want to consider using an Orthanc Docker container with a plug-in to your choice of cloud provider - details on Orthanc cloud plug-ins here: https://book.orthanc-server.com/plugins/object-storage.html. Interacting with Orthanc via its RESTful API or through dicomWEB is straightforward.

evan-morgan commented 3 years ago

Issue was on my side! The URL I was generating was always pointing at the same dicom file

raghav20 commented 1 year ago

@evan-morgan do you have a code for reference ?