[Insight-users] Re: Registration on N images.

Luis Ibanez luis.ibanez@kitware.com
Mon, 21 Apr 2003 01:04:13 -0400


Hi Prasad,

This is a situation that arrives often when
the parameters of the registration have not
been tunned yet.

The exception indicates that the transform
responsible for mapping the moving image into
the space of the fixed image are diverging
and as a result the moving image is so far off
that it doesn't even overlap with the fixed
image.

It typically can be corrected by reducing the
step length of the optimizer.

The best way to proceed in this case is to
create a Command/Observer and connect it
to the optimizer. This observer should be
configured to print out the parameters of
the transform at each iteration of the
optimizer. In this way you will be able
to track the evolution of the transform.

The typical parameters to tune in this case
are :

1) optimizer step length (the initial one)
2) the translation scale parameter.

Please take look at the registration chapter
in the softwareguide.

http://www.itk.org/ItkSoftwareGuide.pdf

Several examples are presented there on how
to configure Command/Observers for tracking
the evolution of the transform.


Regards,


    Luis



----------------------------
Prasad Sarma wrote:
> hi Luis,
> 
>     I have come across a problem while doing
> registration, I tried to register 2 images that I got
> from meta image format using the same registration
> program given as Registration1.cxx just changing the
> type of the pixel and the dimensions.
> 
> (type-unsigned char and dimension-3)
> 
> I have also included statements for Z offset like
> ---------------
> initialParameters[2] = 0.0;  // Initial offset in mm
> //along Z
> 
> and final translation along z as
> 
> const double TranslationAlongZ = finalParameters[2];
> --------------------
> 
> I got the following exception
> =====================================
> 
> C:\Documents and Settings\Prasad\My
> Documents\Registerbin\Debug>Register.exe
> my3Dimage_1.mha my3Dimage_2.mha diff.mha
> ExceptionObject caught !
> 
> itk::ExceptionObject (00EDFDA0)
> Location: "Unknown"
> File: C:\Documents and Settings\Prasad\My
> Documents\Insight\Insight\Code\Algorit
> hms\itkMeanSquaresImageToImageMetric.txx
> Line: 91
> Description: itk::ERROR:
> MeanSquaresImageToImageMetric(00230C60): All the
> points
>  mapped to outside of the moving image
> ==============================================
> and line 91 of the itkImagetoImagemetric.txx on line
> 91 has the following code
> 
> --
> if( m_FixedImageRegion.GetNumberOfPixels() == 0 )
> LINE 91->{
>     itkExceptionMacro(<<"FixedImageRegion is empty");
>     }
> 
> ---
> 
> 
> I don't under stand why this is the case.
> I could see bothe these 3Dimages individually
>  and both .mha are identical as
> 
> -----------------------
> ObjectType = Image
> NDims = 3
> BinaryData = True
> BinaryDataByteOrderMSB = False
> Color = 1 0 0 1
> ElementSpacing = 1 1 1
> DimSize = 64 64 19
> ElementType = MET_UCHAR
> ElementDataFile = my3Dimage_1.raw
> 
> ------------------------------------
> 
> Could you throw some light on this?
> 
> Thanks
> Prasad
> 
>