[Insight-users] Composite Filters and GenerateInputRequestedRegion()
Julien Michel
julien.michel at cnes.fr
Fri Sep 10 11:50:12 EDT 2010
Dear ITK users and developpers,
There is something puzzling in the way composite filter implementation
is described in the ITK Software Guide (section "How to write a
composite filter").
Let assume that I wish to write a composite filter. The pipeline I want
to wrap in this composite filter produces an output image with different
size, origin and spacing than the input image. This pipeline also
supports streaming with a non-trivial input requested region generation.
If I follow what is described in the Software Guide, the output of the
internal minipipeline (which is the real one) will substitute to the
output of the composite filter once the Graft*() methods are called,
which means at the end of the GenerateData() method. Unfortunately, at
this stage we already missed the
GenerateOutputInformation()/GenerateInputRequestedRegion() negociation,
which means that the internal minipipeline filters are not used to
compute what the real output information and intput requested region are
(like in a standard pipeline execution), but instead the default
implementation of these methods are called.
One workaround is to rewrite these methods by either duplicating output
information and input requested region generation from the internal
minipipeline or try to call the appropriate minipipeline methods to get
things right.
A composite filter should exactly behave like the pipeline it embeds not
only for the GenerateData() part, but also during the former stages of
pipeline execution. Did I miss something (for quite a long time) ? Is
there any way to get the composite filter to behave properly is such cases ?
Thanks a lot for your answer,
Best regards,
Julien Michel
--
Julien MICHEL
More information about the Insight-users
mailing list