<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>Hi Torsten,&nbsp;<div>Thanks once again for your patient email. Yes so I resampled the moving image to the fixed image space, with the output transformation matrix (my output transformation matrix is inverted) and I get the image in the expected co-ordinates of the fixed image.</div><div>So, I will apply this transformation (or the inverse) to the points in physical spaces of the images in order to take one to other or the way around, as you suggested.&nbsp;</div><div><br></div><div>One last thing that startles me as i mention before is the gap between the translation parameters, which intutively should be more, but I didn't write the registration routine so probably that is an issue I should find out by looking at the registration routine, how things are implemented there.&nbsp;</div><div><br></div><div>THANKS once again for all the help.. It was really helpful</div><div><br></div><div>Vikash</div><div><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; "><div style="font-family: 'Times New Roman'; font-size: medium; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif" size="3"></font></div></blockquote><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; " id="DWT324"></blockquote><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; " id="DWT326">
    <br>
    <br>
    <blockquote cite="mid:CALSm4EkC+hOq-Sb9rbmiD+Gb-8Dfv907VPiDxpSs9ZoRmXimyg@mail.gmail.com" style="font-weight: normal; ">
      <div><br>
      </div>
      <div>Here is an example,</div>
      <div><br>
      </div>
      <div>F_origin=[-120.0000 &nbsp; 78.6926 &nbsp;-15.5144] (output from
        fixedImage-&gt;GetOrigin())</div>
      <div>M_Origin=[-67.9766, 80.7186, -128.159] &nbsp;
        &nbsp;movingImage-&gt;GetOrigin()</div>
      <div><br>
      </div>
      <div>Now I believe these two points in the physical space also
        correspond to the respective voxels with Index =(0 0 0)</div>
    </blockquote>
    <br>
    I would agree with that.<br>
    <br></blockquote><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; ">
    <blockquote cite="mid:CALSm4EkC+hOq-Sb9rbmiD+Gb-8Dfv907VPiDxpSs9ZoRmXimyg@mail.gmail.com" style="font-weight: normal; ">
      <div><br>
      </div>
      <div>And on registration this is the transformation matrix I get</div>
      <div><br>
      </div>
      <div>#Insight Transform File V1.0</div>
      <div># Transform 0</div>
      <div>Transform: AffineTransform_double_3_3</div>
      <div>Parameters: 0.999985 0.00438959 -0.00335042 -0.00439659
        0.999988 -0.0020834 0.00334123 0.0020981 0.999992 0.187256
        0.905001 -0.172994</div>
      <div>FixedParameters: 0 0 0</div>
      <div><br>
      </div>
      <div>So, if you notice there is a huge gap in the origins of the
        two images which are not reflected in the translation (last 3
        terms of parameters) parameters of the transformation matrix. <br>
      </div>
    </blockquote>
    <br>
    Well, the first question here is - how do you initialize the affine
    registration? If you simply use the identity transformation, then
    you start with a zero translation, and it is possible that that gets
    you stuck in an unreasonable local optimum of the registration cost
    function. You could try using something like a <a class="el" href="http://www.itk.org/Doxygen42/html/classitk_1_1CenteredTransformInitializer.html" title="CenteredTransformInitializer is a helper class intended to
      initialize the center of rotation and the ..." target="_blank" style="font-weight: normal; ">CenteredTransformInitializer</a>
    object to initialize your transformation.<br>
    <br>
    Ultimately, though, you want to use ITK to reformat the moving image
    to the fixed image grid according to your transformation and see
    whether that gives you a reformatted moving image matching the fixed
    image. If yes, your transformation is okay and then you can try to
    interpret it. If no, you have a problem computing the transformation
    in the first place, and you need to fix that first.<br>
    <br>
    <blockquote cite="mid:CALSm4EkC+hOq-Sb9rbmiD+Gb-8Dfv907VPiDxpSs9ZoRmXimyg@mail.gmail.com" style="font-weight: normal; ">
      <div><br>
      </div>
      <div>So, how do i find the voxel correspondences between the two
        images. Could it be as simple as apply the transformation to the
        points in individual voxels of the moving image and calculate
        the correspong points in the physical space of the Fixed Image.
        ??</div>
    </blockquote>
    <br>
    Again - transformation is applied to points in the FIXED image,
    resulting in points in the MOVING image. I know this is
    counter-intuitive, but because you "pull back" the image information
    into the fixed grid when you reformat, images transform in the
    opposite direction as do, for example, point sets or other
    geometries.<br>
    <br>
    Hope this helps.<br>
    <br>
    TR<br>
  

<br>_____________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at<br>http://www.kitware.com/opensource/opensource.html<br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></blockquote><br><br><hr id="zwchr"><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; font-weight: normal; " id="DWT323"><blockquote cite="mid:CALSm4EkC+hOq-Sb9rbmiD+Gb-8Dfv907VPiDxpSs9ZoRmXimyg@mail.gmail.com"><b></b>
      <div style="font-weight: normal; ">Suppose I have a point in the Physical Space of the moving
        image and I want to find the corresponding point in the fixed
        image, given that I have the transformation, is it so that if I
        apply the transformation to this point in the moving image I
        will get the corresponding point in the fixed image, and the
        corresponding voxel ?</div>
    </blockquote>
    <br>
    No. <br>
    <br>
    You apply the transformation to a point in the fixed image and get
    the corresponding point in the moving image.</blockquote><br></div></div></body></html>