[Insight-users] MattesMI and CenteredAffineTransformation

gabri tartuz at gmail.com
Thu Dec 13 06:11:59 EST 2007


Hi all,
I would like to ask some questions.
I'm trying to register two MR images but an error occurs when
registration process start.

*Parameters :
OptimizerParameters : [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.000937524,
0.000937524, 0.000937524]
NumberOfParameters = 15
FixedImage : MNI_T1.hdr
MovinImage : pre.hdr
maxNumIteration:300
TranslationScaleFactor: 0.000937524
ExceptionObject caught !

itk::ExceptionObject (0x86353b0)
Location: "typename
itk::MattesMutualInformationImageToImageMetric<TFixedImage,
TMovingImage>::MeasureType
itk::MattesMutualInformationImageToImageMetric<TFixedImage,
TMovingImage>::GetValue(const typename
itk::ImageToImageMetric<TFixedImage, TMovingImage>::ParametersType&)
const [with TFixedImage = itk::Image<float, 3u>, TMovingImage =
itk::Image<float, 3u>]"
File:
/home/gabri/lib/InsightToolkit-3.4.0/Code/Algorithms/itkMattesMutualInformationImageToImageMetric.txx
Line: 753
Description: itk::ERROR:
MattesMutualInformationImageToImageMetric(0x8634cd0): Too many samples
map outside moving image buffer: 0 / 50*0

1) reading the informations about the tranform , the description tells :
          "This class implements an Affine transform in which the
rotation center can be explicitly selected. Note that the method
"ComputeOffset()" must be called just before using the transform for
mapping points, vectors or covariantvectors. This is necessary for
updating the offset of the transform taking into account the center of
rotation"

but the "ComputeOffset()" method is a private method so i couldn't use
it to compute the right offset.

2) there is a rule to set the NumberOfHistogramBins and the SpatialSamples?
*
    mutualmetric->SetNumberOfHistogramBins(20);
    mutualmetric->SetNumberOfSpatialSamples(500);
    registration->SetMetric( mutualmetric );
*my images dimensions are : fixed  [91 109 91] -  moving [125 , 512 , 512]

3) Beacuse of the images are obviously differente i'm using the
HistgramMatchingFilter with this parameters

*      matcher->SetInput( movingImageReader->GetOutput() );
      matcher->SetReferenceImage( fixedImageReader->GetOutput() );
 
      matcher->SetNumberOfHistogramLevels( 1024 );
      matcher->SetNumberOfMatchPoints( 500 );
      matcher->ThresholdAtMeanIntensityOn();*
are they correct for the dimension? There is a method to compute them?

4) the CenteredAffineTranform need 15 parameters to be set instead of 12
of the AffineTranform (that i've been using before) the other 15
parameters are the center of rotation?
so that the first 9 are the matrix
[M11......M33,CenterX,CenterY,CenterZ,
TranslationX,TranslationY,TranslationZ] is it correct?

best reguards ,

gabriele

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/insight-users/attachments/20071213/e44584b1/signature.pgp


More information about the Insight-users mailing list