Discussion:
[ITK-users] Problem with SliceBySliceImageFilter, only applied on the first slice
Jonas Teuwen
2017-08-02 16:49:28 UTC
Permalink
Hi all,

Using the SliceBySliceImageFilter as in the Insight Journal
http://www.insight-journal.org/browse/publication/133 works.

However, when I build a pipeline such as
https://itk.org/Doxygen46/html/Filtering_2CompositeFilterExample_8cxx-example.html
and plug that in the above example, the output has the right size, but the
output is the filter applied to the first slice and copied to all the
others.

What would be the appropriate way to debug this?

Best,
Jonas
Lowekamp, Bradley (NIH/NLM/LHC) [C]
2017-08-02 17:38:06 UTC
Permalink
Hello,

Does using the that example filter cause the problem?

There are many subtle problems that a composite filter implementation can have. These include not properly grafting the input or output in the GenerateData method. Also issues with the incorrect modified times not being modified or being modified too often are common. The example illustrates having the mini-pipeline filter of the composite filter as member variables. This can make things more problematic when executing a filter multiple times. I prefer to create the individual filters in the GenerateData method, as it generally has been more reliable, and may side step some issues related to the modified times.

The ways to debug a complex pipeline include: interactively using a debug to set up break points, add a number of Event call backs to monitor the execution of different filters and using the PipelineMonitorImageFilter to record the steps in a pipeline execution.

Your first steps may be to determine if the composite filter is being executed for each slice, and if it is being executed then is the internal mini-pipeline being executed or do the modified time indicate it is up to date?.

HTH,
Brad


From: Jonas Teuwen <***@gmail.com>
Date: Wednesday, August 2, 2017 at 12:51 PM
To: "insight-***@itk.org" <insight-***@itk.org>
Subject: [ITK-users] Problem with SliceBySliceImageFilter, only applied on the first slice

Hi all,

Using the SliceBySliceImageFilter as in the Insight Journal http://www.insight-journal.org/browse/publication/133 works.

However, when I build a pipeline such as https://itk.org/Doxygen46/html/Filtering_2CompositeFilterExample_8cxx-example.html and plug that in the above example, the output has the right size, but the output is the filter applied to the first slice and copied to all the others.

What would be the appropriate way to debug this?

Best,
Jonas
Jonas Teuwen
2017-08-02 18:08:03 UTC
Permalink
Thank Brad,

Following your suggestion to move the creation of the invidual filters to
the GenerateData method, it works. I assume I will understand why once, I
get more experience with ITK.


Best,
Jonas


On Wed, Aug 2, 2017 at 7:38 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] <
Post by Lowekamp, Bradley (NIH/NLM/LHC) [C]
Hello,
Does using the that example filter cause the problem?
There are many subtle problems that a composite filter implementation can
have. These include not properly grafting the input or output in the
GenerateData method. Also issues with the incorrect modified times not
being modified or being modified too often are common. The example
illustrates having the mini-pipeline filter of the composite filter as
member variables. This can make things more problematic when executing a
filter multiple times. I prefer to create the individual filters in the
GenerateData method, as it generally has been more reliable, and may side
step some issues related to the modified times.
The ways to debug a complex pipeline include: interactively using a debug
to set up break points, add a number of Event call backs to monitor the
execution of different filters and using the PipelineMonitorImageFilter to
record the steps in a pipeline execution.
Your first steps may be to determine if the composite filter is being
executed for each slice, and if it is being executed then is the internal
mini-pipeline being executed or do the modified time indicate it is up to
date?.
HTH,
Brad
*Date: *Wednesday, August 2, 2017 at 12:51 PM
*Subject: *[ITK-users] Problem with SliceBySliceImageFilter, only applied
on the first slice
Hi all,
Using the SliceBySliceImageFilter as in the Insight Journal
http://www.insight-journal.org/browse/publication/133 works.
However, when I build a pipeline such as https://itk.org/Doxygen46/
html/Filtering_2CompositeFilterExample_8cxx-example.html and plug that in
the above example, the output has the right size, but the output is the
filter applied to the first slice and copied to all the others.
What would be the appropriate way to debug this?
Best,
Jonas
Loading...