<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">Tim,<br><div><br>I did a small test visualizing 2D deformation fields in <span>paraview</span>, I used .vtk files but .mhd files should also work fine.<br><br>You can use <span>paraview</span> to visualize deformation fields.  You have a description on how to do this in the 8.15 section of the itk guide (Visualizing Deformation fields).<br>
<br>Mainly you have to:<br><br>1) open the file with paraview<br>
2) Open a calculator with the following formula: <br>
<br>scalars_X*iHat+scalars_Y*jHat+0*kHat<br><div><br>The idea here is to
 obtain a 3D vector with z component =0 and the other components the 
deformation components. For 3D you probably want to represent all 
components using something like (not tested!) -> 
scalars_X*iHat+scalars_Y*jHat+scalars_Z*kHat<br>
<br>3) In order to visualize this, you have to use a "gliph", here you 
can control the number of points that you represent and so on, you 
obtain something like the "campDefDemons" attached file.<br></div><br><div class="gmail_extra"></div><div class="gmail_extra">Hope this helps<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra">
Yago<br></div></font></span><div><div class="h5"><div class="gmail_extra">
<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 8, 2013 at 6:07 AM, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Tim,<br>
<div><br>
On Sat, Dec 7, 2013 at 11:36 PM, Tim Bhatnagar <<a href="mailto:tim.bhatnagar@gmail.com" target="_blank">tim.bhatnagar@gmail.com</a>> wrote:<br>
> Hey Matt,<br>
><br>
> Sorry to re-visit this specific email... in your message, you said:<br>
><br>
> "The displacement fields output of ITK's deformable image registration<br>
> represent the displacement of a point in the FixedImage to a point in<br>
> the MovingImage.  Therefore overlaying the displacement field vector<br>
> glyphs on the FixedImage should give the correct visualization.  The<br>
> start of the arrow sits on its location in the input FixedImage, and<br>
> the tip of the arrow glyphs are directed towards where a given pixel<br>
> in the FixedImage will move to in the MovingImage."<br>
><br>
> However, in the Demons examples that are built with the ITK package, an<br>
> 'output' image from the registration is produced by passing the movingImage<br>
> into the WarpImageFilter, and utilizing the newly created deformation field.<br>
> This makes it seem like the deformation field actually takes the movingImage<br>
> form into the fixedImage form, not the other way around.<br>
<br>
</div>Yes, it is true that the WarpImageFilter takes the movingImage and<br>
transforms it to the fixedImage space.  Different perspectives could<br>
be taken on what is moving or how it is moving, but all of the above<br>
is correct.<br>
<br>
Hope this helps,<br>
Matt<br>
<div><div>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br></div></div></div></div></div>
</div><br></div>