Fw: [Insight-users] different spacing

Grace Chen Grace.Chen at swri.ca
Wed Jan 4 13:06:31 EST 2006


Hi Karthik,

Thanx for your help!  However, the spacing for my data is about 1mm. so a
movement (5, -25, 0) is only about 25 pixels away in y direction, is that
still too much for the program to handle?  Also, I noticed that registration
doesn't work well only when I feed the program with data acquiring from
different modality.  If I simulate the same movement in the same image data,
the program will correct the movement pretty nicely.

Grace


----- Original Message ----- 
From: "Karthik Krishnan" <Karthik.Krishnan at kitware.com>
To: "Grace Chen" <Grace.Chen at swri.ca>
Cc: <insight-users at itk.org>
Sent: Friday, December 30, 2005 10:39 PM
Subject: Re: Fw: [Insight-users] different spacing


> On Fri, 2005-12-30 at 16:45 -0500, Grace Chen wrote:
> > Hi there,
> >
> > After struggling for so long trying to make the multi-modality version
of my
> > program to work using ITK, I think it's not working after all.  Is it
> > because that I am using VersorRigid3DTransform and the
> > VersorRigid3DTransformOptimizer?
> >
> > Grace
> >
> > ----- Original Message ----- 
> > From: "Grace Chen" <Grace.Chen at swri.ca>
> > To: "Luis Ibanez" <luis.ibanez at kitware.com>
> > Cc: <insight-users at itk.org>
> > Sent: Wednesday, December 28, 2005 2:36 PM
> > Subject: Re: [Insight-users] different spacing
> >
> >
> > > Hi Luis,
> > >
> > > Sorry, I should have explained a little more.
> > >
> > > My program has several levels.  The input images were first stored as
> > > vtkImageData.  I moved the fixed image using a vtkTransform object.
Then,
> > I
> > > used a lower level program which converts these vtkImageData to
ImageData
> > in
> > > ITK and perform registration using ITK.
> > >
> > > The ouput of the optimizer seems to improve the image.  I use
> > > MattesMutualInformationImageToImageMetric. And the ouput of  the first
and
> > > last 10  interations are listed as followed:
> >
> > > [optimizer->GetCurrentIteration() , optimizer->GetValue() ,
> > > optimizer->GetCurrentPosition()]
> > > 0 -0.180789 [-0.00372431, -0.00216522, -0.00342151,
0.0378279, -0.24234,
> > > 0.763643]
> [snip]
>
> What I would do is to
>
> 1. Set the scales for the Versor transform so that it effectively does
> only translation. Once I am satisfied that it does a decent job of
> correcting the translations, I would reduce the scales for the rotation
> too. For instance see the following example
>
http://www.itk.org/cgi-bin/viewcvs.cgi/Examples/Registration/ImageRegistration8.cxx?rev=1.34&root=Insight&view=markup
>
> The larger the scale, the more it curbs any optimization of that
> parameter.
>
> 2. Use only one level for a start and try to get that right. Most of the
> registration should be done at the first level.
>
> [snip]
> > > > By looking at the result of the registration, I notice that the
> > > translation
> > > > > is ( 1.3884, -3.48145, 2.08022) which is not the movement I
simulated
> > > i.e.
> > > > > through the call transform->Translate(5, -25, 0).<'transform' is a
> > > > > vtkTransform.>
>
> Registration is usually not meant to correct for large, impractical
> misalignments. For instance if this were a CT image with a spacing of
> 0.125, I would be surprised if the registration managed to correct for
> this misagnment (200 pixels here !). Please use reasonable test cases.
>
> [snip]
> > > Even if the viewer I use is a naive viewer, after I
> > > apply
> > > > > the registration transform and then I scale the image, both images
> > (now
> > > look
> > > > > approximiatly of the same size) should look aligned too, am I
correct?
> > > But
> > > > > that's not the case for me.
>
> For a start, please use
> InsightApplications/LandmarkInitializedMutualInformationRegistration as
> a viewer. You can load both images and conveniently view the overlay in
> 3 windows and you will have crosshairs and meta-info to query position
> information. This is the bare-minimum viewer capability you will need
> for any kind of registration.
>
> Happy new year.
> -karthik
>
> > >
> > >
> > >
> > > Grace
> > >
> > >
> > >
> > > ----- Original Message ----- 
> > >
> > > From: "Luis Ibanez" <luis.ibanez at kitware.com>
> > > To: "Grace Chen" <Grace.Chen at swri.ca>
> > > Cc: <insight-users at itk.org>
> > > Sent: Wednesday, December 28, 2005 2:11 PM
> > > Subject: Re: [Insight-users] different spacing
> > >
> > >
> > > >
> > > > Hi Grace,
> > > >
> > > >
> > > >   *  Did your registration converged ?
> > > >
> > > >
> > > >   *  Could you please post the output of the Command/Observer
> > > >      class that you connected to the optimizer ?
> > > >
> > > >
> > > >   *  Why is that you end up with a vtkTransform
> > > >      if you are doing registration with ITK ?
> > > >
> > > >
> > > >
> > > > Please let us know,
> > > >
> > > >
> > > >    Thanks
> > > >
> > > >
> > > >       Luis
> > > >
> > > >
> > > >
> > > > -----------------
> > > > Grace Chen wrote:
> > > > > Hi Luis,
> > > > >
> > > > > Thanx for the reply.  I know the registration should have been
done in
> > > the
> > > > > physical space.  Even if the viewer I use is a naive viewer, after
I
> > > apply
> > > > > the registration transform and then I scale the image, both images
> > (now
> > > look
> > > > > approximiatly of the same size) should look aligned too, am I
correct?
> > > But
> > > > > that's not the case for me.
> > > > >
> > > > > By looking at the result of the registration, I notice that the
> > > translation
> > > > > is ( 1.3884, -3.48145, 2.08022) which is not the movement I
simulated
> > > i.e.
> > > > > through the call transform->Translate(5, -25, 0).<'transform' is a
> > > > > vtkTransform.>
> > > > >
> > > > > Grace
> > > > >
> > > > > ----- Original Message ----- 
> > > > > From: "Luis Ibanez" <luis.ibanez at kitware.com>
> > > > > To: "Grace Chen" <Grace.Chen at swri.ca>
> > > > > Cc: <insight-users at itk.org>
> > > > > Sent: Wednesday, December 28, 2005 1:32 PM
> > > > > Subject: Re: [Insight-users] different spacing
> > > > >
> > > > >
> > > > >
> > > > >>Hi Grace,
> > > > >>
> > > > >>Please read with more attention the "Image Registration" Chapter
> > > > >>of the ITK Software Guide.
> > > > >>
> > > > >>
> > > > >>If the two images are taken from the same patient and the image
> > > > >>spacings are set correctly by the scanner, you *should not need*
> > > > >>to do *any scaling* when registering the images.
> > > > >>
> > > > >>
> > > > >>The fact that the images look of different sizes in your screen
> > > > >>just shows that you are using a poor image viewer.
> > > > >>
> > > > >>
> > > > >>You are probably comparing the images based on their number of
> > > > >>pixels instead of based on their physical extent in space.
> > > > >>
> > > > >>
> > > > >>
> > > > >>Please study Figure 8.7 in pdf-page 358.
> > > > >>
> > > > >>
> > > > >>The Transfrom that ITK compute is the one that maps the *physical*
> > > > >>space of one image into the *physical* space of the other image.
> > > > >>
> > > > >>
> > > > >>In that context, if the patient is the same, you shouldn't need
> > > > >>any scaling unless the head of the patient if physically shrinking
> > > > >>or expanding between the time of acquiring both scans. (hopefully
> > > > >>that doesn't happen in any hospital).
> > > > >>
> > > > >>
> > > > >>The transformations from the discrete image grid and the physical
> > > > >>space are done using the origin and spacing. (Transform T1 and T2
> > > > >>in Figure 8.7).
> > > > >>
> > > > >>
> > > > >>The transform that ITK computes for you is the "Space Transform".
> > > > >>
> > > > >>Please read Section 8.3, from the ITK Software Guide
> > > > >>
> > > > >>
> > > > >>and also read the Tutorial
> > > > >>
> > > > >>http://wiki.na-mic.org/Wiki/images/b/ba/Insight-Registration.ppt
> > > > >>
> > > > >>
> > > > >>
> > > > >>    Regards,
> > > > >>
> > > > >>
> > > > >>      Luis
> > > > >>
> > > > >>
> > > > >>
> > > > >>------------------
> > > > >>Grace Chen wrote:
> > > > >>
> > > > >>>Hi there,
> > > > >>>
> > > > >>>I am trying to perform multi-modality registration for two
volumes.
> > > The
> > > > >>>two image data have different physical attributes, etc.
> > > > >>>different origin, spacing and dimension (so, on the screen, one
looks
> > > > >>>bigger than the other).  I simulated a movement (e.g. a
translation
> > (5,
> > > > >>>-25, 0) in the fixed image.  However, when the registration
program
> > > > >>>returns, the final transform matrix is
> > > > >>>
> > > > >>>
> > > > >>> 0.999951     0.00912699   -0.00371374     1.3884
> > > > >>>
> > > > >>>-0.0091721   0.999882       -0.0123175       -3.48145
> > > > >>>
> > > > >>>0.00360089  0.0123509      0.999917         2.08022
> > > > >>>
> > > > >>>0                   0                     0
1
> > > > >>>
> > > > >>>This result is wrong, isn't it?  Does the registration program
scale
> > > the
> > > > >>>images before aligning them?  What's going on?
> > > > >>>
> > > > >>>Thanx!
> > > > >>>
> > > > >>>Grace
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>>
> > > >
> > >
> >
>>>------------------------------------------------------------------------
> > > > >>>
> > > > >>>_______________________________________________
> > > > >>>Insight-users mailing list
> > > > >>>Insight-users at itk.org
> > > > >>>http://www.itk.org/mailman/listinfo/insight-users
> > > > >>
> > > > >
> > > > > _______________________________________________
> > > > > Insight-users mailing list
> > > > > Insight-users at itk.org
> > > > > http://www.itk.org/mailman/listinfo/insight-users
> > > > >
> > > > >
> > > >
> > > > _______________________________________________
> > > > Insight-users mailing list
> > > > Insight-users at itk.org
> > > > http://www.itk.org/mailman/listinfo/insight-users
> > > >
> > >
> > > _______________________________________________
> > > Insight-users mailing list
> > > Insight-users at itk.org
> > > http://www.itk.org/mailman/listinfo/insight-users
> > >
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
> _______________________________________________
> 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