<div dir="ltr"><div><div><div>Thanks a lot for your insight, Bradley :)<br><br></div>Being simple filter itself, I got it actually ready done and it seems to work correctly (for me) in an application that builds the whole (branching) ITK pipeline in run-time from a script file. I have to praise the ITK-architecture for this, but yet I surely keep in mind this being non-standard. Good thing the managing level is not a separate thread as in e.g. DirectShow...<br>
<br></div><div>I just need to safe memory in FFT, so I can always cut the filter from the final release :)<br></div><div><br></div>Best,<br><br></div>-V<br><div><div><div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-03-07 15:59 GMT+02:00 Bradley Lowekamp <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
Doing that is non-standard, unexpected and may break certain ways a normal pipeline can be used.<br>
<br>
Generally, when I need to do this I just do it at the pipeline managing level not, inside the pipeline. This gives me more flexibility on how to manage streaming and other execution properties of the pipeline.<br>
<br>
It's my view that this type of processing should be done at a level higher than the ITK-pipeline.<br>
<br>
But if it work for you....<br>
<br>
Hope that helps,<br>
Brad<br>
<div><div class="h5"><br>
On Mar 7, 2014, at 4:44 AM, Vaaksiainen <<a href="mailto:vaaksiainen@gmail.com">vaaksiainen@gmail.com</a>> wrote:<br>
<br>
> Hi community,<br>
><br>
> I've learned the way of writing image size changing ITK filters, but in the past always figured out the output size based on the input size and not its content.<br>
><br>
> Now that I want to employ the content ("auto crop"ish), I realize GenerateOutputInformation() is called before upstream is updated...<br>
><br>
> so<br>
><br>
> is it 'legal' to call Update() on upstream inside GenerateOutputInformation().<br>
><br>
> So like this:<br>
><br>
> ::GenerateOutputInformation()<br>
> {<br>
> InputImage * image = dynamic_cast<InputImage*>(ProcessObject::GetInput(0));<br>
> image->UpdateOutputInformation();<br>
> image->PropagateRequestedRegion();<br>
> image->UpdateOutputData();<br>
> ...<br>
> }<br>
><br>
> I've found AutoCropLabelMapFilter already, but I'd still like to hear comment.<br>
><br>
> The filter needs to connect finite number of downstream filters correctly.<br>
><br>
> Best regards,<br>
> -V<br>
><br>
><br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
</blockquote></div><br></div></div></div></div></div></div></div>