Skip to content

Dimension incompatibility of NRRD files with ITK-snap #76

@Sebastien-PILUSO

Description

@Sebastien-PILUSO

The output NRRD files from the DeepAtlas pipeline cannot be read by ITK-snap visualization software.
The problem seems to be linked to the header setting.

Here is the error encountered:
/data/hippogang/build/buildbot/Nightly/itk/v5.2.1/itk/Modules/IO/NRRD/src/itkNrrdImageIO.cxx:292: itk::ERROR: NrrdImageIO(0x561df21fdfb0): ReadImageInformation: Error reading /gpfs/bbp.cscs.ch/project/proj137/piluso/atlas-densities/data/ccfv2/marker_volumes/ALDH1L1.nrrd:
[nrrd] nrrdLoad: trouble reading "/gpfs/bbp.cscs.ch/project/proj137/piluso/atlas-densities/data/ccfv2/marker_volumes/ALDH1L1.nrrd"
[nrrd] nrrdRead: trouble
[nrrd] _nrrdRead: trouble reading NRRD file
[nrrd] _nrrdFormatNRRD_read: trouble parsing space directions info |(25,0,0) (0,25,0) (0,0,25)|
[nrrd] _nrrdReadNrrdParse_space_directions: trouble getting space vector 4 of 4
[nrrd] _nrrdSpaceVectorParse: hit end of string before seeing (

with the header being:
OrderedDict([('type', 'float'), ('dimension', 4), ('space dimension', 3), ('sizes', array([528, 320, 456, 3])), ('space directions', array([[25., 0., 0.], [ 0., 25., 0.], [ 0., 0., 25.]])), ('endian', 'little'), ('encoding', 'gzip'), ('space origin', array([0., 0., 0.]))])

When rewriting the raw data in modifying the header:
OrderedDict([('type', 'float'), ('dimension', 3), ('sizes', array([528, 320, 456])), ('endian', 'little'), ('encoding', 'gzip')])
ITK-snap is able to read the output NRRD file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions