[Insight-users] Using WarpImageFilter where deformation field and image have different dimensions

Kris Thielemans kris.thielemans at csc.mrc.ac.uk
Tue Aug 8 07:56:33 EDT 2006


Hi

I'm trying to find a deformation from a set of images, and apply this
deformation on another set of images, which are from a different modality
and hence have difference pixel sizes, number of pixels etc.

This seems to almost work. However, the image written by WarpImageFilter has
the same number of pixels as the deformation field, and not of the input
image. Is there anyway to change this? (I think that offsets etc are ok.)

Code snippet:

  typedef itk::WarpImageFilter<
                          MovingImageType, 
                          MovingImageType,
                          DeformationFieldType  >     WarperType;
  WarperType::Pointer warper = WarperType::New();
  InterpolatorType::Pointer interpolator = InterpolatorType::New();

  warper->SetDeformationField( field);
  warper->SetInput( movingImage );
  warper->SetInterpolator( interpolator );
  warper->SetOutputSpacing( movingImage->GetSpacing() );
  warper->SetOutputOrigin( movingImage->GetOrigin() );

Many thanks

Kris Thielemans
Hammersmith Imanet, part of GE Healthcare
Cyclotron Building
Hammersmith Hospital
Du Cane Road
London W12 ONN, United Kingdom
web site address: http://www.hammersmithimanet.com/~kris
-------------------------------------------
NOTE: My inbox has a SPAM filter that automatically throws away suspect
messages. If you expect a reply and don't get one, your message might have
been wrongly classified.



More information about the Insight-users mailing list