[vtkusers] Fwd: Re: Glyph coloring by vector magnitud

Rakesh Patil rakeshthp at in.com
Fri Feb 26 07:08:06 EST 2010


 It should set the colors.. Tell me what type of grid are you using..?? And what is the vector array that you are setting to this Grid?? Original message From:Sebastian Gatzka< sebastian.gatzka at stud.tudarmstadt.de >Date: 26 Feb 10 15:23:25Subject:[vtkusers] Fwd: Re:Glyph coloring by vector magnitudTo: vtkusers at vtk.orgUnfortunately this does not work for me. Despite turning off the data scaling I can scale the glyphs from their magnitude, but not color them by their magnitude.vtkArrowSource *arrow = vtkArrowSource::New();vtkGlyph3D *glyph = vtkGlyph3D::New(); glyph>SetInput(gridCellCenters>GetOutput()); glyph>SetSourceConnection(arrow>GetOutputPort()); glyph>SetScaleMode(VTKSCALEBYVECTOR); glyph>SetColorMode(VTKCOLORBYVECTOR); glyph>SetScaleFactor(0.1);This code generates scaled but uniform colored vectors. Am 22.02.2010 16:33, schrieb Rakesh Patil:Its because you have turned of the scaling mode. When you say, SetScaleModeToDataScalingOff(), all glyphs are rendered of equal le
 ngth.In the next step, you are saying,SetColorModeToColorByScale();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 SetScaleModeToDataScalingOff()then, it should work fine..Seniors please correct me if i'm wrong..Good luckRegards Rakesh Patil  Original message  From:Sebastian Gatzka< sebastian.gatzka at stud.tudarmstadt.de > Date: 22 Feb 10 19:37:52 Subject: [vtkusers] Glyph coloring by vector magnitud To: vtkusers at vtk.orgHello World.Meanwhile I made some nice glyphs, but am stuck with the coloring. I switched on SetColorModeToColorByVector() which may be the coloring by vector magnitude?vtkGlyph3D *glyph vtkGlyph3D::New(); glyph>SetInput(gridCellCenters>GetOutput());glyph>SetSourceConnection(arrow>GetOutputPort()); glyph>SetScaleModeToDataScalingOff(); glyph>SetColorModeToColorByScale(); glyph>SetScaleFactor(0.3);Unfortunately all glyphs are colored the same (blue). Do I have to do anything fur
 ther to get propper coloring? Maybe with the mapper?See you. Sebastian 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100226/bd033362/attachment.htm>


More information about the vtkusers mailing list