[Insight-users] small modification to ImageRegistration1 example question
Julien Jomier
jjomier at cs.unc.edu
Fri, 13 Feb 2004 16:50:58 -0500
Hi,
SetFixedImage() and SetMovingImage() are both expecting an itkImage as
argument.
You can create two itkImages from your image buffers. Take a look at the
Section 4.1.7 "Importing Image Data from a Buffer" in the itkSoftwareGuide.
(Examples/DataRepresentation/Image/Image5.cxx).
Then you can do something like
registration->SetFixedImage(fixedImage);
registration->SetMovingImage(movingImage);
where fixedImage and movingImage are itk::Image<unsigned int,dimension>
Hope this helps,
Julien
> -----Original Message-----
> From: insight-users-admin at itk.org
> [mailto:insight-users-admin at itk.org] On Behalf Of asdas sdfsafd
> Sent: Friday, February 13, 2004 12:32 PM
> To: insight-users at itk.org
> Subject: [Insight-users] small modification to
> ImageRegistration1 example question
>
>
> Hello All,
>
> I was using the MotionRegistration example project and it
> works fine. I
> wanted to modify the way it reads in the fixed and moving
> image files if
> possible. The way it currently does it is:
>
> registration->SetFixedImage( fixedImageReader->GetOutput() );
> registration->SetMovingImage( movingImageReader->GetOutput() );
>
> I have two pointers to two unsigned int image buffers
> containing the pixel
> data - instead of using the fixedImageReader->GetOutput()
> method, how could
> I ask the itk code to take the data directly from my image
> buffers - is this
> possible?
>
> registration->SetFixedImage( pBuff1 );
> registration->SetMovingImage( pBuff2 );
>
> Thank you for your time.
>
> _________________________________________________________________
> Choose now from 4 levels of MSN Hotmail Extra Storage - no
> more account
> overload! http://click.atdmt.com/AVE/go/onm00200362ave/direct/01/
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-> users
>