<div dir="ltr"><div><div><div><div><div>Hi community,<br><br></div>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></div>Now that I want to employ the content ("auto crop"ish), I realize GenerateOutputInformation() is called before upstream is updated...<br><br></div><div>so<br></div><div><br></div>is it 'legal' to call Update() on upstream inside GenerateOutputInformation(). <br>
<br></div>So like this:<br><br></div>::GenerateOutputInformation()<br>{ <br><div><div><div>InputImage * image = dynamic_cast<InputImage*>(ProcessObject::GetInput(0));<br>image->UpdateOutputInformation();<br>image->PropagateRequestedRegion();<br>
image->UpdateOutputData();<br>...<br>}<br><br></div><div>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>
</div><div><br></div><div>Best regards,<br></div><div>-V<br><br></div><div><br></div></div></div></div>