Hello All,<br><br>I am trying to modify ImageRegistration9.cxx (2D affine using mean square difference as metric)<br>into 3D Affine using mutual information as metric. <br><br>I first modified the code to use mutual information as metric (still 2D), the code works fine.
<br><br>Then the program is switched to 3D image format. The
registration worked well (finishing all the iterations, <br>which is set at
10 to save test time) and produced meaningful final transform paramters, but it runs into error <br>(core dump)
when it reached the resample filter. <br><br>The error message is shown below. It seems to me the error happened at the resample filter. The affine 3D <br>code will be attached in my next email due to size limit of the mailing list.
<br><br>I wonder if anyone could help me with this problem. I am looking for 3D affine registration using Mutual <br>information for float format images. I appreciate if anyone can share his registration code with me. <br>
<br>
Thanks a lot,<br>Minjie <br><br>{minjie}172: ./ImageRegistration9 ../data/b0_strip.img
../data/EPI_target_strip.img ../data/output.img
<br>transform->GetNumberOfParameter<div id="mb_0">s() 12<br><div>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<br>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<br>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<br>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<br>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<br>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<br>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<br>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<br>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<br>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<br>Result =<br> Center X = 118.815<br> Center Y = 112.61<br> Center Z = 77.8722<br> Translation X = -0.363066<br> Translation Y = -3.02958<br>
Translation Z = -
2.00262<br> Iterations = 10<br> Metric value = -0.246618<br> Scale 1 = 1.11023<br> Scale 2 = 1.00099<br> Scale 3 = 0.964769<br> Angle (degrees) = 2.74663<br>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]<br>fixedImage->GetSpacing()[1.5, 1.5, 1.5]<br>fixedImage->>GetOrigin()[0, 0, 0]<br>movingImage->GetSpacing()[
1.5, 1.5, 1.5]<br>movingImage->>GetOrigin()[0, 0, 0]<br>Abort (core dumped)<br></div></div><br clear="all">Thanks,<br>-Minjie