[Insight-developers] An idea for new filter to get around
TileImageFilter memory requirements
Kent Williams
kent at psychiatry.uiowa.edu
Thu Feb 16 15:08:03 EST 2006
I recently replaced some inline pixel copying code in our 4D
OrientImageFilter with the TileImageFilter. The great strength of this
approach is that the resulting code is very clear and concise. Basically
the filter works this way:
Assume a 4D image as input, which represents a series of volumes.
for each i < # of volumes
current imageVolume = ( ExtractImageFilter(input) | OrientImageFilter )
tileImageFilter->SetNthInput(i, current imageVolume)
end
tileImageFilter->Update();
reoriented 4D image = tileImageFilter->GetOutput();
This means the total memory budget for the 4D Orient filter is twice the
size of the input image, i.e. the size of the output image, plus the
size of all the volumes that comprise the input image. If there was a
filter to insert an image of dimension D into an image of dimension D+1
at an offset, then the filter would only use the memory needed to
contain the output image.
I even know how to write such a filter -- derive from
InPlaceImageFilter, make the input Image the first input and the volume
to insert the second input. I guess my questions are these: Is there
enough use for this filter to justify adding it to ITK? And what would
be a good name for it?
More information about the Insight-developers
mailing list