[vtkusers] Automatically configure scalar range for mappers

Francesco Argese kekko84 at gmail.com
Wed Jul 16 09:08:32 EDT 2014


Hello,

I'm new to vtk and I'm having a problem already asked on this forum
but that has never received a response. The previous related posts are
the folowing:
- http://www.vtk.org/pipermail/vtkusers/2012-June/074840.html
- http://public.kitware.com/pipermail/vtkusers/2002-January/009488.html

In my case I have a lsdyna fem analysis loaded correctly through Vtk
that I like to color selecting a particular property (for example
velocity or acceleration) specified in it.

At the moment I'm able to show something similar to what ParaView
display for the model except for the range. If I set statically the
range that I have found with ParaView on a specified model I see the
same colours but I don't know how to calculate the range for a generic
model.

I have tried the following:
- using actor->GetMapper()->GetInput()->GetPointData()->GetArray(id)
to retrieve parameters  related to a property (I think it could be
right because GetName on the array give me the right property name): I
calculated a range but the max is different from that calculated in
ParaView and colours are not so useful. Could it be possible that the
array I'm using is wrong? Or is there some other scaling operation on
those parameters?
- Getting range through GetRange() function but it also don't do me
the same results of ParaView.

Considering that in ParaView there is something similar I think it
could be possible to do so.

Have someone any suggestion to try resolving?

Thanks in advance,
Francesco Argese


More information about the vtkusers mailing list