[vtkusers] append colour polydata triangle mesh to greyscale triangle mesh..
karthik.krishnan at kitware.com
Mon Jun 7 03:52:45 EDT 2010
Your best bet is to separate the scalar ranges and use a custom lookup
table, as you've already pointed out below.
If you are familiar enough with creating your own classes in VTK, you could
go for a more elegant solution : Add a boolean data-array attribute
indicating if the data is grayscale or doppler. Then subclass from
vtkLookupTable, and override the method "MapScalarsThroughTable2" so as to
be able to set the appropriate color based on whether the grayscale bit is
set or not. See vtkLookupTableWithEnabling as an example; it looks up an
"Enabled" array to gray-out output colors based on whether the given value
in EnabledArray is "0" or not.
On Sat, Jun 5, 2010 at 10:18 PM, Gordon Stevenson <
gordon.stevenson at lmh.ox.ac.uk> wrote:
> I have two meshes created by using vtkProbeFilter a segmentation of a 3D
> volume of an ultrasound volume, one with the greyscale data and one with the
> Doppler data, I'd like to combine the two meshes into one (the dimensions
> and spacings of the meshes are different), the only problem being that the
> scalar values for the two meshes are the same (unsigned char -> 0..255) .
> What would be the best solution to be able to create a mesh that has both
> greyscale values and color values?
> I thought of two methods -- nudging the color values above the current
> 0->255 range, and create a lookuptable or colortransferfunction that takes
> this into account.
> Some way of indicating the point is a color or greyscale point and coloring
> appropriately... although I'm not sure about how to implement this.
> Would the usergroup have any ideas or tips as how to get going?
> Any help would be appreciated,
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the VTK FAQ at:
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers