[Insight-users] MattesMI and CenteredAffineTransformation

gabri tartuz at gmail.com
Thu Dec 13 11:55:28 EST 2007


Hi Karthik,
thanks for your reply.
I've done what you suggested about the initialization in this way :

TransfomParameters:  [1, 0, 0, 0, 1, 0, 0, 0, 1, 89.9859, 110.013,
78.0862, 4.02741, -0.754015, -9.40034]
OptimizerScales          : [1, 0, 0, 0, 1, 0, 0, 0, 1, 10000, 10000,
10000, 0.000937524, 0.000937524, 0.000937524]
NumberOfParameters = 15
FixedImage : /home/gabri/MNI_T1.hdr
MovinImage : /home/gabri/Desktop/MNI_T1_Rotated5z15y.hdr
InitStepLen: 2
maxNumIteration:300
TranslationScaleFactor: 0.000937524


/home/gabri/lib/InsightToolkit-3.4.0/Utilities/vxl/core/vnl/vnl_matrix.txx:
1192: matrix has non-finite elements
/home/gabri/lib/InsightToolkit-3.4.0/Utilities/vxl/core/vnl/vnl_matrix.txx:
here it is:
1 nan nan
nan 1 nan
nan nan 1
/home/gabri/lib/InsightToolkit-3.4.0/Utilities/vxl/core/vnl/vnl_matrix.txx:
calling abort()
0   -0.741588   [1, nan, nan, nan, 1, nan, nan, nan, 1, 89.9859,
110.013, 78.0862, 4.02741, -0.754015, -9.40034]Aborted


this is why i've initialize all the first 9 elements of the
optimizerScales to 1.0 .... is it correct?



**MI followed by Histrogram matching is a tad counter-intuitive.
Histogram matching methods such as histogram equalization that you're
using below is generally used when you intend using intensity sensitive
metrics such as MeanSquares etc. Mutual information itself maximzes the
mutual information, which is a function of the joint intensity
distribution, so its inherently intended to be contrast/intensity
insensitive **

Indeed is not followed I use the HistogramMatchingFilter in the
beginning of my programs but if U say that is useless I'll cancel it.

**That's legacy documentation left over. It predates the time when
Centered transforms were reworked. They now derive for
MatrixOffsetTransformBase which takes care of calling ComputeOffset()
whenever you attempt to set the center/translation/rotation matrix. **

So i do not have to ComputeOffset the CenteredAffineTransform will
compute it itself right ?

Sincerly,

Gabriele


Karthik Krishnan ha scritto:
> On 12/13/07, *gabri* <tartuz at gmail.com <mailto:tartuz at gmail.com>> wrote:
>
>     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
>
>
> At the risk of me sounding silly, it looks like you initialize your
> transform with all ones. That does not make an Identity matrix. That
> could explain why all the samples from the fixed image map outside the
> moving image.
>
>     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"
>
>
> That's legacy documentation left over. It predates the time when
> Centered transforms were reworked. They now derive for
> MatrixOffsetTransformBase which takes care of calling ComputeOffset()
> whenever you attempt to set the center/translation/rotation matrix.
>
> We've removed the misleading documentation. Thanks for the report.
>
> /cvsroot/Insight/Insight/Code/Common/itkCenteredAffineTransform.h,v
> new revision: 1.14; previous revision: 1.13
>
>     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]
>
>
> The Number of spatial samples really depends on the dimension of your
> image. 5% of the samples is probably reasonable. 
>
>     3) Beacuse of the images are obviously differente i'm using the
>     HistgramMatchingFilter with this parameters 
>
>
> MI followed by Histrogram matching is a tad counter-intuitive.
> Histogram matching methods such as histogram equalization that you're
> using below is generally used when you intend using intensity
> sensitive metrics such as MeanSquares etc. Mutual information itself
> maximzes the mutual information, which is a function of the joint
> intensity distribution, so its inherently intended to be
> contrast/intensity insensitive
>
>     *      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
>
>
>     _______________________________________________
>     Insight-users mailing list
>     Insight-users at itk.org <mailto:Insight-users at itk.org>
>     http://www.itk.org/mailman/listinfo/insight-users
>
>
>
>
>
> -- 
> Karthik Krishnan
> R&D Engineer,
> Kitware Inc.
> Ph: 518 371 3971 x119
>       518 698 3045 (cell)
> Fax: 518 371 3971 


-------------- 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/dc5dc237/signature-0001.pgp


More information about the Insight-users mailing list