[vtkusers] How to get smooth filled contours?

rakesh patil prakeshofficial at gmail.com
Thu Feb 24 04:22:28 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/19319d36/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cont.PNG
Type: image/png
Size: 79981 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110224/19319d36/attachment.png>


More information about the vtkusers mailing list