Hi Luis,<br><br>I have not had much time for this problem recently, so I have to face it now again.<br><br>Of course I tried<br><div style="margin-left: 40px;">filter->UpdateLargestPossibleRegion();<br></div>before and it produced the same error ("Requested region is (at least partially) outside the largest possible region.") as<br>
<div style="margin-left: 40px;">filter->Update();<br></div>, therefore I though maybe it should be called elsewhere.<br><br><div class="gmail_quote">On Thu, Mar 18, 2010 at 6:32 PM, Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Zoltan,<br>
<br>
<br>
You should go to the test from which you are<br>
currently calling<br>
<br>
filter->Update();<br>
<br>
and replace that call with:<br>
<br>
filter->UpdateLargestPossibleRegion();<br>
<br>
<br>
<br>
Regards,<br>
<br>
<br>
Luis<br>
<br>
<br>
---------------------------------------------------------------------<br>
<div><div></div><div class="h5">On Sun, Mar 7, 2010 at 3:04 PM, Zoltan Seress <<a href="mailto:seress.zoltan@gmail.com">seress.zoltan@gmail.com</a>> wrote:<br>
><br>
> Hi Luis,<br>
> It seems that "C" is the case, but my pipeline runs only once. Here is a<br>
> skeleton of my code, the relevant parts are shown.<br>
> Test.cxx:<br>
> // the readers are properly set, the images are valid<br>
> typedef itk::SkeletonFilter<InputImageType> FilterType;<br>
> FilterType::Pointer filter = FilterType::New();<br>
> filter->SetImage1( imageReader1->GetOutput() );<br>
> filter->SetImage2( imageReader2->GetOutput() );<br>
> filter->SetImage3( imageReader3->GetOutput() );<br>
> filter->Update();<br>
> SkeletonFilter.h:<br>
> // SkeletonFilter is derived from ImageToImageFilter.<br>
> public:<br>
> /** Input image type. */<br>
> typedef typename Superclass::InputImageType InputImageType;<br>
> typedef typename Superclass::InputImagePointer InputImagePointer;<br>
> typedef typename Superclass::InputImageConstPointer<br>
> InputImageConstPointer;<br>
> /** Set the first image. */<br>
> void SetImage1( const InputImageType * fImage )<br>
> { this->SetInput( 0, fImage ); }<br>
> /** Set the second image. */<br>
> void SetImage2( const InputImageType * sImage )<br>
> { this->SetInput( 1, sImage ); }<br>
> /** Set the third image. */<br>
> void SetImage3( const InputImageType * tImage )<br>
> { this->SetInput( 2, tImage ); }<br>
> protected:<br>
> SkeletonFilter();<br>
> virtual ~SkeletonFilter() {};<br>
> /** This method starts the process. */<br>
> void GenerateData();<br>
> };<br>
><br>
> SkeletonFilter.txx:<br>
> // constructor<br>
> template<class TImageType><br>
> SkeletonFilter<TImageType><br>
> ::SkeletonFilter()<br>
> {<br>
> this->SetNumberOfRequiredInputs(3);<br>
> }<br>
> template<class TImageType><br>
> void<br>
> SkeletonFilter<TImageType><br>
> ::GenerateData()<br>
> {<br>
> InputImageConstPointer image1 = this->GetInput(0);<br>
> InputImageConstPointer image2 = this->GetInput(1);<br>
> InputImageConstPointer image3 = this->GetInput(2);<br>
> if( !image1 )<br>
> {<br>
> itkExceptionMacro( << "image1 was not set" );<br>
> }<br>
> if( !image2 )<br>
> {<br>
> itkExceptionMacro( << "image2 was not set" );<br>
> }<br>
> if( !image3 )<br>
> {<br>
> itkExceptionMacro( << "image3 was not set" );<br>
> }<br>
> }<br>
><br>
><br>
> So, where should I apply UpdateLargestPossibleRegion() or another solution<br>
> is required in this case?<br>
> Cheers,<br>
> --<br>
> Zoli<br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Zoli<br>