[ITK] Reading 4D Nifti into a 3D Vector Image

Matt McCormick matt.mccormick at kitware.com
Mon Jan 12 12:24:02 EST 2015


Hi Tobias,

For this case, it may be better to read in the image as an

  itk::Image< itk::Vector< float, NumberOfComponents >, 3 >

or

  itk::VectorImage< float, 3 >

HTH,
Matt

On Mon, Jan 12, 2015 at 11:33 AM, Wood, Tobias <tobias.wood at kcl.ac.uk> wrote:
> Hello,
>
> I am new to ITK and am working with datasets that are stored as 4D niftis of
> variable length in the 4th dimension. The algorithm I need to write takes
> the "vector" stored in the 4th dimension as input at each voxel, and
> produces some scalar values as output. I would like to write a filter to
> contain this algorithm, but I am struggling to work out how to specify the
> input and iterate efficiently over it.
>
>
> My output image type is itk::Image<float, 3>. I assume that my input image
> type should be itk::Image<float, 4>. Inside the filter, I was planning on
> using ImageRegionIterator with GetLargestPossibleRegion() to iterate over
> the output voxels.
>
>
> Is there a suitable iterator and region to obtain the vector of values for
> each input voxel efficiently? Or, alternatively, is there another approach
> that I should be taking? Perhaps using another filter to convert the input
> data first?
>
>
> Thanks in advance and I hope my question is clear,
>
> Tobias Wood
>
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>


More information about the Community mailing list