[vtkusers] How to get smooth filled contours?

rakesh patil prakeshofficial at gmail.com
Thu Feb 24 03:35:39 EST 2011


Hello,

I use vtkDataSetSurfaceFilter to display filled contours. But it doesn't
produce the smooth contour as shown in the image below.

Following is my piece of code:

vtkSmartPointer<vtkThreshold> bthr = vtkSmartPointer<vtkThreshold>::New();
bthr->SetInputConnection( thr->GetOutputPort() );
bthr->ThresholdByLower( BAD_VALUE );

vtkSmartPointer<vtkDataSetSurfaceFilter> surfFilter =
vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
surfFilter->SetInputConnection( bthr->GetOutputPort() );

vtkSmartPointer<vtkPolyDataMapper> surfMapper =
vtkSmartPointer<vtkPolyDataMapper>::New();
surfMapper->SetInputConnection( surfFilter->GetOutputPort() );

fillActor = vtkActor::New();
fillActor->SetMapper( surfMapper );


Using the above code, I do get the filled contours but there is clear cut
difference between two different shades of colors. Not like the one shown in
the attachment. How can I get the output as shown in the attachment? Many be
use some sort of shaders??

Thanks in advance

Regards
Rakesh Patil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110224/ae5edd2d/attachment.htm>


More information about the vtkusers mailing list