<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
<font size="-1"><font face="Helvetica, Arial, sans-serif">Unfortunately
this does not work for me.<br>
Despite turning off the data scaling I can scale the glyphs from their
magnitude, but not color them by their magnitude.<br>
<br>
vtkArrowSource *arrow = vtkArrowSource::New();<br>
<br>
vtkGlyph3D *glyph = vtkGlyph3D::New();<br>
glyph->SetInput(gridCellCenters->GetOutput()); <br>
glyph->SetSourceConnection(arrow->GetOutputPort());<br>
glyph->SetScaleMode(VTK_SCALE_BY_VECTOR);<br>
glyph->SetColorMode(VTK_COLOR_BY_VECTOR);<br>
glyph->SetScaleFactor(0.1);<br>
<br>
This code generates <b>scaled but uniform colored</b> vectors.<br>
<br>
</font></font><br>
Am 22.02.2010 16:33, schrieb Rakesh Patil:
<blockquote
cite="mid:1266852829.211ed78fe91938b90f84a51944b08d5a@mail.in.com"
type="cite"> Its because you have turned of the scaling mode. When you
say, SetScaleModeToDataScalingOff(), all glyphs are rendered of equal
length.<br>
<br>
In the next step, you are saying,<br>
<br>
SetColorModeToColorByScale();<br>
<br>
you'll see that all the glyphs are of same scale. Thus, all glyphs are
rendered with same color. I think, Once you comment or remove <br>
<br>
SetScaleModeToDataScalingOff()<br>
<br>
then, it should work fine..<br>
<br>
Seniors please correct me if i'm wrong..<br>
<br>
Good luck<br>
<br>
Regards<br>
Rakesh Patil<br>
<font size="-1"><font face="Helvetica, Arial, sans-serif"><font
face="Courier New, Courier, monospace"><br>
<br>
</font></font></font><br>
<blockquote><br>
---------- Original message ----------<br>
From:Sebastian Gatzka< <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:sebastian.gatzka@stud.tu-darmstadt.de">sebastian.gatzka@stud.tu-darmstadt.de</a>
><br>
Date: 22 Feb 10 19:37:52<br>
Subject: [vtkusers] Glyph coloring by vector magnitud<br>
To: <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
<br>
<font size="-1"><font face="Helvetica, Arial, sans-serif">Hello
World.<br>
<br>
Meanwhile I made some nice glyphs, but am stuck with the coloring.<br>
I switched on SetColorModeToColorByVector() which may be the coloring
by vector magnitude?<br>
<br>
<font face="Courier New, Courier, monospace">vtkGlyph3D *glyph
vtkGlyph3D::New();<br>
glyph->SetInput(gridCellCenters->GetOutput()); <br>
glyph->SetSourceConnection(arrow->GetOutputPort());<br>
glyph->SetScaleModeToDataScalingOff();<br>
glyph->SetColorModeToColorByScale();<br>
glyph->SetScaleFactor(0.3);</font><br>
<br>
Unfortunately all glyphs are colored the same (blue).<br>
Do I have to do anything further to get propper coloring? Maybe with
the mapper?<br>
<br>
See you. Sebastian<br>
</font></font> </blockquote>
</blockquote>
</body>
</html>