[Paraview] Manually set UGrid point IDs for time-series plotting?

Eric Monson emonson at cs.duke.edu
Fri Jan 11 15:42:58 EST 2008


Hey Dave,

Did you ever get a chance to look into this possible bug in  
vtkXMLUnstructuredGridReader?

If I use that reader in Python, I can see that (as in ParaView) the  
GlobalIds have been set for my unstructured grid point data, but they  
are "int" type.

Today I was able to use the Python Programmable Filter within ParaView  
to read those "int" GlobalIds into a vtkIdTypeArray and (after a  
shallow copy of the input) set the filter output GlobalIds to this new  
array. After this, all the Global ID stuff seems to work fine, so I  
think it really is an issue with the reader.

Sorry I'm not experienced enough to take a look at the reader myself.
-Eric


On Dec 20, 2007, at 2:25 PM, David E DeMarle wrote:

> Sounds like a bug in the vtkXMLUnstructuredGridReader. Perhaps it  was
> not updated to use vtkIdTypes. I will try to reproduce the bug and
> look into it.
>
> On 12/20/07, Eric Monson <emonson at cs.duke.edu> wrote:
>> Hey Dave,
>>
>> I have now been able to successfully use the SetGlobalIds() method  
>> for
>> my vtkUnstructuredGrid PointData, but there seem to be some issues
>> with reading the *.vtu files into ParaView properly.
>>
>> ParaView recognizes that there are Global Ids set (the Use Global Ids
>> check box becomes available in both the Plot Point Over Time and the
>> Selection Inspector), but they don't seem to be valid for some  
>> reason.
>> For example, when points are selected, the Selection Inspector shows
>> the Index for the points, but if you check Use Global Ids the list
>> goes blank (and plotting using these Global Ids doesn't work, and in
>> the Selection Inspector if you try to uncheck Use Global Ids,  
>> ParaView
>> crashes).
>>
>> ExodusII files seem to work fine in all these cases, but not VTK XML
>> Unstructured Grids. If I save either box.ex2 or can.ex2 as a vtu  
>> file,
>> then reload it, PV behaves just like with my data. (In case it helps,
>> I noticed that the global IDs' Data Type are listed for ex2 files as
>> "idtype", while they are listed as "int" for an unstructured grid
>> loaded from a vtu file.)
>>
>> Any clues as to where the problem might lie (me, VTK, ParaView...)?
>>
>> Thanks,
>> -Eric
>>
>>
>> On Dec 13, 2007, at 11:04 AM, David E DeMarle wrote:
>>
>>> Hello,
>>>
>>> vtkDataSetAttributes::SetGlobalIds(vtkDataArray*da) will flag the
>>> array of ids as "the ids" and then the plot over time filters will  
>>> be
>>> able to use them instead of using the index into the cell/point
>>> arrays.
>>>
>>> hth,
>>> Dave DeMarle
>>>
>>> On 12/13/07, Eric Monson <emonson at cs.duke.edu> wrote:
>>>> Hello,
>>>>
>>>> I'm wondering if there is any way of manually setting point ID  
>>>> values
>>>> within a vtkUnstructuredGrid? (I'm using Python to populate a UGrid
>>>> from HDF5 data and then writing to *.vtu and *.pvd files for  
>>>> multiple
>>>> time steps.)
>>>>
>>>> I'm visualizing a time series of points diffusing in a space, where
>>>> some particles appear and disappear over time. This presents a
>>>> problem
>>>> when I want to plot with Extract Points Over Time, because the  
>>>> point
>>>> "index" that ParaView sees isn't consistent (doesn't correspond  
>>>> to a
>>>> single particle) over the whole time series.
>>>>
>>>> I have a scalar array of IDs associated with the point data,  
>>>> which I
>>>> successfully use with John Biddiscombe's Temporal Trails Filter
>>>> (since
>>>> it has an option for using a scalar array for ID), but I don't know
>>>> how to use that same info for XY plotting.
>>>>
>>>> I see that the ExodusII reader puts some global ID info into a
>>>> vtkModelMetadata object and packs it into the UGrid field data.
>>>> (Then,
>>>> I'm guessing that the Extract Points Over Time might be able to  
>>>> sense
>>>> this and "un-grey" the Use Global Ids check box...?) Is there any
>>>> other way (besides using a vtkExodusIIReader) to do the equivalent
>>>> process, such that the info will be viewable by the plotting
>>>> routines?
>>>>
>>>> Thanks a lot,
>>>> -Eric
>>>>
>>>> -----------------------------------------------------
>>>> Eric E. Monson
>>>> Duke Visualization Technology Group
>>>>
>>>>
>>>> _______________________________________________
>>>> ParaView mailing list
>>>> ParaView at paraview.org
>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>
>>
>>



More information about the ParaView mailing list