[vtkusers] Scaling glyphs[Scanned]
James C Robinson
j.robinson at kepler-systems.com
Thu Apr 21 12:15:21 EDT 2005
John,
Many thanks for your reply. Your solution will work (I think). I have made a
crude test and it behaves as desired. The subtlety is that, when one wants
an application that allows the toggling between two representations of a
vector field (scaled according to magnitude or not) the simple way is to
turn SetScaleModeToDataScalingOff). However, this leads to the behaviour
that wanted to avoid (source points outside the field being represented).
Using your approach means effectively that we leave the
SetScaleModeToDataScalingOn and when we want an orientation only
representation we set the clamping range to be very tiny (say
SetRange(0.0,minimum value). In this way all 0.0 magnitude vectors are not
represented and any others are shown the same size.
I hope this clarifies the clarification further. Again many thanks. It is
not necessary to always no the answer, but it really helps to know a
man/woman who does..
Jim
James C Robinson,
* 42 Rivergrove,
Glanmire,
Co. Cork,
Eire
' +353 21 4822028
+353 87 2393010
* jrobinson at eircom.net>
_____
From: John Platt [mailto:jcplatt at lineone.net]
Sent: 20 April 2005 20:56
To: j.robinson at kepler-systems.com
Cc: vtkusers at vtk.org
Subject: RE: [vtkusers] Scaling glyphs[Scanned]
Hi Jim,
Have you tried ClampingOn() with ScalingOn(). Data scales outside the clamp
range are reset to the range end points. The data scale is then normalized
to the range 0 - 1. All glyphs with a data scale less than the lower clamp
range are therefore mapped to zero. Provided data scaling is on
(SetScaleModeToDataScalingOn()), the composite scale factor,
DataScale*ScaleFactor will also be zero.
HTH
John.
-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of James C Robinson
Sent: 20 April 2005 13:46
To: Administrator
Cc: jcplatt at lineone.net
Subject: [vtkusers] Scaling glyphs[Scanned]
Dear all,
I am producing a set of glyphs using a vtkPlaneSource as the data points. It
works perfectly - when I have scaling on, the glyphs behave appropriately.
However, when I turn scaling off (whowing vector direction only) there are
glyphs placed even at points (on the vtkPlaneSource) that are outside the
body (therefore magnitude is implicitly zero).
I can Could anybody tell me if it is possible to have the glyphs eliminated
at points that are outside the field (or where the magnitude is zero - or
less than some threshold)?
Regards,
Jim
James C Robinson,
* 42 Rivergrove,
Glanmire,
Co. Cork,
Eire
' +353 21 4822028
+353 87 2393010
* jrobinson at eircom.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050421/f67ddc1c/attachment.htm>
More information about the vtkusers
mailing list