[vtkusers] question regard transparency
Benjamin King
king.benjamin at mh-hannover.de
Wed Oct 22 08:18:28 EDT 2003
Hi Luke,
> I try to use vtk to generate brain contours from MRI scan image and try
> to make the brain surface transparent. But once I set the surface to
> transparent, there is some white matters apears in the scene. And I can
it's only a wild guess, but do you include a vtkDepthSortPolyData filter
somewhere in your pipeline? It may be that the contouring produces the
heavily folded surface correctly but the rendering looks funny because the
polygons aren't sorted prior to the rendering. This is (only) necessary for
partially transparent polydata.
> not make it transparent as well. See the picture in the attachment.
> Does anyone know how to eliminate those white materials?
If you want to get rid of smaller components that are not connected to the
largest, you can use vtkPolyDataConnectivityFilter.
> I have an idea which is to delete the polygons in the back. Is it
> feasible, and which filter should I use?
If by 'in the back' you mean all the polygons that are behind other ones,
why whould you use transparency then? But maybe I don't understand. Anyway,
take a look at vtkProperty::SetBackFaceCulling(int). I don't know if the
contouring process generates the normals you need for the culling, so you
might also need to apply the vtkPolyDataNormals filter first.
Hope it helps,
Benjamin
--
Benjamin King
Institut für Medizinische Informatik
Medizinische Hochschule Hannover
Tel.: +49 511 532-2663
More information about the vtkusers
mailing list