<div dir="ltr">Thank Brad,<div><br></div><div>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.</div><div><br></div><div><br></div><div>Best,</div><div>Jonas</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 2, 2017 at 7:38 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







<div bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="m_3638055314112652902WordSection1">
<p class="MsoNormal">Hello,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Does using the that example filter cause the problem?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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?.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">HTH,<u></u><u></u></p>
<p class="MsoNormal">Brad<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Jonas Teuwen <<a href="mailto:jonasteuwen@gmail.com" target="_blank">jonasteuwen@gmail.com</a>><br>
<b>Date: </b>Wednesday, August 2, 2017 at 12:51 PM<br>
<b>To: </b>"<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>" <<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>><br>
<b>Subject: </b>[ITK-users] Problem with SliceBySliceImageFilter, only applied on the first slice<u></u><u></u></span></p>
</div><div><div class="h5">
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Hi all, <u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Using the SliceBySliceImageFilter as in the Insight Journal <a href="http://www.insight-journal.org/browse/publication/133" target="_blank">http://www.insight-<wbr>journal.org/browse/<wbr>publication/133</a> works.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">However, when I build a pipeline such as <a href="https://itk.org/Doxygen46/html/Filtering_2CompositeFilterExample_8cxx-example.html" target="_blank">https://itk.org/Doxygen46/<wbr>html/Filtering_<wbr>2CompositeFilterExample_8cxx-<wbr>example.html</a>
 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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">What would be the appropriate way to debug this?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Best,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Jonas<u></u><u></u></p>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br></div>