[vtkusers] Reading ITK Deformation Field in VTK

Sajendra N sajendra at gmail.com
Tue May 13 11:21:22 EDT 2008


Luis to answer your questions:

a) The deformation field was generated from a Demons registration.

b) BSplines was not used.

c) The fixed and moving images have the same origin, spacing, and
extents. There are arbitrary user defined points that I would want to
map either from the moving image coordinate system into the fixed
image coordinate system or vice-versa.

d) I determine that the points mapped using VTK are wrong because they
do not agree with the same points mapped using ITK. The points mapped
through ITK agree very closely with what I "expect" given thatI know
what the points represent. I am only mapping points when I have the
problem I mentioned, not warping images, so I have not loaded any
images into ParaView.

e) As I mentioned, I am not using Paraview. I am using ITK 3.2.0 and VTK 5.0.2

I solved my immediate problem by doing everything in ITK, it would be
nice to be able to map the points in VTK when needed as the API is
sometimes more convenient and has support for inverting the transform
when needed.

-Sajendra

On Mon, May 12, 2008 at 6:22 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
>  Hi Sajendra,
>
>
>  a) From what type of ITK Deformable registration did you
>    generate this deformation field ?
>
>    (e.g. Demons ?, FEM ?, BSplines ?)
>
>
>  b) If it was from using BSplines,
>    did you used a Bulk transform ?
>
>
>  c) The points that you are transforming, are they located
>    in the coordinate system of the Fixed image ?
>    and are you trying to map them to the coordinate
>    system of the moving image ?
>
>
>  d) What is your frame of reference for determining that
>    the mapped points are wrong ?  have you loaded one of
>    the images into ParaView ? Does this image has an origin
>    different from Zero ?
>
>
>  e) What specific version of ParaView are you using ?
>
>
>    Please let us know,
>
>
>       Luis
>
>
>  ----------------
>
>
>  Sajendra N wrote:
>
> > Hi everyone,
> >
> > After performing a deformable registration using ITK, I saved the
> > resulting deformation field to disk in MetaImage format using
> > itkImageFileWriter.
> > I later read the deformation field from disk into VTK using
> > vtkMetaImageReader and set that as the input to a vtkGridTransform
> > which I use to transform points, however the point locations after
> > transformation are wrong.
> > If I do everything in ITK (reading the metaimage file, transforming
> > points), I get the correct transformation.
> > At least part of the problem was the the "POSITION" tag was not
> > written in the header, it was written as "OFFSET" instead. I fixed
> > that manually but I am still having problems.
> > Is there a further incompatibility in the file formats? I am hoping
> > someone has done this successfully in the past and had some ideas.
> > I can provide sample data and code to reproduce the issue, but the
> > data set might be rather large.
> >
> > Thank you,
> > Sajendra
> >
> >
>



-- 
Écrasez l'infâme!



More information about the vtkusers mailing list