[Insight-users] register two volumes of different types

Luis Ibanez luis.ibanez at kitware.com
Thu Dec 8 07:14:35 EST 2005



Hi Grace,


Instead of the vtkExtractVOI, you should use the ITK filter

                RegionOfInterestImageFilter

http://www.itk.org/Insight/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html

This filter will recompute the origin in order to ensure that the
extracted sub-image still maps to its original physical location.




A detailed explanation of how ITK deals with Origin, Spacing
and number of pixels can be found in the ITK Software Guide:

             http://www.itk.org/ItkSoftwareGuide.pdf



You *must* read the following Sections:


    A) Section 4.1.4 "Defining Origin and Spacing",
       pdf-pages 72-75.


    B) Section 6.9.4 "Resample Image Filter",
       pdf-pages 255-284.


    C) Section 8.3, "Features of the Registration Framework",
       pdf-page 356-361.

         You must pay particular attention to section
         8.3.2 "Registration is Done in Physical Space",
         pdf-page 360.



You may also find useful to follow the Tutorials

       http://www.itk.org/HTML/Tutorials.htm


in particular the session on Image Registration

http://www.itk.org/CourseWare/Training/RegistrationMethodsOverview.pdf



as well as the session on Image Registration:

http://www.itk.org/Wiki/images/b/ba/Insight-Registration.ppt


from the ITK course:

http://www.itk.org/Wiki/ITK_Course_Georgetown_2005#Registration




     Regards,



         Luis


--------------------
Grace Chen wrote:
> Hi there,
>  
>  
> I try to compute the initial translation of the two 3D data.  However, after
> I use vtkExtractVOI to extract a part (also a volume) from one of the 3D
> data.  The origin stays the same!  In my program, the vtkImageData is used
> to be converted to itk::Image to compute the initial translation, so if the
> origin information stay the same, the center of the image is wrong.  So, I
> wonder if the definition of the term "origin" differs in vtk and itk?
>  
> Also, I would like to know more about how itk deal with volumes of different
> physical dimensions (origin, spacing, number of slices, etc.).  How can I
> read and learn about that? Which ITK component deal with that?
>  
>  Grace
>  
>  >
>  > ----- Original Message -----
>  > From: "Luis Ibanez" <luis.ibanez at kitware.com 
> <mailto:luis.ibanez at kitware.com>>
>  > To: "Grace Chen" <Grace.Chen at swri.ca <mailto:Grace.Chen at swri.ca>>
>  > Cc: "Insight Users" <insight-users at itk.org 
> <mailto:insight-users at itk.org>>
>  > Sent: Monday, December 05, 2005 4:08 PM
>  > Subject: Re: [Insight-users] register two volumes of different types
>  >
>  >
>  >
>  >>Hi Grace,
>  >>
>  >>Please read the chapter on Image Registration from
>  >>the ITK Software Guide.
>  >>
>  >>
>  >>You are right, a rigid transform has rotation and
>  >>translation; but given that you are in a clinical
>  >>environment where rotations are usually small, you
>  >>can safely initialize the rotational part of your
>  >>transform ot a Null rotation.  This is simply done
>  >>when you call SetIdentity() on the transfrom.
>  >>
>  >>After you call SetIdentity() you invoke SetTranslation()
>  >>in the transform, and then you get the current parameters
>  >>of the transform and pass them as the Initial parameters
>  >>to the Registration Method.
>  >>
>  >>If you print out the values of the array returned by
>  >>transform->GetParameters() you will understand better
>  >>how you are initializing the transform.
>  >>
>  >>
>  >>You are right that the job of the registration program
>  >>is to find the best Transform.
>  >>
>  >>but
>  >>
>  >>an Optimizer cannot always find a peak in a cost function
>  >>in a six dimensional space without falling in local optima.
>  >>So, it is your job to initialize the Optimizer (e.g. the
>  >>Transform) close enough to a good registration, so that
>  >>the Optimizer can do its job of fine tunning the values
>  >>of the Transform.
>  >>
>  >>If you look at the plots of ImageMetric values in any
>  >>of the examples of the ITK Software Guide, you will
>  >>better understand by it is unrealistic, or even naive
>  >>to expect that the optimizer can find the best value
>  >>without proper initialization.
>  >>
>  >>
>  >>Please note that you *ARE NOT* computing the Transformation.
>  >>You are computing an *INITIAL VALUE* for that Transformation,
>  >>so that the Optimizer can start from there and find the optimal
>  >>transformation for you.
>  >>
>  >>
>  >>When you are dealing with brain images, you can imagine that due
>  >>to the size of typical human head, a misalignment of more that
>  >>50 millimeters can not easily be corrected by exploring with
>  >>an optimizer the parametric space of the Transform. Therefore
>  >>you should initialize the Transform, so that the initial
>  >>misalignment between the two images is below 20 millimeters.
>  >>
>  >>
>  >>
>  >>Please read the Section 6.9  of the ITK Software Guide too.
>  >>
>  >>
>  >>
>  >>    Regards,
>  >>
>  >>
>  >>
>  >>       Luis
>  >>
>  >>
>  >>
>  >>-------------------
>  >>Grace Chen wrote:
>  >>
>  >>>Hi Luis,
>  >>>
>  >>>About setting the initial translation, I really don't get this...a rigid
>  >>>movement include both rotation as well as the translation.  Isn't it the
>  >>>registration program's job to find out the translation needed to align
>  >
>  > the
>  >
>  >>>center of both images?  If so, why do we need to compute that
>  >
>  > information
>  >
>  >>>for it?
>  >>>
>  >>>Grace
>  >>>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list