[Insight-users] ITK image origin & VTK world origin
Frederic Perez
fredericpcx at gmail.com
Wed Apr 13 05:04:50 EDT 2005
Hello again, Andres,
On 4/12/05, Andres Munarriz <munarriz.a at gmail.com> wrote:
> Hi Frederic,
>
> Would you please elaborate on each of the terms involved in your
> transformation and how to obtain them? I'm not very skillfull in
> either vtk nor itk.
Here we go. We've got a MetaImage file containing a CT scan. Our
goal is to segment a certain anatomical structure by means of a
command-line program using a region growing filter from ITK 2.0.0.
That particular filter expects a seed point from which the segmented
region will grow. We use the method
"void SetSeed(const IndexType &seed)"---thus we need to provide
an index.
Now, in order to provide that seed we first visualize the MetaImage
file with an interactive application on top of VTK 4.4. We use
vtkImagePlaneWidget objects to query the contents of the file, and
to obtain a seed index (i_vtk, j_vtk, k_vtk).
Finally, providing that tuple (i_vtk, j_vtk, k_vtk) to SeedSeed didn't
yield the expected results. Fortunately we found that substituting
j_vtk by "imgSize[1] - j_vtk - 1" (imgSize[1] being the second
component of the size of the image) we obtained what we expected.
Notice that mapping from ITK indices to VTK indices is easy too
(isolate j_vtk): j_vtk = imgSize[1] - j_itk - 1.
I don't know if this is applicable to your particular problem.
I apologize if this is not the case.
Cheers,
Frederic Perez
More information about the Insight-users
mailing list