[ITK] [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.
_____________________________________
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://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list