[Insight-users] vtkVRMLImporter

Kajo van der Marel kajo at invivonmr.uu.nl
Sat Apr 21 07:51:41 EDT 2007


Hi Martijn,

> I’m trying to import .wrl (CAD) data using the vtkVRMLImporter and 
> eventually convert it into an ITK scalar imagetype.
> 
> But I’m having problems with the usage of the vtk-importer, since it 
> doesn’t have a GetOuput-function.

It seems that the VTK importers read a whole scene from file into a 
vtkRenderer. You can either supply your own renderer or get the default 
from the importer. The datasets, camera's, actors and mappers are 
accessible from the renderer object.

There is a VTK example for the 3DS-importer that shows you how to use an 
importer. You should be able to get your vtkDataSet object (superclass 
for vtkPolyData, vtkImageData, vtkPointSet, etc.) from the renderer 
through GetActors()->[... select an actor ... ]->GetMapper()->GetInput()

Regards,

-- 
Kajo





More information about the Insight-users mailing list