[Insight-users] Fwd: deform registration
Luis Ibanez
luis . ibanez at kitware . com
Wed, 29 Oct 2003 14:50:02 -0500
Hi Tina,
I just tested the DeformableRegistration1 example,
and it does produce slightly different results when you
change the metric.
Note that the variations in the image will not be
visible to the naked eye. The deformations of the
registration are about 2 pixel maximum. So, by simply
looking at the images you will not see any difference.
We are talking about the respiratory motion of a mouse
that was trapped in an micro MRI machine... so there is
no much room for changes between the fixed and moving
images in this particular case.
If you use the "diff" command you will find differences
in the two registered images. In particular if you
compare the raw data files:
RatLung_result10.img
as they are produced with each metric.
An easy way to look at the actual differences between
the registration results is to look at the deformation
fields in each case. The x and y components of the
deformation field are saved as images in analyze format,
as:
component X of the deformation field:
RatLung_dispxvec.hdr
RatLung_dispxvec.img
component Y of the deformation field:
RatLung_dispyvec.hdr
RatLung_dispyvec.img
The deformation field obtained with Normalized correlation
is much smoother that the one produced by MeanSquares, for
example. You could use a tool like ParaView (which is also
open source) for visualizing deformation fields.
http://www . paraview . org/HTML/Index . html
Another easy way to note differences from both registrations
is to subtract the images resulting from the use of two
different metrics.
Please look closer at the results of the registration
and let us know if you find any problems.
Thanks
Luis
----------------------
Tina Wang wrote:
>
> I am running the sample program ( deformableRegistration1) with sample
> images (RatLungslic1 and 2), the output image did not change at all by
> using any metric function. Attached is the parameters I used. Please help!!
>
> Thanks,
>
> tina
>
>
> % Configuration file #1 for DeformableRegistration1.cxx
> %
> % This example demonstrates the setup of a basic registration
> % problem that does NOT use multi-resolution strategies. As a
> % result, only one value for the parameters between
> % (# of pixels per element) and (maximum iterations) is necessary.
> % If you were using multi-resolution, you would have to specify
> % values for those parameters at each level of the pyramid.
> %
> % Note: the paths in the parameters assume you have the traditional
> % ITK file hierarchy as shown below:
> %
> % ITK/Insight/Examples/Registration/DeformableRegistration1.cxx
> % ITK/Insight/Examples/Data/RatLungSlice*
> % ITK/Insight-Bin/bin/DeformableRegistration1
> %
> % ---------------------------------------------------------
> % Parameters for the single- or multi-resolution techniques
> % ---------------------------------------------------------
> 1 % Number of levels in the multi-res pyramid (1 = single-res)
> 1 % Highest level to use in the pyramid
> 1 1 % Scaling at lowest level of pyramid
> 4 % Number of pixels per element
> 1.e4 % Elasticity (E)
> 1.e4 % Density x capacity (RhoC)
> 1 % Image energy scaling (gamma) - sets gradient step size
> 2 % NumberOfIntegrationPoints
> 1 % WidthOfMetricRegion
> 50 % MaximumIterations
> % -------------------------------
> % Parameters for the registration
> % -------------------------------
> 0 0.99 % Similarity metric (0=mean sq, 1=ncc, 2=patern, 3=MI, 5=demons)
> 1.0 % Alpha
> 0 % DescentDirection (1 = max, 0 = min)
> 0 % DoLineSearch (0=never, 1=always, 2=if needed)
> 1.e1 % TimeStep
> 0.5 % Landmark variance
> 0 % Employ regridding / enforce diffeomorphism ( >= 1 -> true)
> % ----------------------------------
> % Information about the image inputs
> % ----------------------------------
> 128 % Nx (image x dimension)
> 128 % Ny (image y dimension)
> 0 % Nz (image z dimension - not used if 2D)
> y:\imagepool\general-images\RatLungSlice1.hdr % ReferenceFileName
> y:\imagepool\general-images\RatLungSlice2.hdr % TargetFileName
> % -------------------------------------------------------------------
> % The actions below depend on the values of the flags preceding them.
> % For example, to write out the displacement fields, you have to set
> % the value of WriteDisplacementField to 1.
> % -------------------------------------------------------------------
> 0 % UseLandmarks? - read the file name below if this is true
> - % LandmarkFileName
> y:\imagepool\general-images\RS_deform2-1.hdr % ResultsFileName (prefix only)
> 1 % WriteDisplacementField?
> y:\imagepool\general-images\RatLung_disp % DisplacementsFileName (prefix only)
> 0 % ReadMeshFile?
> - % MeshFileName
> END
>
>
> ------------------------------------------------------------------------
>
> This mail is probably spam. The original message has been attached
> along with this report, so you can recognize or block similar unwanted
> mail in future. See http://spamassassin . org/tag/ for more details.
>
> Content preview: --0-531238825-1066935895=:79463 Content-Type:
> text/plain; charset=us-ascii Note: forwarded message attached. Do you
> Yahoo!? The New Yahoo! Shopping - with improved product search
> --0-531238825-1066935895=:79463 Content-Type: text/html;
> charset=us-ascii [...]
>
> Content analysis details: (3.10 points, 3 required)
> FROM_WEBMAIL_ENDS_IN_NUMS6 (0.9 points) From address is webmail, and ends in lots of numbers
> FROM_ENDS_IN_NUMS (0.6 points) From: ends in numbers
> HTML_MESSAGE (0.1 points) BODY: HTML included in message
> HTML_00_10 (1.4 points) BODY: Message is 0% to 10% HTML
> MAILTO_TO_SPAM_ADDR (0.6 points) URI: Includes a link to a likely spammer email address
> KNOWN_MAILING_LIST (-0.5 points) Email came from some known mailing list software
>
>