<div dir="ltr"><div>Hi Seung-Goo,</div><div><br></div>Your question is really an ITK question, but I&#39;ll see if I can give it a shot.<div><br></div><div>The answer lies in the code for the base class for ITK affine transforms,</div>


<div>i.e. in itkMatrixOffsetTransformBase.hxx, specifically in the following</div><div>methods:</div><div><br></div><div>  SetParameters()</div><div>  SetFixedParameters()</div><div>  ComputeOffset()</div>
<div>  TransformPoint()</div><div><br></div><div> T = [</div><div> a b c o</div><div> d e f p</div><div> g h i q</div><div> 0 0 0 1</div><div> ]</div><div><br></div><div>
The &quot;o p q&quot; are the &quot;offset&quot;, which actually is not given in the file.  The</div><div>offset is computed from the 3x3 matrix (the first 9 parameters), from the</div><div>translation &quot;l m n&quot; (the last three parameters), and from the center &quot;x y z&quot;</div>

<div>(the three fixed parameters).   To see how this is done, look at the code</div><div>for ComputeOffset() itkMatrixOffsetTransformBase.hxx.  I&#39;m not going</div><div>to write out the math here in this email because chances are that I would</div>

<div>make a mistake.</div>
<div><br></div><div> - David</div><div><br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 1, 2013 at 5:14 AM, SG KIM <span dir="ltr">&lt;<a href="mailto:solleo@gmail.com" target="_blank">solleo@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>Dear ITK/VTK experts,</div>


<div><br></div><div>I have a question on the format of :itk: transformation file. </div><div><br></div><div>In such a text file for affine matrix (generated by ANTS):  </div><div><div><font face="courier new, monospace">#Insight Transform File V1.0</font></div>


<div><font face="courier new, monospace"># Transform 0</font></div><div><font face="courier new, monospace">Transform: MatrixOffsetTransformBase_double_3_3</font></div><div><font face="courier new, monospace">Parameters: a b c d e f g h i l m n</font></div>


<div><font face="courier new, monospace">FixedParameters: x y z</font></div></div><div><br></div><div>Does it mean a transformation matrix as</div><div><br></div><div><font face="Courier" size="4">T = [a b c x;</font></div>


<div><font face="Courier" size="4">     d e f y;</font></div><div><font face="Courier" size="4">     g h i z; </font></div><div><font face="Courier" size="4">     l m n 1]</font></div><div><br></div><div>in such that </div>


<div><span style="font-family:Courier;font-size:large">T * [x y z 1]^T = [x&#39;/s y&#39;/s z&#39;/s 1]^T</span></div><div>where [x,y,z] is original coordinates and [x/s&#39;, y&#39;/s, z&#39;/s] is transformed coordinate with s as global scaling factor?</div>


<div><br></div>or something else?<div><br></div><div><br></div><div>Best,</div></div><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">


<span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">


<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">


<div><font color="#919191">---</font></div><div><font color="#919191">Seung-Goo KIM </font></div></div></span></div></span><span style="color:rgb(145,145,145)"><div><span style="color:rgb(145,145,145)"><br></span></div>
PhD student</span><span style="text-align:-webkit-auto;text-indent:0px"><div style="word-wrap:break-word"><div><div><font color="#919191">Research group &quot;Cortical Networks and Cognitive Functions&quot;<br>Max Planck Institute for Human Cognitive and Brain Sciences<br>


Stephanstraße 1A, 04103 Leipzig, Germany</font></div></div></div></span></div></span></span>
</div>


</div><br></blockquote></div><br></div></div></div>