[Insight-users] Registration

Luis Ibanez luis . ibanez at kitware . com
Fri, 26 Sep 2003 16:25:51 -0400


Hi SriValli,

You may have to tune this registration progresively.

The first thing to verify is the quality of the initialization.

Please do the following:
just initialize the transform as your are currently doing,
and use the transform in a Resample image filter in order
to resample the moving image.

The idea is to check how good/bad the initial position of the
image is.

The distribution of intensities in your SPECT image is quite
different from the distribution in the MRI one, so it is possible
that by computing the moments, the initial alignment of the images
will not be a good starting point.

Note that by resampling at the inital stage, the affine transform
shouldn't require any scaling since the spacing in your images
seems to be consistent.

If you find the initialization to be reasonable, then run first
a single level pyramid but with a subsampling of 8 and 4 (fixed and
moving image).  Tune the parameters of the optimizer until the result
of this single-level registration is acceptable. Only then, move
ahead to add more levels to the pyramid.

Add a Command/Observer to the optimizer and track the evolution
of the registration at each iteration. That is always helpful in
the process of tunning the registration parameters.



   Regards,


     Luis


-----------------
CSPL wrote:
> Dear Mr.Luis,
> 
> Thank you for reply.I am using the same way as you mentioned. I used
> CenteredAffineTransform and CenteredTransformInitializer to initialize
> transform.
> I am enclosing the code snippet and image details.
> 
> My  FixedImage is 256 X 256 X 120; spacing is 0.8593X 0.8593 X  1.6.
> MovingImage is 128 X 128 X 95; spacing is 1.802125 X 1.802125 X 3.60425
> 
> *********
> metric->SetNumberOfSpatialSamples( 1000);
> metric->SetNumberOfHistogramBins( 50 );
> 
> unsigned int Factors1[ 3 ] = { 8, 8, 1 };
> unsigned int Factors2[ 3 ] = { 4, 4, 1 };
> 
> FixedImagePyramidType::Pointer fixedImagePyramid =
> FixedImagePyramidType::New();
> fixedImagePyramid->SetStartingShrinkFactors( Factors1 );
> registration->SetFixedImagePyramid( fixedImagePyramid );
> 
> MovingImagePyramidType::Pointer movingImagePyramid =
> MovingImagePyramidType::New();
> movingImagePyramid->SetStartingShrinkFactors( Factors2 );
> registration->SetMovingImagePyramid( movingImagePyramid );
> 
> TransformType::Pointer transform = TransformType::New();
> typedef itk::CenteredTransformInitializer<TransformType, FixedImageType,
> MovingImageType >  TransformInitializerType;
> TransformInitializerType::Pointer initializer =
> TransformInitializerType::New();
> initializer->SetTransform(   transform );   //transform is
> CenteredAffineTransform
> initializer->SetFixedImage(  FixedImage );
> initializer->SetMovingImage( MovingImage );
> initializer->MomentsOn();
> initializer->InitializeTransform();
> 
> const double translationScale = 1.0 / m_translateScale;
> optimizerScales.Fill( 1.0 );
> 
> for( int i = 0; i <= 11; i++ )
> {
>  optimizerScales[ i ] =  1.0 /1;
> }
> optimizerScales[ 9 ]  =  translationScale;
> optimizerScales[ 10 ] =  translationScale;
> optimizerScales[ 11 ] =  translationScale;
> optimizerScales[ 12 ] =  translationScale;
> optimizerScales[ 13 ] =  translationScale;
> optimizerScales[ 14 ] =  translationScale;
> 
> optimizer->SetScales( optimizerScales );
> optimizer->SetMaximumStepLength(4 );
> optimizer->SetMinimumStepLength(0.005 );
> optimizer->SetMaximize( TRUE);
> registration->SetOptimizer( optimizer ); //optimizer is object of
> RegularStepGradientDescentOptimizer object
> 
> registration->SetNumberOfLevels( 5);
> optimizer->SetNumberOfIterations( 250);
> ************
> Fixed volume is the extracted brain part of the original MR volume.
> Moving is the spect volume
> 
> Our requirement is to register moving with the fixed, The registered spect
> is transformed and fused with the original MR so that spect fuses with the
> brain and not with the other tissues.
> 
> 
> Output images are given linked to
> http://www . comsols . com/Registration-images . htm
> Please tell me where i am giving wrong inputs.
> 
> Thanking you,
> Regrads,
> SriValli.
> 
> 
> 
>