[Insight-users] Demons Deformable Registration and Paraview

Tim Bhatnagar tim.bhatnagar at gmail.com
Wed Dec 18 10:51:17 EST 2013


Thanks so much for this, Brian.

I have no doubt that the ITK manual has the same content, but your
explanation clarified the process for me.

Much appreciated!

Tim

On Monday, December 9, 2013, brian avants wrote:

> Tim
>
> We can tell you with absolute certainty that all deformable mappings in
> ITKv4, by default, map the moving image into the fixed image space.  This
> is achieved by, as Hans said, pulling ... i.e. identifying vectors *in the
> fixed space* that "point at" the moving image space.  This *pulls* the
> moving image into the fixed image configuration.  If you think of this as
> mapping points, then this same field would *push* points from the fixed
> image space to the moving image space.  The point would then identify its
> new intensity, from the moving image, and then come back to its original
> position in the fixed space.  This is what WarpImageFilter does.
>
>
> brian
>
>
>
>
> On Mon, Dec 9, 2013 at 11:54 AM, Tim Bhatnagar <tim.bhatnagar at gmail.com>wrote:
>
> Hey Yago,
>
> Thanks for the work you did for me!
>
> For my work, it's not the actual visualization that I can't achieve.. it's
> not being able to know (for certain) which 'direction' my displacement
> field maps my data.
>
> BUT, you don't seem to do any 'scaling' of your deformation field before
> you visualize it in Paraview.. so is it safe to say that the
> displacementfield.vtk file I output from my registration process, will be
> visualized correctly (no need to 'flip' axes, etc) in Paraview? Even
> knowing that for sure would definitely help!
>
> Also, did you just generate a deformation field, or is it a result of a
> registration process?
>
> Thanks so much!
>
> Tim
>
>
> On Mon, Dec 9, 2013 at 8:42 AM, Yago Diez <yagodiezdonoso at gmail.com>wrote:
>
>
> Tim,
>
> I did a small test visualizing 2D deformation fields in paraview, I used
> .vtk files but .mhd files should also work fine.
>
> You can use paraview 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).
>
> Mainly you have to:
>
> 1) open the file with paraview
> 2) Open a calculator with the following formula:
>
> scalars_X*iHat+scalars_Y*jHat+0*kHat
>
> 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
>
> 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.
>
> Hope this helps
>  Yago
>
>
> On Sun, Dec 8, 2013 at 6:07 AM, Matt McCormick <matt.mccormick at kitware.com
> > wrote:
>
> Hi Tim,
>
> On Sat, Dec 7, 2013 at 11:36 PM, Tim Bhatnagar <tim.bhatnagar at gmail.com>
> wrote:
> > Hey Matt,
> >
> > Sorry to re-visit this specific email... in your message, you said:
> >
> > "The displacement fields output of ITK's deformable image registration
> > represent the displacement of a point in the FixedImage to a point in
> > the MovingImage.  Therefore overlaying the displacement field vector
> > glyphs on the FixedImage should give the correct visualization.  The
> > start of the arrow sits on its location in the input FixedImage, and
> > the tip of the arrow glyphs are directed towards where a given pixel
> > in the FixedImage will move to in the MovingImage."
> >
> > However, in the Demons examples that are built with the ITK package, an
> > 'output' image from the registration is produced by passing the
> movingImage
> > into the WarpImageFilter, and utilizing the newly created deformation
> field.
> > This makes it seem like the deformation field actually takes the
> movingImage
> > form into the fixedImage form, not the other way around.
>
> Yes, it is true that the WarpImageFilter takes the movingImage and
> transforms it to the fixedImage space.  Different perspectives could
> be taken on what is moving or how it is moving, but all of the above
> is correct.
>
> Hope this helps,
> Matt
> _____________________________________
> Powered by <http://www.kitware.com>
>
>

-- 
Tim Bhatnagar
PhD Candidate
Orthopaedic Injury Biomechanics Group
Department of Mechanical Engineering
University of British Columbia

Rm 5000 - 818 West 10th Ave.
Vancouver, BC
Canada
V5Z 1M9

Ph: (604) 675-8845
Fax: (604) 675-8820
Web: oibg.mech.ubc.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20131218/e9e1a978/attachment.htm>


More information about the Insight-users mailing list