# Error running DWIConvert (cli)

**URL:** https://discourse.slicer.org/t/error-running-dwiconvert-cli/4101
**Category:** Support
**Tags:** dwiconvert
**Created:** [September 13, 2018, 4:42pm UTC](https://discourse.slicer.org/t/error-running-dwiconvert-cli/4101 "2018-09-13T16:42:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![devg](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@devg](https://discourse.slicer.org/u/devg)
#### Post date: [September 13, 2018, 4:42pm UTC](https://discourse.slicer.org/t/error-running-dwiconvert-cli/4101/1 "2018-09-13T16:42:02Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)
#### Post date: [September 13, 2018, 4:46pm UTC](https://discourse.slicer.org/t/error-running-dwiconvert-cli/4101/2 "2018-09-13T16:46:34Z")

</div>

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.
