<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<br>I would like to make a 3D Affine image registration code, if there is none. I found a similar code in ImageRegistration9.cxx and would like to alter to make it applicable for 3D images. Are these the only changes needed or is there anything else that I need to make. <br>After Line#529, I dont know if there is anything to change.<br>Thanks,<br>
Ganesh<br><br>****<br>Line 146: const unsigned int Dimension = 3;<br><br>Line 285 to 290: Need to remove lines 289, 290 and add 6 more lines to make a (4x3) matrix for 3D images.<br> optimizerScales[4] = 1.0; optimizerScales[5] = 1.0;<br> optimizerScales[6] = 1.0; optimizerScales[7] = 1.0;<br> optimizerScales[8] = 1.0;<br> optimizerScales[9] = translationScale;<br> optimizerScales[10] = translationScale;<br> optimizerScales[11] = translationScale;<br><br>After line 395, add <br> const double finalRotationCenterZ=transform->GetCenter()[2];<br><br>After line 397, add <br> const double finalTranslationZ =finalParameters[6];<br><br>After line 408, add <br> std::cout << " Center Z = " << finalRotationCenterZ << std::endl;<br><br>After line 410, add <br> std::cout << " Translation Z = " << finalTranslationZ << std::endl; <br><br>Change line 418 into <br> vnl_matrix<double> p(3, 3);<br><br>After line 420 add<br> p[0][2] = (double) finalParameters[2]; p[1][0] = (double) finalParameters[3]; p[1][1] = (double) finalParameters[4];<br> p[1][2] = (double) finalParameters[5]; p[2][0] = (double) finalParameters[6]; p[2][1] = (double) finalParameters[7];<br>
p[2][2] = (double) finalParameters[8];<br><br><br>Change line 425 into <br> vnl_matrix<double> r(3, 3);<br><br>Add after line 432 <br> std::cout << " Scale 3 = " << svd.W(2)<< std::endl;<br><br><br>***<br><br><br><br>                                            <br /><hr />Hotmail: Trusted email with Microsoft’s powerful SPAM protection. <a href='http://clk.atdmt.com/GBL/go/201469226/direct/01/' target='_new'>Sign up now.</a></body>
</html>