[Insight-users] 3D affine registration

Minjie Wu minjiewu at gmail.com
Thu Feb 15 16:21:02 EST 2007


Hello All,

I am trying to modify ImageRegistration9.cxx (2D affine using mean square
difference as metric)
into 3D Affine using mutual information as metric.

I first modified the code to use mutual information as metric (still 2D),
the code works fine.

Then the program is switched to 3D image format. The registration worked
well (finishing all the iterations,
which is set at 10 to save test time) and produced meaningful final
transform paramters, but it runs into error
(core dump) when it reached the resample filter.

The error message is shown below. It seems to me the error happened at the
resample filter. The affine 3D
code will be attached in my next email due to size limit of the mailing
list.

I wonder if anyone could help me with this problem. I am looking for 3D
affine registration using Mutual
information for float format images. I appreciate if anyone can share his
registration code with me.

Thanks a lot,
Minjie

{minjie}172: ./ImageRegistration9 ../data/b0_strip.img
../data/EPI_target_strip.img ../data/output.img
transform->GetNumberOfParameters() 12
0   -0.248195   [1.00064, 0.00208539 , 0.000835153, 0.00961565, 1.00785,
0.00556679, 0.0067807, 0.00828076, 1.00568, -0.371459, -3.81058, -2.31739]
AffineAngle: 0.214262
1   -0.24855   [1.00132, 0.00382831, 0.00137228, 0.0184897, 1.01482,
0.0112024, 0.013593 , 0.0164261, 1.01121, -0.354267, -3.73676, -2.25456]
AffineAngle: 0.414384
2   -0.249967   [1.00223, 0.00557496, 0.00186497, 0.027602, 1.0221,
0.0167874, 0.0196845, 0.0229768, 1.01594, -0.336936, -3.65877, -2.19673]
AffineAngle: 0.618668
3   -0.250047   [1.00205, 0.00638267, 0.00195302, 0.0368173, 1.02841,
0.0222603, 0.0253326, 0.0297049, 1.02083, -0.324037, -3.58076, -2.13765]
AffineAngle: 0.8506
4   -0.250077   [1.00149, 0.00648856, 0.00174172 , 0.0463024, 1.03606,
0.0276057, 0.0298159, 0.0354767, 1.02456, -0.316505, -3.49727, -2.08541]
AffineAngle: 1.10755
5   -0.249721   [0.99971, 0.00547798, 0.000958757, 0.0554109, 1.04294,
0.0331402, 0.0344129, 0.0411596 , 1.02832, -0.314855, -3.41268, -2.03434]
AffineAngle: 1.38363
6   -0.249311   [0.997829, 0.00467543, 0.000629973, 0.0650121, 1.04997,
0.0388355, 0.0360165, 0.0439492, 1.03059, -0.311053, -3.31774, -2.00645]
AffineAngle: 1.66807
7   -0.248521   [0.993907, 0.00241253, -2.73247e-05, 0.0742841, 1.0536,
0.0439349, 0.0329572, 0.0408682, 1.02943, -0.313593, -3.21902, -2.0155]
AffineAngle: 1.99161
8   -0.247406   [0.98865, -0.00126462, -0.000866601 , 0.0833841, 1.05646,
0.0493253, 0.0304648, 0.0387565, 1.02843, -0.327435, -3.12088, -2.01719]
AffineAngle: 2.35176
9   -0.246618   [0.983139, -0.00676055, -0.00280242, 0.0920158, 1.06051,
0.054348, 0.0307894, 0.0389575 , 1.02966, -0.363066, -3.02958, -2.00262]
AffineAngle: 2.74663
Result =
 Center X      = 118.815
 Center Y      = 112.61
 Center Z      = 77.8722
 Translation X = -0.363066
 Translation Y = -3.02958
 Translation Z = - 2.00262
 Iterations    = 10
 Metric value  = -0.246618
 Scale 1         = 1.11023
 Scale 2         = 1.00099
 Scale 3         = 0.964769
 Angle (degrees) = 2.74663
finalParameters[0.983139, -0.00676055 , -0.00280242, 0.0920158, 1.06051,
0.054348, 0.0307894, 0.0389575, 1.02966, -0.363066, -3.02958, -2.00262]
fixedImage->GetSpacing()[1.5, 1.5, 1.5]
fixedImage->>GetOrigin()[0, 0, 0]
movingImage->GetSpacing()[ 1.5, 1.5, 1.5]
movingImage->>GetOrigin()[0, 0, 0]
Abort (core dumped)

Thanks,
-Minjie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070215/156c1400/attachment.html


More information about the Insight-users mailing list