MultiFrame DICOM: problem with DicomScalarVolumPlugin proglem

I am having a problem opening multiframe (volume) dicom.

the geometry is not loaded correctly (pixel spacing, slice thickness etc …).
it tries to open it using DICOMScalarVolumPlugin.py and line 640 approximately, in sliceCornersFromDICOM, it “wants” a list of uids.
but as it is a multiframe dicom, it has only one uid for the whole volume.

I don’t get why it is looking for more than one uid in case of multiframe dicom.

is there a way to load the geometry correctly ?

The SlicerDcm2nii extension should be able to convert enhanced multi-frame images.

1 Like

That’s a good point - currently the acquisition geometry correction only works for a series of single frames, not for multiframe dicom. Does your volume actually need geometry correction? Maybe turn it off (in dicom app preferences) and let us know - possibly this needs better error checking.

What do you mean by geometry correction ?

it doesn’t take into account the pixel spacing and slice thickness.
while my dicom segment storage, yes.
so I end up with the “raw image” and the segmentation in different “space”.

In the application settings you can enable or disable a geometry regularization - it adds a nonlinear transform to account for irregularly spaced slice (e.g. missing slices) or for things like gantry tilt. The transform allows you to work with the data as is, or harden the transform at whatever resolution you need. But as I mentioned it’s only implemented for single frame dicom. If it’s not enabled multiframe images are delegated to ITK’s reader (either GDCM or DCMTK depending on the settings).

We don’t see very many multiframe datasets, so this path doesn’t get tested much. Maybe you can describe how the data was acquired, and maybe even shared a deidentified sample (like a volunteer or a phantom).

image

@pieper if you want sample datasets, there are several enhanced Philips MRI datasets available from the dcm2niix wiki. You can find a Siemens enhanced XA10 dataset at the dcm_qa_stc repository. The advent of XA10 will effectively force Siemens MR users to enhanced DICOM: the unenhanced 2D images are huge and slow, while the mosaics remove many of the tags required for subsequent analyses (slice position and angulation in particular).

I have never seen an enhanced DICOM CT with gantry tilt. But this may simply because I mostly work in MR. If you do find one that you can share, I would like to take a look.

I am currently working on opthalmic OCT, and I “generate” myself the DICOM files from the raw data using DCMTK. but yes more and more CT and MRI come in MultiFrame DICOM now.

@pdeman are you using img2dcm? That tool only takes JPEG or BMP inputs. Be aware that JPEG images are limited to 8-bit precision per component (e.g. R,G,B) and are lossy. While BMP is lossless, I think it is also limited to 8-bit precision (e.g. 16, 24 and 32 bits per pixel are shared between components). If your plan is to get this data into Slicer, why not create NRRD files? This would have a simple text data that could describe your raw data with full precision.

no I am using dcmtk using c++, basically dcmdata, dcmfg, dcmiod and dcmseg dll.
my plan is to get this data into dicom format, put them on a pacs system, use “basic dicom viewer” from hospitals and slicer to view better the segmentation because basic dicom viewer are not optimal for the dicom segmentation storage

That sounds like a great approach. Given that dcmtk uses the BSD License, perhaps you might consider sharing your solution on Github. I think a lot of people would find this really useful. The dcmtk code is a great foundation to use - they have done an outstanding job.

As a general comment, enhanced DICOM is very new, and Siemens (XA10) and Philips have taken slightly different approaches. I think many tools still need to be upgraded to handle these files, and several tools have been tuned for these specific vendors. If you find situations where you have DICOM-compliant images that confuse dcm2niix, please consider generating an issue on the dcm2niix Github page. I am sure there will be teething problems for tools as we adapt to this new format.

the export for now is completely mixed with the rest of the software and haven’t done anything particular for now.
I do not have dicom that confuse dcm2niix I think. I will try. MRIConvert works fine with them but I will try dcm2niix.
I haven’t found how to install :https://www.slicer.org/wiki/Documentation/Nightly/Extensions/SlicerDcm2nii#Modules
I installed SlicerDMRI which seemed linked, but it didn’t change anything to load the dicom.

@pdeman were you able to resolve this and if so what was the solution? On Slicer 4.10.2 on MacOS I can install the dcm2niix module like this:

  1. View->Extension Manager, search and install “SlicerDcm2nii” extension
  2. Show “All Modules” and choose Dcm2niixGUI, select the “Input Directory” and select “Apply”