[Insight-users] Registration Problem

Luis Ibanez luis.ibanez at kitware.com
Tue Jun 30 16:54:54 EDT 2009



Hi Sven,

In order to identify parameters for registration you want to
start from basic conditions and then progressively involve
more and more of the registration components.


For example.


0) You must verify that you are reading the images correctly.

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

    are usually the way to start

    pay attention to the Origin, Spacing and Direction of
    both images.



1) Resample the moving image by just using the Initial
    Transform. This will show you your initial conditions.

    The registration process will not be able to compensate
    for poor initialization.



2) Run the optimizer for a few iterations first, and
    verify if the image is moving in the right direction.

    You can benefit from using the helper class

      InsightApplications/Auxiliary/vtk/
                   vtkRegistrationMonitor.h
                   vtkRegistrationMonitor.cxx

     It will show you how the image align as the
     registration progresses.


3) Verify if the change in values of the Metric is
    significant during these first iterations of the
    registration.



    Please reconsider these factors and
    let us know if you have further questions,



        Thanks



             Luis


---------------------
Fischer, Sven wrote:
> Hi Dan,
> 
> thank you for your answer. 
> I did as you said and found that the registration works when I change fixed and moving image. It seems like it works when the moving image is the image where I have less 'information'. But it would be nice when it would work in both directions. And I'm afraid that it will not work again when in both images is a relative big amount of information. It seems like the choice of the optimizer settings, like Min and Max Step Length, Relaxation Factor and Gradient Magnitude Tolerance, and also other settings have a big influence on the registration. So is there some rule for setting them? I already read somewhere in the Mailing List that the Max Step Length should be 10 times the largest image spacing and Min Step Length half the smallest, but also this gives not always a good solution.
> 
> Regards
> Sven
> 
> 
> ________________________________________
> Von: Dan Mueller [dan.muel at gmail.com]
> Gesendet: Dienstag, 23. Juni 2009 15:09
> An: Fischer, Sven
> Cc: insight-users at itk.org
> Betreff: Re: [Insight-users] Registration Problem
> 
> Hi Sven,
> 
> As you say, the issue could be in numerous places. I suggest you start
> simple, and build your application slowly from the ground up, using
> components which are known to work.
> 
> For example, you might start with a command line application which
> uses ITK to read the input DICOM images, perform the registration, and
> write the registered output image. You can then use your favourite
> image viewer to check the results. The next step could be to convert
> the output image to VTK and display it. The final step would be the
> whole application as you describe in your email.
> 
>>From your description, I imagine you will have difficulties which the
> simple first step described above. If the optimizer appears to be
> moving away from the expected parameter values, it could be that it is
> minimizing instead of maximizing (or vice versa).
> RegularStepGradientDescentOptimizer has the function SetMaximize(bool)
> which controls which direction it operates.
> 
> If you haven't already, I would really recommend you read the ITK
> Software Guide (chapter 8)
>     http://www.itk.org/ItkSoftwareGuide.pdf
> and look at the registration examples
>     Examples\Registration
> 
> Hope this helps.
> 
> Regards, Dan
> 
> 2009/6/23 Fischer, Sven <Sven.Fischer at medizin.uni-leipzig.de>:
> 
>>Dear all,
>>
>>I want to do an registration between CT and MRI images. I use RegularStepGradientDescentOptimizer with MutualInformationImageToImageMetric for that task. I begin with loading the DICOM images with vtk and transform it to an ITKImage with VTKImageToImage filter, I register the images and transform them with ResampleImageFilter and  AffineTransform and transform them back to VTK to display them.
>>Now when I display the images I find that they aren´t registered. I tried different settings on the optimizer and metric but nothing worked. I even found that two images that are already registered will be misregistered afterwards. When I display the MI value during the iterations I find that it is geting worse sometimes and the final is not always the best that was found in an earlier iteration step. Shouldn't it go back into direction of the best value if it finds a worse? Is that a mistake in the Optimizer? Could you give me an advice which Optimizer to use and how to set the settings for Optimizer and Metric?
>>Could it be up to transforming the images between VTK and ITK? Is it important which ImageTypes/PixelTypes I use for Transforming, registration and transform between VTK/ITK?
>>
>>Regards
>>Sven
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
> 


More information about the Insight-users mailing list