Is there any difference between nrrd converted by plastimatch and slicer? What algorithm is used by slicer to convert to nrrd

Hi ,
I am trying to extract radiomics from PET dicom. I converted the dicom to nrrd using two methods.

  1. using slicer i saved the image and mask to nrrd
  2. Using plastimatch i converted the dicom to nrrd.
    When i run pyradiomics on the nrrds from slicer it works fine. but if i run pyradiomics on the plastimatch converted nrrds then radiomics extraction is going forever and hung.
    Any idea if there is any difference between the plstimatch and slicer nrrds? Can you also describe how slicer converts to nrrd, what algorithm is used ?

Thanks and regards

Hmm. Not sure why that would be. Plastimatch nrrds are created using ITK and are always compressed. Maybe pyradiomics needs an uncompressed nrrd?

Anyway, if you open the nrrd files with a text editor, you can look at the ASCII header. This might help you to debug. Or if you post both headers here I can take a look.

1 Like

ITK’s DICOM reader only works for simple Cartesian images (all slices are parallel, slice spacing is uniform, gantry is not tilted, etc.) and you may need to move all DICOM files into a different folder that do not belong to the series that you want to read.

1 Like

@lassoan Yes, interesting idea. It might be related to import rather than export. Plastimatch does not use ITK for DICOM import.

Hi Greg,

Thanks for the reply. here are the headers of the nrrd files

1. slicer nrrd

NRRD0004
# Complete NRRD file format specification at:
# http://teem.sourceforge.net/nrrd/format.html
type: double
dimension: 3
space: left-posterior-superior
sizes: 128 128 90
space directions: (2,0,0) (0,2,0) (0,0,2)
kinds: domain domain domain
endian: little
encoding: gzip
space origin: (-127.585938,-57.585937999999999,-358.5)
  1. plastimatch nrrd
NRRD0004
# Complete NRRD file format specification at:
# http://teem.sourceforge.net/nrrd/format.html
type: float
dimension: 3
space: left-posterior-superior
sizes: 128 128 90
space directions: (2,0,0) (0,2,0) (0,0,2)
kinds: domain domain domain
endian: little
encoding: gzip
space origin: (-127.5859375,-57.5859375,-358.5)

which package does plastimatch use to import the dicoms ?

Plastimatch uses dcmtk.

The only difference appears to be the type, and a bit of rounding in the origin. Can you try converting to double type?

plastimatch convert --output-type double ...

1 Like