[vtkusers] Problem coloring the Iron Protein sample dataset
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Thu Nov 6 01:24:22 EST 2003
>>>>> "WRS" == William R Sherman <wsherman at ncsa.uiuc.edu> writes:
WRS> The problem is that I can't seem to affect the colormap used
WRS> for rendering cutting planes or the isosurface of the Iron
WRS> Protein example dataset -- even when the exact same code
WRS> works fine for two other example datasets (RectGrid2.vtk &
WRS> office.binary.vtk). Below is the TCL script that distills
WRS> what I'm trying to do. You can change the name of the
WRS> argument to the "SetFileName" method to compare the datasets.
WRS> One hypothesis is that the problem is a result of the fact
WRS> that ironProt.vtk is a StructuredPoints dataset, but there
WRS> must be a way to color such data.
That is because ironProt.vtk has its point data attributes stored as
unsigned_chars. These are interpreted by default as colors and not
scalars. To work around this try adding something like this to all
your mappers:
isoMapper SetColorModeToMapScalars
cheers,
prabhu
More information about the vtkusers
mailing list