[vtkusers] vtkWarpVector/vtkGlyph3D array problem

Robby Aungst robert.aungst at gmail.com
Fri Dec 29 14:26:47 EST 2017


I’m still stuck on this. How can you get array data to survive being passed through vtkWarpVector? 

Thanks!

> On Dec 21, 2017, at 9:25 AM, Robby Aungst <robert.aungst at gmail.com> wrote:
> 
> I've attached a simple example that shows the issue. If you toggle between lines 46 and 47, you'll see that when warp isn't in the pipeline you end up with 3 different glyphs with 3 different colors, scaled by the distance to camera. If you introduce warp into the pipeline, you get an error that says "Turning indexing off; no data to index with". The warp vector did something to the glyphIndexes array that I don't understand and also lost the scalar data that was on polydata points.
> 
> It's possible that I'm just doing it wrong - all I'm after is to be able to warp the points but still be able to control the scaling/index/color of the glyphs. I'm using VTK 8.0.1 on Python 3.5. 
> 
> Thank you!
> 
>> On Thu, Dec 21, 2017 at 4:50 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> Robby,
>> 
>> If you can post a complete compilable C++  or Python example with a small dataset we can take a look.
>> 
>> Bill
>>> On Dec 20, 2017 10:42 PM, "Robby Aungst" <robert.aungst at gmail.com> wrote:
>>> Hello,
>>> 
>>> I'm having an issue where my end goal is to be able to have a set of warped points displaying a variety of glyphs with different colors and scales. I'm able to get it to work without the vtkWarpVector introduced to the pipeline, but as soon as that is introduced the array that I'm using for the indexes seems to no longer be found (as well as the scalar data), and the glyph defaults to the first in the set and no longer uses the scalar data for color. Is there something about vtkWarpVector where it doesn't pass along arrays?
>>> 
>>> My working pipeline is:
>>> 
>>> vtkPolyData->vtkExtractSelectedIds->vtkDistanceToCamera->vtkGlyph3D
>>> 
>>> I store a vtkIntArray on the vtkPolyData with self.pointSet.GetPointData().AddArray(indexArray) and then later use it on the vtkGlyph3D to set the indexes into my glyph table: self.glyph.SetInputArrayToProcess(0, 0, 0, 0, "indexes"). This works great, but when I change the pipeline to:
>>> 
>>> vtkPolyData->vtkExtractSelectedIds->vtkWarpVector->vtkDistanceToCamera->vtkGlyph3D
>>> 
>>> the vtkGlyph3D can no longer find the "indexes" array from the original polydata. It can still find the "DistanceToCamera" array which is used for the scale - I'm guessing because it gets created after the vtkWarpVector in the pipeline?
>>> 
>>> I don't think that vtkWarpVector is supposed to remove the arrays, so what's happening? Is there any other way to get the arrays to SetInputArrayToProcess? Or some other way to combine vtkWarpVector and vtkGlyph3D?
>>> 
>>> Thanks!
>>> 
>>> _______________________________________________
>>> Powered by www.kitware.com
>>> 
>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>> 
>>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>> 
>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>> 
>>> Follow this link to subscribe/unsubscribe:
>>> https://vtk.org/mailman/listinfo/vtkusers
>>> 
> 
> <glyph3d_example.py>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20171229/752c1344/attachment.html>


More information about the vtkusers mailing list