Child pages
  • DICOM Loaded in wrong order / slice spacing incorrect

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem

The problem occurs with a number of the datasets, but we particularly noticed it with A radiomics model from joint FDG-PET and MRI texture features for the prediction of lung metastases in soft-tissue sarcomas of the extremities (Soft-tissue-Sarcoma) in the dicoms in

STS_004/1.3.6.1.4.1.14519.5.2.1.5168.1900.124239320067253523699285035604/1.3.6.1.4.1.14519.5.2.1.5168.1900.952127023780097934747932279670

Basically if you read the dicoms using SimpleITK.ReadImage or VTK the tool loads the files in the same order your list is in (usually alphabetical order). The mapping between the slices and the files are not in alphabetical order and are instead in a random order. This causes the Slice Spacing (a tag that is missing in these data) to be computed incorrectly since it is the difference in position between file 0 and 1. It also causes brain slices to turn up between two lung slices and other strange artifacts.

Solution

The files (or just their headers) need to be read in individually first and the Slice Location or GetOrigin() extracted. This information can then be taken in order to sort the files correctly.

...

With pydicom this can be done by sorting on the .SliceLocation field

http://www.vtk.org/doc/nightly/html/classvtkDICOMImageReader.html

 

 

 

 

 

 

Related articles

Content by Label
showLabelsfalse
max5
spacesTSKB
sortmodified
showSpacefalse
reversetrue
typepage
labelskb-troubleshooting-article

...