Coloring different contours
Felix Mayr <[email protected]> Tue, 15 Jan 2019 17:52:52 +0100
| Newsgroups | gmane.comp.lib.vtk.user |
|---|---|
| Message-ID | <[email protected]> |
Dear vtkusers,
I'm trying to set different colors for different contour values. To this
end I'm creating a vtkColorTransferFunction():
lut = vtkColorTransferFunction()
# repeated for all the isovalues
lut.AddRGBPoint(isovalue, r, g, b)
lut.build()
Yielding something like:
vtkColorTransferFunction (0x41a0d10)
Debug: Off
Modified Time: 282517
Reference Count: 1
Registered Events: (none)
Alpha: 1
VectorMode: Component
VectorComponent: 0
VectorSize: -1
IndexedLookup: OFF
AnnotatedValues: 0 entries.
Size: 1
Clamping: On
Color Space: RGB
Scale: Linear
Range: 0.0001 to 0.0001
AllowDuplicateScalars: 0
NanColor: 0.5, 0, 0
BelowRangeColor: (0, 0, 0)
UseBelowRangeColor: OFF
ABoveRangeColor: (1, 1, 1)
UseAboveRangeColor: OFF
0 X: 0.0001 R: 1 G: 1 B: 1 Sharpness: 0 Midpoint: 0.5
I then use SetLookupTable on a preexisting vtkActor, where the
vtkPolyDataMapper of the pipeline is configured with
SetScalarVisibilityOn. For one color this works great. Unfortunately
once I add a second one, everything gets still colored the same. Does
anyone spot any error?
Felix Mayr
<[email protected]>
Technical University of Munich, Simulation of Nanosystems for Energy
Conversion [www.sne.ei.tum.de]
_______________________________________________
Powered by 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
Search the list archives at: http://markmail.org/search/?q=vtkusers
Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers