Hi Luis,<div><br></div><div>Some days ago I decided to rewrite my filter derived from itk::ImageToImageFilter as you adviced. It seems to work as expected if the filter inputs are "full" images, which means:</div>
<div>- the readers read the images from the disk</div><div>- filter->SetFixedImage( reader1->GetOutput() ); and filter->SetMovingImage( reader2->GetOutput() ); </div><div><br></div><div>But when I try to extract some regions with itk::RegionOfInterestImageFilter and pass them as inputs for the filter, it throws an exception and gives the following error message:</div>
<div>"Requested region is (at least partially) outside the largest possible region."</div><div>The constructor and the setter methods are executed, but 'GenerateData()' does not start at all. The regions I extract are valid regions, they were checked.</div>
<div><br></div><div>In filter.h my setter methods are all like this:</div><div><br></div><div>void SetFixedImage( const FixedImageType * fImage )</div><div> { this->ProcessObject::SetNthInput( number, const_cast< FixedImageType * >( fImage ) ); </div>
<div><br></div><div>,where FixedImageType is:</div><div>typedef typename Superclass::InputImageType FixedImageType;</div><div><br></div><div>Is there an obvious thing I miss?<br clear="all"><br>-- <br>Zoli<br>
</div>