[Insight-users] Error in Registration results

Luis Ibanez luis.ibanez at kitware.com
Thu Jul 5 14:53:50 EDT 2007


Hi Emma,

If you are skipping the Rigid Registration step, that will explain
the poor results that you get form the Deformable registration.

Deformable methods are not well suited for correcting for large
displacements or rotations. You must account for those misregistrations
first.

Typically what you want to do is to run a sequence of:


       a)   Rigid Transform registration
       b)   Affine Transform registration
            initialized with the result of (a)
       c)   Deformable registration
            initialized with the result of (b)


Note that the BSplineDeformable Transform accepts an AffineTransform
as the "Bulk" transform that represents (b).

Please run first an affine registration between the two images,
and then take the resulting transform and use it as the Bulk
transform in the BSplineDeformableTransform.



ITK should get the origin, spacing and number of pixels information
directly from the input files (e.g. from DICOM files if that is what
you are using).  You can verify if the information is correct by
doing:


      fixedImage->Print( std::cout );
      movingImage->Print( std::cout );


This should print out to your console the basic information about
the two images.


Please let us konw if you are having trouble getting this information
out of a DICOM series.



     Regards,


         Luis



------------------
Emma Ryan wrote:
> Hi Luis,
> 
>   Thank you for your reply. Well, the algorithm takes very long. It 
> stops only because it reaches the 500th iteration (the limit). Yes, both 
> are CT images.
> 
> I guess the lungs collapse because I do the registration in one step, 
> instead of using Rigid registration as a precursor.
> 
> My dataset is as such :
> 
> Set 1 : 512 x 512 x 30 (resolution 0.68 x 0.68 x 1.0)
> Set 2: 512 x 512 x 30 (resolution 1.0 x 1.0 x 1.0)
> 
> The ITK example file has a default spacing of  (1, 1, 1) I guess and I 
> had used this earlier, hence the result I guess.
> 
> I have since changed it. But the results are not good. The output image 
> does not have default values in the middle, but the difference images 
> are highly speckled. I am not sure why this has happened. I have yet to 
> run enough tests to make sur ethat I do not get any default values in 
> the center slices.
> 
> Also, doesn't ITK automatically get the spacing information from the 
> dicom files ?
> I wrote a program to read dicom series, generate a .vtk file and rewrite 
> teh dicom series.
> 
> While the output images of this dicom conversion match the input, the 
> .vtk file has wrong spacing information (1, 1, 1) instead of (0.68, 
> 0.68, 1). Hence I am also not able to view it in Volview.
> 
> What happens to the spacing information, is a mystery.
> 
> Any tips how I can solve this ?
> 
> Emma
> 
> 
> ----- Original Message ----
> From: Luis Ibanez <luis.ibanez at kitware.com>
> To: Emma Ryan <eryanvtk at yahoo.com>
> Cc: insight-users at itk.org
> Sent: Thursday, July 5, 2007 1:41:13 PM
> Subject: Re: [Insight-users] Error in Registration results
> 
> 
> Hi Emma,
> 
> 
> 
>         mm... it is hard to explain indeed.
> 
> 
> Your intuition is correct regarding the fact that the
> default pixel value "shouldn't" appear in the middle slices.
> 
> That being said, it is not "impossible" for the value to
> appear there.  The fact that it is appearing, is an indication
> that one of the nodes in the BSplineGrid has a deformation so
> large that it sends the point outside of the image physical
> extent. In other words, the registration failed largely.
> 
> The extreme deformation that the two sliced display are also
> a bad indication of the results of the registration. For
> example, the first slice in your email has the lungs collapsed
> towards the medial plane.
> 
> You should probably rerun the registration by using different
> parameters for the optimizer. In particular you probably should
> set the Bound values for the parameters of the Transform.
> 
> 
> BTW:
> 
> 1) How many iterations did the algorithm *actually* ran ?
> 
> 2) Where the two images of the same modality ?
> 
>     The metric used in this example is MeanSquares,
>     so it pretty much assumes that the images are of
>     the same modality and with a very close distribution
>     of intensity values.
> 
> 
> 
>   Regards,
> 
> 
> 
>       Luis
> 
> 
> 
> -----------------
> Emma Ryan wrote:
>  > Hi,
>  >
>  >   I am trying to register 2 volumes.  I use ITK example -
>  > DeformableRegistration7.cxx to do so. The default pixel values is 100.
>  > So any empty space is filled with this grey value.  So it is
>  > understandable if the first  slice shows this grey region since they are
>  > tyring to align along the 'Z' direction. Also, if this grey value
>  > appears along the boundary of the images, it makes sense.
>  >
>  >   But how does one explain the appearance of the default grey value
>  > (100) in the center slices.  I have attached some images and labelled
>  > them with thier corresponding slice number.
>  >
>  >   I thought the problem was with resampling, but that part of the code
>  > seems correct, besides I have used the example cpp file as is.
>  >
>  >  I see some of these 'artifacts' in the center slices as well.
>  > Any clue ?
>  >
>  > Emma
>  >
>  > ------------------------------------------------------------------------
>  > Be a better Globetrotter. Get better travel answers
>  > 
> <http://us.rd.yahoo.com/evt=48254/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&sid=396545469>from 
> <http://us.rd.yahoo.com/evt=48254/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&sid=396545469%3Efrom> 
> 
>  > someone who knows.
>  > Yahoo! Answers - Check it out.
>  > ------------------------------------------------------------------------
>  >
>  >
>  > ------------------------------------------------------------------------
>  >
>  >
>  > ------------------------------------------------------------------------
>  >
>  > _______________________________________________
>  > Insight-users mailing list
>  > Insight-users at itk.org
>  > http://www.itk.org/mailman/listinfo/insight-users
> 
> 
> ------------------------------------------------------------------------
> Pinpoint customers 
> <http://us.rd.yahoo.com/evt=48250/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v9.php?o=US2226&cmp=Yahoo&ctv=AprNI&s=Y&s2=EM&b=50>who 
> are looking for what you sell.


More information about the Insight-users mailing list