[Insight-users] registration and warping composite filter

Zoltan Seress seress.zoltan at gmail.com
Thu Apr 8 06:54:44 EDT 2010


Hi Luis,

I have not had much time for this problem recently, so I have to face it now
again.

Of course I tried
filter->UpdateLargestPossibleRegion();
before and it produced the same error ("Requested region is (at least
partially) outside the largest possible region.") as
filter->Update();
, therefore I though maybe it should be called elsewhere.

On Thu, Mar 18, 2010 at 6:32 PM, Luis Ibanez <luis.ibanez at kitware.com>wrote:

> Hi Zoltan,
>
>
> You should go to the test from which you are
> currently calling
>
>                        filter->Update();
>
> and replace that call with:
>
>        filter->UpdateLargestPossibleRegion();
>
>
>
> Regards,
>
>
>         Luis
>
>
> ---------------------------------------------------------------------
> On Sun, Mar 7, 2010 at 3:04 PM, Zoltan Seress <seress.zoltan at gmail.com>
> wrote:
> >
> > Hi Luis,
> > It seems that "C" is the case, but my pipeline runs only once. Here is a
> > skeleton of my code, the relevant parts are shown.
> > Test.cxx:
> >   // the readers are properly set, the images are valid
> >   typedef itk::SkeletonFilter<InputImageType> FilterType;
> >   FilterType::Pointer filter = FilterType::New();
> >     filter->SetImage1( imageReader1->GetOutput() );
> >     filter->SetImage2( imageReader2->GetOutput() );
> >     filter->SetImage3( imageReader3->GetOutput() );
> >     filter->Update();
> > SkeletonFilter.h:
> >   // SkeletonFilter is derived from ImageToImageFilter.
> > public:
> >   /** Input image type. */
> >   typedef typename Superclass::InputImageType     InputImageType;
> >   typedef typename Superclass::InputImagePointer    InputImagePointer;
> >   typedef typename Superclass::InputImageConstPointer
> >  InputImageConstPointer;
> >   /** Set the first image. */
> >   void SetImage1( const InputImageType * fImage )
> >   { this->SetInput( 0, fImage ); }
> >   /** Set the second image. */
> >   void SetImage2( const InputImageType * sImage )
> >   { this->SetInput( 1, sImage ); }
> >   /** Set the third image. */
> >   void SetImage3( const InputImageType * tImage )
> >   { this->SetInput( 2, tImage ); }
> > protected:
> >   SkeletonFilter();
> >   virtual ~SkeletonFilter() {};
> >   /** This method starts the process. */
> >   void GenerateData();
> > };
> >
> > SkeletonFilter.txx:
> > // constructor
> > template<class TImageType>
> > SkeletonFilter<TImageType>
> > ::SkeletonFilter()
> > {
> >   this->SetNumberOfRequiredInputs(3);
> > }
> > template<class TImageType>
> > void
> > SkeletonFilter<TImageType>
> > ::GenerateData()
> > {
> >   InputImageConstPointer image1 = this->GetInput(0);
> >   InputImageConstPointer image2 = this->GetInput(1);
> >   InputImageConstPointer image3 = this->GetInput(2);
> >   if( !image1 )
> >     {
> >     itkExceptionMacro( << "image1 was not set" );
> >     }
> >   if( !image2 )
> >     {
> >     itkExceptionMacro( << "image2 was not set" );
> >     }
> >   if( !image3 )
> >     {
> >     itkExceptionMacro( << "image3 was not set" );
> >     }
> > }
> >
> >
> > So, where should I apply UpdateLargestPossibleRegion() or another
> solution
> > is required in this case?
> > Cheers,
> > --
> > Zoli
> >
>



-- 
Zoli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100408/b06e8780/attachment.htm>


More information about the Insight-users mailing list