[Insight-users] Help with "Requested region is outside largest
possible region"
Stephen R. Aylward
aylward at unc . edu
Tue, 10 Jun 2003 12:16:21 -0400
Hi,
I think Julien fixed this in the CVS version. Are you using a checkout
from within the past week?
Stephen
Parag Chandra wrote:
> Hi,
>
>
>
> I am getting the error above every time I try to reuse a filter with an
> image that is smaller than the image I previously processed with that
> filter. For example,
>
>
>
> typedef itk::Image<double, 2> ImageType;
>
> typedef itk::ImageFileReader<ImageType> ImageReaderType;
>
> typedef itk::ImageFileWriter<ImageType> ImageWriterType;
>
> typedef itk::NormalizeImageFilter<ImageType, ImageType> FilterType;
>
> ImageReaderType::Pointer reader = ImageReaderType::New();
>
> ImageWriterType::Pointer writer = ImageWriterType::New();
>
> FilterType::Pointer filter = FilterType::New();
>
>
>
> // Block 1
>
> reader->SetFileName("beam6.mha");
>
> filter->SetInput(reader->GetOutput());
>
> writer->SetInput(filter->GetOutput());
>
> writer->SetFileName("image1.mha");
>
> writer->Write();
>
>
>
> // Block 2
>
> reader->SetFileName("beam8.mha");
>
> writer->SetFileName("image2.mha");
>
> writer->Write();
>
>
>
> The first block executes with no problem. beam6.mha is 53x63 in size,
> while beam8.mha is 50x63. The second block triggers an exception in
> DataObject::PropagateRequestedRegion because
> ImageBase::VerifyRequestedRegion returns false. For some reason, the
> second time the filter is run it uses the same requested region as the
> first time it ran (53x63), but this time around, the image is only
> 50x63. Does anyone know what is going on? I am using ITK release 1.2, so
> if this has been fixed in CVS, please let me know what the workaround
> is. Thanks.
>
>
>
> Best regards,
>
> Parag Chandra
>
--
===========================================================
Dr. Stephen R. Aylward
Associate Professor of Radiology
Adjunct Associate Professor of Computer Science and Surgery
http://caddlab . rad . unc . edu
aylward at unc . edu
(919) 966-9695