Is there any method to convert volume to DiffusionTensorvolume?

I am using dti to reconstruct Neurological plexus.
and I load the data from dicom, the type of “node” is volume ,it 's not what I need(DiffusionTensorVolume).
how could I convert this type ?Screenshot%20from%202018-04-10%2015-17-56

The dti folder was loaded when I chose examine, but there was no option for diffusion tensor volume, and the slicer gave me a warning.Screenshot%20from%202018-04-10%2015-27-41
warning:
Multi-frame image. If slice orientation or spacing is non-uniform then the image may be displayed incorrectly. Use with caution. Reference image in series does not contain geometry information. Please use caution.

how can I load this dti files or convert it to diffusiontensorvolume nodes?

Hi @ElonKou, please try loading directly using the DWIConvert, which will create a diffusion weighted volume node (then use the “tensor estimation” module to calculate a DTI node).

Module page: https://www.slicer.org/wiki/Documentation/Nightly/Modules/DWIConverter
Tutorial: http://slicerdmri.github.io/docs/tutorials/DWIConverterTutorial.pdf

Operating system : ubuntu 16.04
Slicer version:4.8.1
Expected behavior:Load DTI data from dicom files.
Actual behavior:

Hi,I am new to 3dSlicer , and I failed to load DTI files which from Hospital’s DVD(from Manufacturer SIEMENS).

the file structure is like this:

dicom
     |-----18032098/
             |------58020000
             |         |----dcm1
             |         |----dcm2
             |         |----dcm...
             |------58020001
             |         |----dcm1
             |         |----dcm2
             |         |----dcm...

I install slicerDMRI module and i want to load dti files to reconstruct Neural.

Screenshot%20from%202018-04-09%2018-31-29

I select the checkbox named “DICOMScalarVolumePlugin” + “MultiVolumeImportedPlugin” + “DicomRtimportPlugin”.

Screenshot%20from%202018-04-09%2018-30-02

when I Click the examine button to check all the files.It shows some warning: "Multi-frame image. If slice orientation or spacing is non-uniform then the image may be displayed incorrectly. Use with caution. Reference image in series does not contain geometry information. Please use caution. "

------------------------------------------------error---------------------------------
all info about error in python interactor:

 reg inside examine
Warning in DICOM plugin Scalar Volume when examining loadable 17: ep2d_diff_mddw_64_cor_TENSOR_TRACEW_MAP_BValue_700: Multi-frame image. If slice orientation or spacing is non-uniform then the image may be displayed incorrectly. Use with caution.  Reference image in series does not contain geometry information.  Please use caution.  
Warning in DICOM plugin Scalar Volume when examining loadable 16: ep2d_diff_mddw_64_cor_TENSOR_ADC_MAP: Multi-frame image. If slice orientation or spacing is non-uniform then the image may be displayed incorrectly. Use with caution.  Reference image in series does not contain geometry information.  Please use caution.  
Warning in DICOM plugin Scalar Volume when examining loadable 15: ep2d_diff_mddw_64_cor_TENSOR_FA_MAP: Multi-frame image. If slice orientation or spacing is non-uniform then the image may be displayed incorrectly. Use with caution.  Reference image in series does not contain geometry information.  Please use caution.  
Warning in DICOM plugin Scalar Volume when examining loadable 14: ep2d_diff_mddw_64_cor_TENSOR: Multi-frame image. If slice orientation or spacing is non-uniform then the image may be displayed incorrectly. Use with caution.  Reference image in series does not contain geometry information.  Please use caution.  
Warning in DICOM plugin Scalar Volume when examining loadable 9: ep2d_diff_mddw_64_cor: Multi-frame image. If slice orientation or spacing is non-uniform then the image may be displayed incorrectly. Use with caution.  Reference image in series does not contain geometry information.  Please use caution.  
Loading with imageIOName: GDCM
No geomtry information available for DICOM data, skipping corner calculations
Loading with imageIOName: GDCM
Window/level found in DICOM tags (center=636.0, width=1275.0) has been applied to volume 5: t1_vibe_cor_1.8mm
Irregular volume geometry detected, but maximum error is within tolerance (maximum error of 1.1314e-05 mm, tolerance threshold is 0.001 mm).
Loading with imageIOName: GDCM
No geomtry information available for DICOM data, skipping corner calculations
Loading with imageIOName: GDCM
Window/level found in DICOM tags (center=55.0, width=145.0) has been applied to volume 11: ep2d_diff_mddw_64_cor_TRACEW
Irregular volume geometry detected, but maximum error is within tolerance (maximum error of 3.94772e-05 mm, tolerance threshold is 0.001 mm).
Loading with imageIOName: GDCM
Could not read scalar volume using GDCM approach.  Error is: FileFormatError
Loading with imageIOName: DCMTK
Could not read scalar volume using DCMTK approach.  Error is: FileFormatError
DICOM plugin failed to load '9: ep2d_diff_mddw_64_cor' as a 'Scalar Volume'.
Traceback (most recent call last):
  File "/home/elonkou/MyProjects/Slicer-4.8.1-linux-amd64/lib/Slicer-4.8/qt-scripted-modules/DICOMLib/DICOMWidgets.py", line 856, in proceedWithReferencedLoadablesSelection
    loadSuccess = plugin.load(loadable)
  File "/home/elonkou/MyProjects/Slicer-4.8.1-linux-amd64/lib/Slicer-4.8/qt-scripted-modules/DICOMScalarVolumePlugin.py", line 547, in load
    addAcquisitionTransformIfNeeded=self.acquisitionGeometryRegularizationEnabled())
  File "/home/elonkou/MyProjects/Slicer-4.8.1-linux-amd64/lib/Slicer-4.8/qt-scripted-modules/DICOMScalarVolumePlugin.py", line 780, in createAcquisitionTransform
    self.originalCorners = self.sliceCornersFromIJKToRAS(volumeNode)
  File "/home/elonkou/MyProjects/Slicer-4.8.1-linux-amd64/lib/Slicer-4.8/qt-scripted-modules/DICOMScalarVolumePlugin.py", line 754, in sliceCornersFromIJKToRAS
    volumeNode.GetIJKToRASMatrix(ijkToRAS)
AttributeError: 'NoneType' object has no attribute 'GetIJKToRASMatrix'

Loading with imageIOName: GDCM
No geomtry information available for DICOM data, skipping corner calculations
Loading with imageIOName: GDCM
No geomtry information available for DICOM data, skipping corner calculations
Loading with imageIOName: GDCM
Window/level found in DICOM tags (center=127.0, width=328.0) has been applied to volume 6: t2_spc_stir_cor_p2_iso
Irregular volume geometry detected, but maximum error is within tolerance (maximum error of 0.000195456 mm, tolerance threshold is 0.001 mm).
Loading with imageIOName: GDCM
Window/level found in DICOM tags (center=632.0, width=1288.0) has been applied to volume 2: t2_tse_sag_384
Irregular volume geometry detected, but maximum error is within tolerance (maximum error of 3.84523e-05 mm, tolerance threshold is 0.001 mm).
Loading with imageIOName: GDCM
Window/level found in DICOM tags (center=315.0, width=814.0) has been applied to volume 8: t2_haste3d_fs_cor_iso_myelo_MIP_COR
Irregular volume geometry detected, but maximum error is within tolerance (maximum error of 7.35083e-06 mm, tolerance threshold is 0.001 mm).
Loading with imageIOName: GDCM
Window/level found in DICOM tags (center=819.0, width=1643.0) has been applied to volume 3: t2_tse_cor_384
Irregular volume geometry detected, but maximum error is within tolerance (maximum error of 2.52064e-05 mm, tolerance threshold is 0.001 mm).
Loading with imageIOName: GDCM
Could not read scalar volume using GDCM approach.  Error is: FileFormatError
Loading with imageIOName: DCMTK
Could not read scalar volume using DCMTK approach.  Error is: FileFormatError
Failed to read a multivolume: 'NoneType' object has no attribute 'GetIJKToRASMatrix'
Traceback (most recent call last):
  File "/home/elonkou/MyProjects/Slicer-4.8.1-linux-amd64/lib/Slicer-4.8/qt-scripted-modules/MultiVolumeImporterPlugin.py", line 606, in load
    frame = scalarVolumePlugin.load(svLoadables[0])
  File "/home/elonkou/MyProjects/Slicer-4.8.1-linux-amd64/lib/Slicer-4.8/qt-scripted-modules/DICOMScalarVolumePlugin.py", line 547, in load
    addAcquisitionTransformIfNeeded=self.acquisitionGeometryRegularizationEnabled())
  File "/home/elonkou/MyProjects/Slicer-4.8.1-linux-amd64/lib/Slicer-4.8/qt-scripted-modules/DICOMScalarVolumePlugin.py", line 780, in createAcquisitionTransform
    self.originalCorners = self.sliceCornersFromIJKToRAS(volumeNode)
  File "/home/elonkou/MyProjects/Slicer-4.8.1-linux-amd64/lib/Slicer-4.8/qt-scripted-modules/DICOMScalarVolumePlugin.py", line 754, in sliceCornersFromIJKToRAS
    volumeNode.GetIJKToRASMatrix(ijkToRAS)
AttributeError: 'NoneType' object has no attribute 'GetIJKToRASMatrix'
Loading with imageIOName: GDCM
Window/level found in DICOM tags (center=1528.0, width=3140.0) has been applied to volume 10: ep2d_diff_mddw_64_cor_ADC
Irregular volume geometry detected, but maximum error is within tolerance (maximum error of 3.94772e-05 mm, tolerance threshold is 0.001 mm).
Loading with imageIOName: GDCM
Window/level found in DICOM tags (center=111.0, width=300.0) has been applied to volume 7: t2_haste3d_fs_cor_iso_myelo
Irregular volume geometry detected, but maximum error is within tolerance (maximum error of 0.000243026 mm, tolerance threshold is 0.001 mm).
Loading with imageIOName: GDCM
Window/level found in DICOM tags (center=500.0, width=1000.0) has been applied to volume 12: ep2d_diff_mddw_64_cor_FA
Irregular volume geometry detected, but maximum error is within tolerance (maximum error of 3.94772e-05 mm, tolerance threshold is 0.001 mm).
Loading with imageIOName: GDCM
Window/level found in DICOM tags (center=636.0, width=1340.0) has been applied to volume 4: t2_tse_tra
Irregular volume geometry detected, but maximum error is within tolerance (maximum error of 8.01715e-05 mm, tolerance threshold is 0.001 mm).

Could not load: 9: ep2d_diff_mddw_64_cor as a Scalar Volume
Could not load: ep2d_diff_mddw_64_cor_ColFA - as a 26 frames MultiVolume by ImagePositionPatient+AcquisitionTime as a MultiVolume

it seems that the data is multi-frame image, so I check ed the file and found some DICOM file is a 3d-data (128 × 128 × 26),what should i do to load these data?

and , I need the file of type nrrd, and I also failed to convert it to nrrd in DWIconveter moudule, it tells me

===================================================
Diffusion-weighted DICOM Import (DWIConvert) standard error:

Exception thrown while reading DICOM volume

itk::ExceptionObject (0x10e3c4c0)
Location: "unknown" 
File: /home/kitware/Dashboards/Package/Slicer-481-package/ITKv4/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx
Line: 370
Description: itk::ERROR: ImageSeriesReader(0x10e27750): Size mismatch! The size of  /home/elonkou/Desktop/DTI/dicom/18032908/58020000/69462439 is [384, 384, 1] and does not match the required size [256, 256, 1] from file /home/elonkou/Desktop/DTI/dicom/18032908/58020000/69463693


Exception creating converter 
itk::ExceptionObject (0x10e3c4c0)
Location: "unknown" 
File: /home/kitware/Dashboards/Package/Slicer-481-package/ITKv4/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx
Line: 370
Description: itk::ERROR: ImageSeriesReader(0x10e27750): Size mismatch! The size of  /home/elonkou/Desktop/DTI/dicom/18032908/58020000/69462439 is [384, 384, 1] and does not match the required size [256, 256, 1] from file /home/elonkou/Desktop/DTI/dicom/18032908/58020000/69463693



Diffusion-weighted DICOM Import (DWIConvert) standard output:

======= DWI Convert Public Lib Ctest =========
===================================================

Screenshot%20from%202018-04-09%2018-35-23

so , what should i do ,anyone who can help me ?

(Hi @ElonKou, I combined both of your messages in one thread)

Based on the screenshot in this message, please try loading the following series only:

ep2d diff mddw 64 cor (series 9)

All of the other ones with a longer name (like ep2d diff mddw 64 cor TENSOR) are derived sequences calculated on the scanner, and are not supported by DWIConvert. You could load some of the caculated ones like ADC or FA as scalar volumes, but for DTI analysis please start with the sequence identified above and use the calculation tools within Slicer.

Hope that helps.

Thanks for your reply, because I’m in China (bad network and opposite time zone), so it may not be timely.

I got a new set of data, the same type as the previous data. The data I got was in an entire folder, so I couldn’t tell which one was ep2d_diff_mrrw_20_cor. I used a python script to classify all files according to the series number of each dicom file, where series 4 is ep2d_diff_mrrw_20_cor, and then I used module DWIconvert to convert a series 4 folder to dwi, there is a problem here and the module shows that the size does not match.

Screenshot%20from%202018-04-11%2012-49-28
Screenshot%20from%202018-04-11%2012-59-15

the whole error info when use DWIconvert is:

Diffusion-weighted DICOM Import (DWIConvert) standard error:
Exception thrown while reading DICOM volume
itk::ExceptionObject (0x58703e0)
Location: “unknown”
File: /home/kitware/Dashboards/Package/Slicer-481-> package/ITKv4/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx
Line: 370
Description: itk::ERROR: ImageSeriesReader(0x56fe370): Size mismatch! The size of
/home/elonkou/Desktop/NEW_PATIENT/dicom4/54359274 is [128, 128, 27] and does not match the required size [128, 128, 1] from file /home/elonkou/Desktop/NEW_PATIENT/dicom4/54359274

Exception creating converter
itk::ExceptionObject (0x58703e0)
Location: “unknown”
File: /home/kitware/Dashboards/Package/Slicer-481-package/ITKv4/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx
Line: 370
Description: itk::ERROR: ImageSeriesReader(0x56fe370): Size mismatch! The size of /home/elonkou/Desktop/NEW_PATIENT/dicom4/54359274 is [128, 128, 27] and does not match the required size [128, 128, 1] from file /home/elonkou/Desktop/NEW_PATIENT/dicom4/54359274

Diffusion-weighted DICOM Import (DWIConvert) standard output:

======= DWI Convert Public Lib Ctest =========

I checked the unmatched files in python. All the files in the series 9 are 128 * 128 * 27. It seems that dwiconvert only supports 128 * 128 * 1 dicom files.

I think the most likely issue is still mis-sorting: DWIConvert requires that all files to be converted are from the same series (or at least identical acquisition parameters) and alone in one folder. You could try this script to do the sorting first:

That said, if the data is from a Prisma or newer scanner, then I’m not sure if DWIConvert fully supports it yet. Please let us know the following tag information: (0008,0070) (0008,1090) (0018,1020)

e.g.:

(0008,0070) LO [SIEMENS] # 8, 1 Manufacturer
(0008,1090) LO [Verio] # 6, 1 ManufacturerModelName
(0018,1020) LO [syngo MR B17] # 12, 1 SoftwareVersions

If you are using a Prisma or newer scanner version, then it would be very helpful if you are able to share phantom data – that’s the fastest way for me and @hjmjohnson to be able to fix problems and update supported versions.

The Tag of data is:

(0008,0070) Manufacturer [SEMENS]
(0008,1090) ManufacturerModelName [Skyra]
(0018,1020) SoftwareVersions [Syngo MR D13]

I used the dicomsort to classify the result and the program got an error. The error message was:

Source file: /home/elonkou/Desktop/NEW_PATIENT/dicom/18041007/32070000/54361386
Target file: /home/elonkou/Desktop/NEW_PATIENT_SORT/ServicePatient-MR00480109-SZ_hospital_l-spine-20171011/9_ep2d_diff_mddw_20_cor_TENSOR-1.dcm

Target file already exists - pattern is probably not unique
Aborting to avoid data loss.

In the 9th series, there were two files. There was an error. I modified the source code of dicomsort to skip the error, and finally got a folder. The classification in this folder is the same as my previous classification. (My classification is based on the dicom’s file seriesNumber or SeriesInstanceUID)

Since I have not yet been able to shield the patient’s information, I cannot send it out yet.

According to the categorized file information, it seems that the number of DWI source files is a little bit larger. Series 4 is a dicom file, and there are 83 in total. The size of each dicom file is 128 * 128 * 27

Hi @ElonKou, thanks for sharing the data with me. It looks like Skyra (or at least this acquisition/protocol) uses a multiframe representation (edit: for MOSAIC), with gradient and b-value stored in frame metadata (normal tags, but they are embedded per frame). It is different than the other Skyra data I have seen so far – which is only a few datasets.

I don’t think DWIConvert supports this type of data yet. dcm2nii seems to somewhat support it, but for your data at least dcm2nii does not create a bvec/bval pair (because apparently it requires a baseline – the data you shared seems to only have b=700 for all frames).

cc @hjmjohnson in case you have any experience/comments on Skyra support.

Actually, looking at this a bit more, I think this data is MOSAIC, but Siemens has changed how they store the data — now they use standard multi-frame DICOM, whereas on older scanner versions MOSAIC was stored in a Siemens-specific way (essentially tiled in the pixel data of a single frame).

Thank you for your reply. If there is any other way to read DWI data, please let me know. I’m also trying to read data directly from dicom and then converting it to NRRD so that I can skip the plug-in DWIconvert. If you have a way to merge the contents of a dicom file into an nrrd, please let me know, thanks very much!

I have started a patch to DWIConvert, but didn’t have a chance to finish it yet. Do you happen to know about any option on the scanner to write the DWI data as multiframe rather than MOSAIC? We don’t have any scanners running Syngo D13 here (I’ve been checking around to try to find some non-anonymous test data locally, but no one knows how to create such a dataset. Our scanners are on E11).

(as I mentioned, I tried another well-known converter called dcm2nii and it did not succeed either for your data)

I also tried the dcm2nii plugin and it did not succeed.
I am very embarrassed that I do not have some options for generating DWI on Siemens equipment. My data is copied from the hospital CD.
This data can be read out using MTIK, but there is an error, I can not confirm whether or not the MITK is read correctly, and the nrrd file exported by MITK cannot be opened in Slicer (Slicer does not report any error).
In addition, DWIconvet seems to have a function to decode the mosaic (https://github.com/BRAINSia/BRAINSTools/blob/master/DWIConvert/SiemensDWIConverter.cxx#L423)
Thank you very much for your help. If you have any other solution to this problem, please let me know.

Thank you very much for your help. I have already solved this problem.
I read all the pixel-data, gradients, bvalues from the dicom series and wrote them all to the dwi node. Then I get the dwi-node ,and can use it to continue my reconstruction of the DTI-neurons. Thank you again for your help.

1 Like