[Insight-users] Re: On TranlateTransform

Luis Ibanez luis.ibanez@kitware.com
Wed, 12 Feb 2003 10:10:57 -0500


Hi Valli


1) If the estimated miss-registration between
    the images is about 20mm, starting with a
    step length of 19mm is too large. you may
    want to reduce this initial step length to
    something like 2mm to 4mm.

2) If the intention is to help the registration
    you can rather put your initial estimation of
    translation into the initialParameters array.

    It looks like in this case you are actually
    interested in benchmarking the registration
    process rather than actually get a specific
    registration done, so you probably don't want
    to help the registration method with this
    initial transform.


3) Did you look at the trace of values printed
    out for the transform paramters at each iteration ?

    When the registration parameters are well tunned,
    the transform for your case should run steadily
    form (0,0,0) to (20,20,0), with expected bigger
    jumps in the initial steps of the registration.


4) The exception you get, is typical of the
    transform diverging. When the transform is so
    far off that mapping the moving image on top
    of the fixed image space does not result in
    any intersection it becomes impossible to
    compute the metric.  In this case there is no
    hope for recovey and the registration method
    aborts by throwing an exception.

    The fact that the transform diverged so much is
    an indication that your steplength is too large.


5) The example should be writing 3D images.
    Note that you have to use a file format that
    actually supports 3D. At this points the formats
    supporting 3D are:  MetaImage, VTK, VOl, Gipl and
    Analyze.

    PNG for example will not be able to represent
    a volume.

    Please make sure that you use filenames with the
    extension of one of the valid fileformats above.
    E.g.
    myfile.mha   for   MetaImage.
    myfile.vtk   for   VTK



Please let us know if you continue experiencing
any problem.


Thanks,


   Luis


---------------------------------------
Srivalli wrote:
> Hi Luis,
> 
>  
> 
>     Thanks for ur mail. As per ur suggestions i could run the example 
> per multiple images. I updated dimensions to 3 and added one more 
> initialparameter. I initialized all the initial parameter to 0.0.
> initialParameters[0] = 0.0;  // Initial offset in mm along X
> initialParameters[1] = 0.0;  // Initial offset in mm along Y
> initialParameters[2] = 0.0;  // Initial offset in mm along Z
> 
>  
> 
> The following are the other settings.
> 
>  
> 
> optimizer->SetMaximumStepLength( 19.00 ); 
> optimizer->SetMinimumStepLength( 0.001 );
> optimizer->SetNumberOfIterations( 200 );
> 
>  
> 
> with spacing as  {0.859390, 0.859375, 1.60000 }
> 
>  
> 
> My data sets are 256x256x10.
> My Moving image is generated from fixed by translating (20,20,0).
> 
>  
> 
> When I run the application, It took nearly 8 mins to complete 
> registration process.
> 
> Output image is translated back in y-axis but,In x- axis not translated.
> 
> When i try to change the steplength values,I am getting the following 
> exception.
> 
> Values are like
> 
> Translation in X : -10.06523
> 
> Translation in Y : -21.02324
> 
> Trsnslation in Z : 0.0023234
> 
>  
> 
>  
> 
> itk::ExceptionObject (0012FD08)
> Location: "Unknown"
> File: 
> G:\NEWITKFILES\NewVersionITK28_1_2003\itksrcs\Code\Algorithms\itkMeanSquaresImageToI
> mageMetric.txx
> Line: 91
> Description: itk::ERROR: MeanSquaresImageToImageMetric(00301B90): All 
> the points mapped to
>  outside of the moving image
> 
>  
> 
> Press any key to continue
> 
>  
> 
> 2)After registration, output file is not writting  properly. It is 
> writing only the first image to file but size of the image is same of 10 
> files. Rest of the images are empty with no data. How to rectify this 
> problem. Where could be the problem. I did not change any code in the 
> example related to writer.
> 
>  
> 
> Please help me to solve my problems.
> 
> Thanks in advance.
> 
>  
> 
> Regards,
> 
> Valli
>