Error running DWIConvert (cli)

Hi

I was trying to use DWIConvert to convert a dicom series to nifti (the series is from TCIA NSCLC_Radiogenomics collection, Patient R01-022, Series RECON 3: CT CHEST W/O). I get the error below when I run DWIConvert. Any help is appreciated.

Thanks

Dev

Slicer --launch DWIConvert --conversionMode DicomToFSL --inputDicomDirectory dicoms/ --outputDirectory out/ --outputVolume R01-022.nii
W: DcmItem: Length of element (493c,616d) is odd
E: DcmElement: Unknown Tag & Data (493c,616d) larger (1849779559) than remaining bytes in file
W: DcmItem: Dataset not in ascending tag order, at element (0000,0000)
W: DcmItem: Element (0000,0000) found twice in one data set or item, ignoring second entry
W: DcmItem: Element (0000,0000) found twice in one data set or item, ignoring second entry
W: DcmItem: Element (0000,0000) found twice in one data set or item, ignoring second entry
W: DcmItem: Length of element (0520,050a) is odd
E: DcmElement: Unknown Tag & Data (0520,050a) larger (88802609) than remaining bytes in file
W: DcmItem: Dataset not in ascending tag order, at element (0000,0000)
W: DcmItem: Element (0000,0000) found twice in one data set or item, ignoring second entry
W: DcmItem: Element (0000,0000) found twice in one data set or item, ignoring second entry
W: DcmItem: Element (0000,0000) found twice in one data set or item, ignoring second entry
W: DcmItem: Length of element (0520,050a) is odd
E: DcmElement: Unknown Tag & Data (0520,050a) larger (88802609) than remaining bytes in file
=================== this->m_SlicesPerVolume:235
Dicom images are ordered in a volume interleaving way.
ImageOrientationPatient (0020:0037): LPS Orientation Matrix
1 0 0
0 1 0
0 0 1

this->m_SpacingMatrix
0.859375 0 0
0 0.859375 0
0 0 1.25

NRRDSpaceDirection
0.859375 0 0
0 0.859375 0
0 0 1.25

Slice 0: -233.5 -263.6 539
Slice 1: -233.5 -263.6 538
Slice order is SI
Number of Slices: 235
Number of Volume: 1
Number of Slices in each volume: 235
WARNING: Missing B Value
Exception extracting gradient vectors
itk::ExceptionObject (0x2e44380)
Location: “unknown”
File: /home/kitware/Dashboards/Package/Slicer-462-package/ITKv4/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx
Line: 963
Description: itk::ERROR: Cant find tag 19 10bb

It looks like you are opening a CT file… The main focus of DWIConvert is DWI, so it isn’t really tested with CT data. If you need to convert DICOM to Nifti on the command line, I would suggest

  • writing a Python script to use Slicer’s loading logic
  • using dcm2niix.
1 Like