[vtkusers] vtkWarpVector/vtkGlyph3D array problem

Robby Aungst robert.aungst at gmail.com
Tue Jan 23 12:04:17 EST 2018


As an update, I ended up figuring this out. Because I didn't yet have any
vectors set on my polydata, vtkWarpVector escaped before it got to the code
that copies the arrays over. This occurs at line 219 of
https://gitlab.kitware.com/vtk/vtk/blob/master/Filters/General/vtkWarpVector.cxx.
The copying would have occured at lines 244-246.

 My workaround was to set the vectors as all zeros, and then update them
later if I wanted to warp them.

Thanks for all the help.

On Fri, Jan 5, 2018 at 9:48 AM, Robby Aungst <robert.aungst at gmail.com>
wrote:

> Here's what it looks like after I create the poly data:
>
> vtkPolyData (000000000FB4D290)
>   Debug: Off
>   Modified Time: 18815
>   Reference Count: 1
>   Registered Events: (none)
>   Information: 000000000FB3EDD0
>   Data Released: False
>   Global Release Data: Off
>   UpdateTime: 0
>   Field Data:
>     Debug: Off
>     Modified Time: 18719
>     Reference Count: 1
>     Registered Events: (none)
>     Number Of Arrays: 0
>     Number Of Components: 0
>     Number Of Tuples: 0
>   Number Of Points: 19
>   Number Of Cells: 0
>   Cell Data:
>     Debug: Off
>     Modified Time: 18811
>     Reference Count: 1
>     Registered Events:
>       Registered Observers:
>         vtkObserver (000000000FAFB950)
>           Event: 33
>           EventName: ModifiedEvent
>           Command: 000000000FB3ECE0
>           Priority: 0
>           Tag: 1
>     Number Of Arrays: 1
>     Array 0 name = objtypes2
>     Number Of Components: 1
>     Number Of Tuples: 19
>     Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
>     Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
>     Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
>     Scalars: (none)
>     Vectors: (none)
>     Normals: (none)
>     TCoords: (none)
>     Tensors: (none)
>     GlobalIds: (none)
>     PedigreeIds: (none)
>     EdgeFlag: (none)
>   Point Data:
>     Debug: Off
>     Modified Time: 18814
>     Reference Count: 1
>     Registered Events:
>       Registered Observers:
>         vtkObserver (000000000FAFBB30)
>           Event: 33
>           EventName: ModifiedEvent
>           Command: 000000000FB3ECE0
>           Priority: 0
>           Tag: 1
>     Number Of Arrays: 2
>     Array 0 name = objtypes
>     Array 1 name = ZeroDColors
>     Number Of Components: 4
>     Number Of Tuples: 19
>     Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
>     Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
>     Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
>     Scalars:
>       Debug: Off
>       Modified Time: 18771
>       Reference Count: 2
>       Registered Events: (none)
>       Name: ZeroDColors
>       Data type: unsigned char
>       Size: 93
>       MaxId: 56
>       NumberOfComponents: 3
>       Information: 000000000FB3ED80
>         Debug: Off
>         Modified Time: 18770
>         Reference Count: 1
>         Registered Events: (none)
>       Name: ZeroDColors
>       Number Of Components: 3
>       Number Of Tuples: 19
>       Size: 93
>       MaxId: 56
>       LookupTable: (none)
>     Vectors: (none)
>     Normals: (none)
>     TCoords: (none)
>     Tensors: (none)
>     GlobalIds: (none)
>     PedigreeIds: (none)
>     EdgeFlag: (none)
>   Bounds:
>     Xmin,Xmax: (-485.801, 63.3056)
>     Ymin,Ymax: (-54.0469, 53.9257)
>     Zmin,Zmax: (23.6906, 163.528)
>   Compute Time: 21365
>   Number Of Points: 19
>   Point Coordinates: 000000000FAED710
>   Locator: 0000000000000000
>   Number Of Vertices: 0
>   Number Of Lines: 0
>   Number Of Polygons: 0
>   Number Of Triangle Strips: 0
>   Number Of Pieces: 1
>   Piece: -1
>   Ghost Level: 0
>
> Here's what it looks like after it passes through the vtkWarpVector (it's
> now an unstructured grid instead of poly data, and the arrays are now
> missing):
>
> vtkWarpVector (000000000AAFAAB0)
>   Debug: Off
>   Modified Time: 21598
>   Reference Count: 2
>   Registered Events: (none)
>   Executive: 000000000A2DBCD0
>   ErrorCode: No error
>   Information: 000000000F697940
>   AbortExecute: Off
>   Progress: 1
>   Progress Text: (None)
>   Scale Factor: 10
>
>
> vtkUnstructuredGrid (000000000FD7C8A0)
>   Debug: Off
>   Modified Time: 21553
>   Reference Count: 2
>   Registered Events: (none)
>   Information: 000000000FB43920
>   Data Released: False
>   Global Release Data: Off
>   UpdateTime: 21561
>   Field Data:
>     Debug: Off
>     Modified Time: 21543
>     Reference Count: 1
>     Registered Events: (none)
>     Number Of Arrays: 0
>     Number Of Components: 0
>     Number Of Tuples: 0
>   Number Of Points: 0
>   Number Of Cells: 0
>   Cell Data:
>     Debug: Off
>     Modified Time: 21551
>     Reference Count: 1
>     Registered Events:
>       Registered Observers:
>         vtkObserver (000000000FD856E0)
>           Event: 33
>           EventName: ModifiedEvent
>           Command: 000000000FB43AB0
>           Priority: 0
>           Tag: 1
>     Number Of Arrays: 0
>     Number Of Components: 0
>     Number Of Tuples: 0
>     Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
>     Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
>     Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
>     Scalars: (none)
>     Vectors: (none)
>     Normals: (none)
>     TCoords: (none)
>     Tensors: (none)
>     GlobalIds: (none)
>     PedigreeIds: (none)
>     EdgeFlag: (none)
>   Point Data:
>     Debug: Off
>     Modified Time: 21553
>     Reference Count: 1
>     Registered Events:
>       Registered Observers:
>         vtkObserver (000000000FD858F0)
>           Event: 33
>           EventName: ModifiedEvent
>           Command: 000000000FB43AB0
>           Priority: 0
>           Tag: 1
>     Number Of Arrays: 0
>     Number Of Components: 0
>     Number Of Tuples: 0
>     Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
>     Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
>     Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
>     Scalars: (none)
>     Vectors: (none)
>     Normals: (none)
>     TCoords: (none)
>     Tensors: (none)
>     GlobalIds: (none)
>     PedigreeIds: (none)
>     EdgeFlag: (none)
>   Bounds:
>     Xmin,Xmax: (1, -1)
>     Ymin,Ymax: (1, -1)
>     Zmin,Zmax: (1, -1)
>   Compute Time: 0
>   Number Of Points: 0
>   Point Coordinates: 0000000000000000
>   Locator: 0000000000000000
>   Number Of Pieces: 1
>   Piece: 0
>   Ghost Level: 0
>
> I posted a simple example earlier in the thread that replicates the
> behavior I'm seeing. Thanks for your help!
>
>
> On Fri, Jan 5, 2018 at 3:44 AM, Charles Kind <charles.kind at bristol.ac.uk>
> wrote:
>
>> Robby,
>>
>> Could you print to console, or whatever, the datastructure before and
>> after
>> WarpVectors and let me see them? ie In Python I just use
>> print(datastructure).
>>
>> Charlie
>>
>>
>>
>> --
>> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
>> _______________________________________________
>> 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180123/4d62088f/attachment.html>


More information about the vtkusers mailing list