[Insight-users] ITK deformation fields
Luis Ibanez
luis.ibanez at kitware.com
Thu Jun 16 09:56:29 EDT 2005
Hi Vishal,
Please see the section on "Reading Writing Vector Images"
in the ITK Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
and also look at the section on the Deformable registraion.
It comes down to:
typedef itk::Vector< float, 3 > VectorPixelType;
typedef itk::Image< VectorPixelType, 3 > VectorImageType;
typedef itk::ImageFileReader< VectorImageType > ReaderType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName("deformationField.mhd");
reader->Update();
VectorImageType::ConstPointer field =
reader->GetOutput();
Regards,
Luis
=================================================================
Vishal Majithia wrote:
> I have an ITK question regarding deformation fields.
> My program wrote out a .mhd file and a .raw file. How
> do I read this deformation field into another file so
> that I can reapply it to another image? Thank you for
> your help.
>
> Sincerely,
> Vishal Majithia
>
>
More information about the Insight-users
mailing list