[Insight-users] Rigid3DPerspectiveTransform

G. Delso gdelso at hotmail.com
Sun Apr 9 08:28:56 EDT 2006


Hi,

I'm trying to do some 3D -> 2D intensity-based registration using 
Rigid3DPerspectiveTransform, but can't get all the required classes to fit 
together.
(i.e. if the registration type is <2D,3D>, it won't accept a <2D,2D> metric, 
whereas a <2D, 3D> metric can't work with a <3D,2D> transform).

Is there any example on how to do this?

Thank you in advance!

Gaspar


-----Sample code----


typedef  unsigned short PixelType;
typedef itk::Image< PixelType, 2 >  ImageType2;
typedef itk::Image< PixelType, 3 >  ImageType3;
typedef itk::Rigid3DPerspectiveTransform< double > TransformType;
typedef itk::VersorRigid3DTransformOptimizer OptimizerType;
typedef itk::MeanSquaresImageToImageMetric< ImageType2, ImageType2 > 
MetricType;
typedef itk::LinearInterpolateImageFunction< ImageType3, double > 
InterpolatorType;
typedef itk::ImageRegistrationMethod< ImageType2, ImageType3 > 
RegistrationType;

MetricType::Pointer         metric        = MetricType::New();
TransformType::Pointer      transform     = TransformType::New();
OptimizerType::Pointer      optimizer     = OptimizerType::New();
InterpolatorType::Pointer   interpolator  = InterpolatorType::New();
RegistrationType::Pointer   registration  = RegistrationType::New();

registration->SetMetric( metric );
registration->SetOptimizer( optimizer );
registration->SetTransform( transform );
registration->SetInterpolator( interpolator );




More information about the Insight-users mailing list