[Insight-users] Generating 4D ImageSource
Luis Ibanez
luis.ibanez at kitware.com
Wed May 7 13:50:43 EDT 2008
Hi Mathieu,
You are right, the ImageSource::SplitRequestedRegion() API
doesn't have an option for allowing you to select the axis
across which to split the dataset.
I'm a bit confused as to why do you need to customize this
at all...
I would have expected that you would simply use Linear
image iterators in order to populate the pixels of your
4D image. This iterator will be a 4D one, and you would
be able to walk across the 4th dimension (time in this
case) with the inner loop of the iterator.
Another option that you may want to consider is to represent
your image as a 3D image with N components per pixel, where
the N components correspond to the N instances of time in
your signal(t).
The choice of one representation over the other would mostly
depend on what kind of algorithms you anticipate that you
will be running in this data.
Regards,
Luis
-------------------------
Mathieu Malaterre wrote:
> Hi there,
>
> I am working on a very simple task: generate a 4D dataset in ITK. I
> have a function f(x,y,z) which return a discretized signal(t)
> function. So I want to loop over (x,y,z) and set all value on the last
> dimension (t).
> However default implementation of ImageSource::SplitRequestedRegion
> is splitting extents on the last dimension.
>
> From the documentation, I do not understand how I can specify which
> axis is to be split for the threaded execution.
>
> Thanks,
More information about the Insight-users
mailing list