[ITK] [ITK-users] Problem writing RGB Nifti Image

Nicola Magnabosco nick.magnabosco at gmail.com
Tue May 13 09:25:33 EDT 2014


Hello Brad,

I don't get any error by compiling the code, but the output generated (in
the code below "vector.nii") is unreadable in some viewer or however
corrupted. When I try to read a single channel image with ItkSnap I get this
info:

**Single Channel Image**
Dimension: 91 x 101 x 91 ...
Byte Order: Little Endian
Data Type: float

**Here the RGB Image info (corrupted image):**
Dimension: 91 x 101 x 91
Byte Order: Little Endian
Data Type: unsigned char

So I think the error is right there, in "Data Type".
I can't figure it out why Data Type changes in the writing process.

The code below contained an error in the specification of
niftiIO->componentType(itk::ImageIOBase::UCHAR).
I changed it to niftiIO->componentType(itk::ImageIOBase::FLOAT), but the
error still remain.

Thanks
Nicola M



--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Problem-writing-RGB-Nifti-Image-tp7585572p7585582.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users



More information about the Community mailing list