[ITK-users] ITK Read a 4D Vectorimage from the Nifti File Format
Student77
chdorn at student.ethz.ch
Sat May 9 10:50:54 EDT 2015
Hello,
Well I am trying now for two days to read in a vector valued .nii file that
contains 3D Vectors := (Vx,Vy,Vz) at each point in a 4D space [X, Y, Z ,
Time]. The ImageReader only detects Vx and ignores the rest. To illustrate
what I am doing see the code as follows:
typedef float PixelType;
const unsigned int D=4;
/a.)typedef itk::Vector< PixelType, 3 > InputPixelType;
typedef Image<InputPixelType,4> ImageType;/
* OR*
/b.)typedef itk::VectorImage<PixelType, 4> ImageType;/
typedef ImageType::Pointer ImagePointerType;
typedef ImageType::ConstPointer ImageConstPointerType;
ImagePointerType Velocity4D =
ImageUtils<ImageType>::readImage("4DVelocity.nii");
The values Velocity4D->GetNumberOfComponentsPerPixel(); AND
Velocity4D->GetImageDimension(); are correct when I use option a.). However,
it will write then in each of the 3 vector components the same value which
is the value of Vx. In contrary, when I use option b.) the VectorImage will
automatically become only a scalarimage and again only contain the values of
Vx.
I have checked so many searches in google but nothing seemed to help me.
Thanks for any help!
Best regards.
--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-Read-a-4D-Vectorimage-from-the-Nifti-File-Format-tp7587328.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list