[vtkusers] Coloring of Iso-Surfaces (vtkContourFilter)

Sebastian Gatzka sebastian.gatzka at stud.tu-darmstadt.de
Mon Mar 15 08:44:16 EDT 2010


I have a lookuptable I use for a cutting plane, which is set up and 
displaying correctly.
Concerning the contour filter I did nothing with lookup tables. Just the 
code below.
Do I have to use one?

Am 15.03.2010 13:38, schrieb Sebastien Jourdain:
> Are you using the same lookuptable for all the outputs ? Did you set 
> the range properly to that lookuptable and mapper ?
>
> On Mon, Mar 15, 2010 at 7:14 AM, Sebastian Gatzka 
> <sebastian.gatzka at stud.tu-darmstadt.de 
> <mailto:sebastian.gatzka at stud.tu-darmstadt.de>> wrote:
>
>     No, still blue ...
>
>     Am 15.03.2010 11:41, schrieb David E DeMarle:
>>     scalarIsoSurface->ComputeScalarsOn();
>>
>>     On Mon, Mar 15, 2010 at 4:55 AM, Sebastian Gatzka
>>     <sebastian.gatzka at stud.tu-darmstadt.de>  <mailto:sebastian.gatzka at stud.tu-darmstadt.de>  wrote:
>>        
>>>     Hello world.
>>>
>>>     After I have finally found a way of making the vtkContourFilter work I'm now
>>>     facing how to color them.
>>>     I want to color them according to the value they are having.
>>>     Example: The cutting plane displays the "right" color for the scalar data,
>>>     but the iso-surfaces (contours) are colored identically.
>>>     Have a look at the screenshot in the attachment.
>>>
>>>     So, what do I have to do, to set up the right coloring?
>>>
>>>     Here is the code I am using to create the contours:
>>>
>>>     vtkContourFilter *scalarIsoSurface = vtkContourFilter::New();
>>>     scalarIsoSurface->SetInput(sGridPointData->GetOutput());
>>>     scalarIsoSurface->SetValue(0,3);
>>>     scalarIsoSurface->SetValue(1,5);
>>>     scalarIsoSurface->Update();
>>>
>>>     vtkPolyDataNormals *sGridPolyDataNormal = vtkPolyDataNormals::New();
>>>     sGridPolyDataNormal->SetInput(scalarIsoSurface->GetOutput());
>>>     sGridPolyDataNormal->Update();
>>>
>>>     vtkPolyDataMapper *scalarIsoSurfaceMapper = vtkPolyDataMapper::New();
>>>     scalarIsoSurfaceMapper->SetInput(sGridPolyDataNormal->GetOutput());
>>>     scalarIsoSurfaceMapper->Update();
>>>
>>>     vtkActor *scalarIsoSurfaceActor = vtkActor::New();
>>>     scalarIsoSurfaceActor->SetMapper(scalarIsoSurfaceMapper);
>>>
>>>     Have a nice day.
>>>     Sebastian
>>>
>>>
>>>     _______________________________________________
>>>     Powered bywww.kitware.com  <http://www.kitware.com>
>>>
>>>     Visit other Kitware open-source projects at
>>>     http://www.kitware.com/opensource/opensource.html
>>>
>>>     Please keep messages on-topic and check the VTK FAQ at:
>>>     http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>>     Follow this link to subscribe/unsubscribe:
>>>     http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>>          
>>        
>
>     _______________________________________________
>     Powered by www.kitware.com <http://www.kitware.com>
>
>     Visit other Kitware open-source projects at
>     http://www.kitware.com/opensource/opensource.html
>
>     Please keep messages on-topic and check the VTK FAQ at:
>     http://www.vtk.org/Wiki/VTK_FAQ
>
>     Follow this link to subscribe/unsubscribe:
>     http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100315/36484c83/attachment.htm>


More information about the vtkusers mailing list