MantisBT - ParaView
View Issue Details
0010129ParaViewBugpublic2010-01-12 16:252016-08-12 09:57
Eric Monson 
Utkarsh Ayachit 
normalminoralways
closedmoved 
Development 
 
0010129: XDMF Reader doesn't create vtkIdType arrays out of GlobalID attributes
The current Xdmf2 format supports AttributeType="GlobalID", but the reader doesn't really create a vtkIdTypeArray for ParaView when reading in these attributes -- it creates an int type, so ParaView can't really use this as a Global ID.

(This is at least true when reading "heavy data" from an HDF5 file -- I'm not sure what happens when the data is just specified within the .xmf file as XML data...)

In case it helps, I'm detailing what I see as the major issue, plus an outline of my own hacky solution in the Additional Information.
The reader, as it is implemented now within vtkXdmfHeavyData::ReadAttributes() gets a vtkDataArray back from ReadAttribute(), and then if it has XDMF_ATTRIBUTE_TYPE_GLOBALID it calls SetActiveGlobalIds on that array. This doesn't really do much since the vtkDataArray isn't a vtkIdType.

When vtkXdmfHeavyData::ReadAttribute() reads in the data from the HDF5 file, it creates the vtkDataArray using the vtkXdmfDataArray::FromXdmfArray() method. This is where the problem occurs. Since HDF5 doesn't natively support an "ID Type", when FromXdmfArray() calls vtkXdmfDataArray->GetNumberType(), IDs will always just look like integers, so some integer type of vtk array will be created and returned.

Since I couldn't figure out how to add a new ID number type to Xdmf, the way I solved this in my own modified Xdmf reader was a bit of a hack, but it worked: when the reader detected that an Xdmf attribute had ID type, ReadAttribute() would call vtkXdmfDataArray::FromXdmfIDArray(), which was basically a duplicate of FromXdmfArray(), but creating a vtkIdTypeArray if an integer type was detected (and giving an error for any other type).

I'm sure someone else could come up with a more elegant solution, but this worked fine when I tried it, showing idType in the ParaView Information tab.
No tags attached.
Issue History
2010-01-12 16:25Eric MonsonNew Issue
2011-07-12 14:29Utkarsh AyachitAssigned To => Utkarsh Ayachit
2011-07-12 14:29Utkarsh AyachitNote Added: 0026996
2011-07-12 14:29Utkarsh AyachitStatusexpired => backlog
2011-07-12 14:29Utkarsh AyachitResolutionopen => reopened
2016-08-12 09:57Kitware RobotNote Added: 0037766
2016-08-12 09:57Kitware RobotStatusbacklog => closed
2016-08-12 09:57Kitware RobotResolutionreopened => moved

Notes
(0026996)
Utkarsh Ayachit   
2011-07-12 14:29   
Reopening. This needs to be fixed.
(0037766)
Kitware Robot   
2016-08-12 09:57   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current ParaView Issues page linked in the banner at the top of this page.