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

Wood, Tobias tobias.wood at kcl.ac.uk
Mon Jan 12 11:33:01 EST 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150112/daf2ec66/attachment.html>


More information about the Community mailing list