[vtkusers] Scaling glyphs[Scanned]
James C Robinson
j.robinson at kepler-systems.com
Fri Apr 22 06:04:10 EDT 2005
John,
I wish I could get a copy of the tin... I am not the only one who feels that
VTK is underutilised because there isn't enough documentation. I have the
VTK book, but you simply won't get that kind of detail in it (go on - make
me out to be foolish by citing the page..). Even in the online documentation
there is only a cryptic indication of what the relationship between
ClampingOn and Scaling (everything is obvious in retrospect). The route that
the method names etc. indicate for toggling between direction only and
magnitude representation is the one I originally took. You have to admit
that it would take a deeper knowledge to figure out your (John
Biddiscombe's) elegant solution. Now, I have encountered before the attitude
that "nothing comes for free" and "you have to make the effort" - it is
almost "you have to pay your dues" philosophy. However, that leads to a lot
of replication of effort. The users group is good and sometimes one can be
successful in getting a solution (as I have just experienced) - but not
always (or even 50% of the time).
If there was somewhere to (easily) post the type of code I just wrote (the
three lines in my last e-mail) under the topic area of vtkGlyph3D with the
heading "Direction only vectors" or a number of indicative titles that would
allow an easy search - it would help us get mileage out of all our efforts.
This, of course, goes to "who organises it- on what site?" and then gets
into the area of Kitware's business model. I would pay a few hundred dollars
for a license for VTK to have such a service. I am a middle level user
(perhaps an overstatement of my knowledge and ability) which means I am
between the level whereby I can justify (need to) paying $1000s for support
(or development) or smart guys who have a very in-depth knowledge (and thus
need almost no support).
There is a wide range of level of user and VTK would be even more successful
if it was better documented so that medium level users (such as I might be)
can use what is in the tin to its full potential.
Regards,
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: 22 April 2005 09:08
To: j.robinson at kepler-systems.com
Cc: vtkusers at vtk.org
Subject: RE: [vtkusers] Scaling glyphs[Scanned]
Hi Jim,
Flattery will get you everywhere :-) but credit to John Biddiscombe -
vtkGlyph3D does just what it says on the tin!
John.
-----Original Message-----
From: James C Robinson [mailto:j.robinson at kepler-systems.com]
Sent: 21 April 2005 17:15
To: 'John Platt'
Cc: Vtk Users
Subject: RE: [vtkusers] Scaling glyphs[Scanned]
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/20050422/9beb3bbd/attachment.htm>
More information about the vtkusers
mailing list