[Insight-users] Subclassing ImageToImageFilter

Soren Christensen sorench at gmail.com
Thu May 2 02:32:50 EDT 2013


Hi,
 I am trying to create a filter using ImageToImageFilter that I would like
to be multi-threaded.
However, I have some trouble figuring out how to get the dimensions right.

The input is 4D and I want to create an output that is also 4D, but the
fourth dimension of the output will always be of constant length in the
output, say L=4. (So Dim4 is a vector dim and regardless of the input
length the outputs 4th dimension will have length 4).
In ThreadedGenerateData(), I would like to just iterate spatial positions
(the first 3 dimensions) so for example partition the
outputRegionForThread partitioned
along the 3rd dimension (although along 1 or 2nd dim would work too).
So essentially I want to iterate over all spatial locations (dimensions
1-3), and for each spatial location grab the vector along the 4th
dimension. For each location, the result (vector of length 3) is written
into the 4D output.

It seems to me that once I define the output dimensions in
GenerateOutputInformation()
(4D), then ThreadedGenerateData() will partition THIS 4D region whereas I
am looking to iterate just the first 3 dimensions of the output.
How can I achieve this?
Should I be looking at using vector images for this?  Or multiple outputs?

Thanks
Soren


Btw:
Thanks to whoever put all the examples on Wiki  - they are fantastic.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130501/7ae2e7c1/attachment.htm>


More information about the Insight-users mailing list