[Insight-users] Thin Plate Spline Transformation & Registration

realstyx@web.de realstyx@web.de
Wed, 12 Feb 2003 20:28:56 +0100


Hi,

I'm working on a combination of thin plate splines transformation and mutual information. 
The idea: You have a source and a target image for the spline transformation. The target-image-landmarks are set after registrating the region around the source-landmark against the region at the same place in the target image. The translation and the rotation is used to position the landmark.

The problem: how can i registrate the different extracted images without trying the registration parameters every time?

Here the function which is responsible for the registration...

RegisterImages(ImageType::SizeType size, ImageType::IndexType idx)
{	
OptimizerScalesType optimizerScales(transform->GetNumberOfParameters());
optimizerScales.Fill(1.0);
const double translationScale = 1.0 / 1000.0; 
optimizerScales[0] = 1.0; 
optimizerScales[1] = 1.0; 
optimizerScales[2] = translationScale; 
optimizerScales[3] = translationScale;

//GradientDescentOptimizer
optimizer->SetScales(optimizerScales); 
optimizer->MinimizeOff();
optimizer->SetLearningRate(this->LearningRate); //used value 0.0000001
optimizer->SetNumberOfIterations(this->Iterations); //100 iterations

//MutualInformationImageToImageMetric
metric->SetMovingImageStandardDeviation( 0.4 ); 
metric->SetFixedImageStandardDeviation( 0.4 );
metric->SetNumberOfSpatialSamples( 50 ) ;

//read the extracted registration->region of the source-image
registration->SetFixedImage(ExtractedImageSrc);

//read the extracted region of the target-image
registration->SetMovingImage(ExtractedImageTrg); 

//size of fixed/moving image
registration->SetFixedImageRegion(this->region); 

ParametersType initialParameters(transform->GetNumberOfParameters());

//Similarity2DTransform<double>
transform->SetIdentity();

initialParameters = transform->GetParameters(); 
initialParameters[0] = 0.0; 
initialParameters[1] = 0.0;
registration->SetInitialTransformParameters(transform->GetParameters());

try{
	registration->StartRegistration();

}
catch(itk::ExceptionObject &err)
{
	std::cout<<"error in registration"<<endl;
	std::cout<<err<<endl;
}
}



Sample Output:Iteration 99 = 2.95508 : [-0.00097277, 0.999764, 0.0338833, 0.0617885] (image size 169x169, both the same(!!))

if there is an error it's mostly because of too small standard deviation.

and now my questions:               1. what are safe parameters for the registration if i don't know
                                                        the size of fixed and moving image?
			    2. is the combination of the used metric, registration method and
         			        transformation useable?
			    3. how can i stop the registration and get the 
                                                        translation/rotation values if the optimal value is reached?
                                                    4. how can i initialize the registration for the second time?
                                                        (at the moment  there is an exception if the fixed-image is set
                                                          for the second time)
 			    5. why is there a translation and a rotation if fixed and moving
                                                        images are the same? 
			    6. where can i find for example the
		  	        itkMattesMutualInformationImageToImageMetric.h file??

I hope that you can help me.
Thanks and a nice evening...

Regards, Thomas
______________________________________________________________________________
Die vCard -  Ihr neues Kennzeichen  -  bei WEB.DE FreeMail!
http://freemail.web.de/features/?mc=021156