[vtkusers] Coloring of Iso-Surfaces (vtkContourFilter)
Sebastian Gatzka
sebastian.gatzka at stud.tu-darmstadt.de
Mon Mar 15 09:44:40 EDT 2010
Yes - that's it! Working!
Thank you!
Am 15.03.2010 14:39, schrieb Sebastien Jourdain:
> I forgot to say that binding a LUT to a mapper might not be enough,
> you have to set the Scalar range to the mapper as well.
> But at least, the LUT is properly set.
>
> scalarIsoSurfaceMapper->SetScalarRange( sGridPointData->GetOutput()->GetScalarRange()
> );
>
> Hope I did not forget something else... ;-)
>
> Seb
>
>
> On Mon, Mar 15, 2010 at 9:06 AM, Sebastian Gatzka
> <sebastian.gatzka at stud.tu-darmstadt.de
> <mailto:sebastian.gatzka at stud.tu-darmstadt.de>> wrote:
>
> Unfortunately not. All iso surfaces are still colored the same,
> when using the lookup table from the cutting plane.
>
>
> Am 15.03.2010 13:58, schrieb Sebastien Jourdain:
>> You have to do something like that
>>
>> scalarIsoSurfaceMapper->SetLookupTable( cuttingPlaneLUT );
>>
>> Therefore the mapper will color both outputs with the same color
>> manner.
>>
>> Seb
>>
>> On Mon, Mar 15, 2010 at 8:44 AM, Sebastian Gatzka
>> <sebastian.gatzka at stud.tu-darmstadt.de
>> <mailto:sebastian.gatzka at stud.tu-darmstadt.de>> wrote:
>>
>> 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
>>>
>>>
>>
>> _______________________________________________
>> 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
>>
>>
>
> _______________________________________________
> 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/c59c0020/attachment.htm>
More information about the vtkusers
mailing list