Data array multi-component labelling in VTKHDF for Paraview

Named components for xml based vtk files was discussed here in this post. Is there an equivalent support for VTKHDF files in paraview?

If I just add ComponentName attributes to the point or cell data in the hdf file like xml format, will it work? I didn’t see it menetioned in the documentation but may have missed it.

I see no calls to SetComponentName() in the reader, so my guess is that it is not supported yet.

Ok, great thanks for confirming that. Is there a way to overwrite within paraview so it doesn’t have to be done on each legend label every time you change the displayed variable?

It would be very handy if you could edit a table in the settings to set a new default name instead of 0-8.

This indeed look like a small oversight. This should be easy to add though.
Wdyt @Lucas_Givord ?

probably related to this issue https://gitlab.kitware.com/vtk/vtk/-/issues/19192

and indeed it should be easy to fix that

1 Like

@Lucas_Givord I think the issue you mentioned only covers the PointData and CellData attributes in vtkhdf but not the DataArray attributes? In an xml file you can give both to specify the active scalar vector, etc, but also can set attributes for the array such as name:

<PointData Scalars="temp" Vectors="force" Tensors="stress" Normals="normals">
        <DataArray Name="torque" NumberOfComponents="3" type="Float64" format="ascii" RangeMin="0.02079884965962986" RangeMax="0.9983199556809254" ComponentName1="xx" ComponentName2="yy" ComponentName3="zz">

In the xml case Paraview loads the component names striaght from the file which is very handy. Hopefully vtkhdf will eventually support all of these little features from the existing xml standard.

Lets create an issue to track that, wdyt @Lucas_Givord ?

I think the issue you mentioned only covers the PointData and CellData attributes in vtkhdf but not the DataArray attributes?

indeed, I open an issue here : https://gitlab.kitware.com/vtk/vtk/-/issues/19514

1 Like