[Insight-users] Display ITK models in VTK
Luis Ibanez
luis.ibanez@kitware.com
Tue, 04 Mar 2003 10:57:10 -0500
Hi Gavin,
There is a huge need for ITK/VTK mesh
conversors and/or adaptors...
At this point the easiest way to go is to convert
ITK image to VTK images using the adaptors:
itkImageToVTKImage
Available in
InsightApplications/Auxiliary/vtk
As far as the ITK to VTK mesh conversion, you may
have to follow the example in vtk2itk.cxx in the
same directory.
It is much harder to generalize an ITK/VTK mesh
converter because the itk::Mesh is extremly flexible.
As far as the SpatialObject goes, the CADDLab group
directed by Dr. Stephen Aylward at UNC have developed
generic viewers for Spatial Objects. They can manage
VTK, OpenGL and OpenInventor (AFAIK).
You may want to contact them at
http://caddlab.rad.unc.edu/
Please let us know if you have further questions.
Thanks
Luis
--------------------------------
Gavin Baker wrote:
> Hello,
>
> I am working on some code for model-based segmentation (or model-image
> registration), and have found the examples and software guide most
> useful. Thanks enormously Luis!
>
> What I would like to know is how best to integrate VTK into an ITK
> application to visualise both models/meshes as well as volumes/images.
>
> I know that I can use itk::VTKImageExport to connect the output of an
> ITK pipeline to display the image in VTK. However this will only
> display the processed volume or image data. I would also like to
> superimpose the model or mesh onto the volume, ideally during
> processing to show the progress.
>
> So I guess the question becomes:: how can I display itk::Mesh or
> itk::SpatialObjects in VTK alongside images from VTKImageExport?
>
> Presumably I would have to create geomtric objects in VTK (such as
> lines, curves, etc) corresponding to the ITK classes. But this raises
> all sorts of other questions; which class is responsible for creating
> them? How would updates of the 'view' be made based on the 'model'
> changing shape/parameters? etc.
>
> I would be most grateful for any information...
>
> Thanks-
>
> :: Gavin
>