[vtkusers] vtkDataSetMapper Coloring Question
krs
krs at uncc.edu
Thu Jul 7 09:18:31 EDT 2005
You need to build your own color lookuptable - there are several
examples under vtkColorLookupTable that shows you how to do this.
-- krs
........................................................................
........................................
Kalpathi Subramanian Ph: 704
687 8579
Dept. of Computer Science Fax: 704
687 3516
The Univ. of N. Carolina Email:
krs at uncc.edu Charlotte, NC
28223 Web: www.cs.uncc.edu/
~krs
On Jul 7, 2005, at 8:43 AM, Jeremy Stout wrote:
> I am using vtkDataSetMapper to help visualize a data set after putting
> it through a series of filters. As part of the visualization process,
> I am trying to color the dataset by a specific scalar array. That part
> is working pretty good for me. The only problem I am running into is
> that I want to flip the color spectrum on the lookup table the mapper
> is using so that blue represents the lower boundary of my scalar range
> and red is the upper range. At the moment, blue is representing the
> upper range and red the lower range. I've looked through the
> vtkLookupTable and vtkDataSetMapper APIs, but I haven't seen anything
> that will let me do what I am wanting. For what it is worth, here is
> the code I am using to setup the mapper (this is Java):
>
> vtkDataSet filteredDataSet;
>
> filteredDataSet = finalFilter.GetOutput();
> filteredDataSet.SetActiveScalars("void_fraction");
>
> dataSetMapper = new vtkDataSetMapper();
> dataSetMapper.SetInput(filteredDataSet);
> dataSetMapper.SetScalarModeToUsePointFieldData();
> dataSetMapper.SetScalarRange(0.0, 4800.0);
> dataSetMapper.SelectColorArray("void_fraction");
>
> I figure it is rather easy to swap the colors, but I am not seeing how
> to do it. Any help in this matter would be appreciated.
>
> Jeremy Stout
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the 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/20050707/50ec755e/attachment.htm>
More information about the vtkusers
mailing list