[Insight-users] registration and warping composite filter

Zoltan Seress seress.zoltan at gmail.com
Sun Mar 7 14:04:05 EST 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100307/73902d32/attachment.htm>


More information about the Insight-users mailing list