[vtkusers] VOI extraction techniques

Valeria Gallo g_luigi at fastwebnet.it
Thu Mar 29 08:36:10 EDT 2007


Hi, 

I am developing a tool to extract VOI (Volume-Of-Interest) from volumes
(vtkImageData) directly in the 3D scene with VTK (5.1.0 version).

I'm using vtkRenderedAreaPicker to extract a frustum (a parallelepiped of
six faces) from the volume.

 

If the six frustum faces are orthogonal to the axes I can directly crop the
volume, simply setting the mapper:

 

vtkVolumeRayCastMapper *volumeRaycastMapper = vtkVolumeRayCastMapper::New();

volumeRaycastMapper->SetCroppingRegionPlanes(bounds);

 

where bounds are the (xmin,xmax,ymin,ymax,zmin,zmax) values of the
ClipPoints of the picker.

 

I have problems when the frustum faces are not orthogonal to the axes. In
this case I can use the vtkExtractSelectedFrustum class:

 

vtkExtractSelectedFrustum *extractor = vtkExtractSelectedFrustum::New();

extractor->SetInput(areaPicker->GetDataSet()); // areaPicker is of type
vtkRenderedAreaPicker

extractor->ExactTestOn();

extractor->SetFrustum(areaPicker->GetFrustum());

 

One way is to set:

 

extractor->PassThroughOff();

 

So I have a vtkUnstructuredGrid dataset in extractor->GetOutput() that
contains only the cells and points of the input that are inside the frustum.

I can render them with a vtkUnstructuredGridVolumeRayCastMapper (but I have
to apply a vtkDataSetTriangleFilter before).

In this way after the rendering process (very very long computation time),
to manipulate quickly the volume, I have to convert the dataset in a
vtkImageData using the vtkWindowToImageFilter.

This procedure appears to be too heavy, I'm sure there is another way to do
it. a way I'm still searching for.

 

I've tried also with the vtkGaussianSplatter and vtkShepardMethod to convert
the UnstructuredGrid dataset in a ImageData one, but in using them I loose
the details of the volume, whilst I want simply extract a region of the
original volume (preserving its topology and geometry)..

Any idea?

 

A second way to do it is to set:

 

extractor->PassThroughOn();

 

So in extractor->GetOutput() I have a vtkImageData dataset that is either a
shallow copy of the input dataset with two new "vtkInsidedness" attribute
arrays.

But I don't know actually how to set up the vtkVolumeRayCastMapper to render
only the cell and the points that are inside the frustum.

 

I hope this mail could help someone and I hope someone could help me to
continue my work.

 

Thanks

Valeria

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070329/4036a464/attachment.htm>


More information about the vtkusers mailing list