Visualize arrays stored in h5

I know that hdf5 is just a container as discussed in here , however I think it can be a greate feature to have some kind of option to display 3d arrays in 3D slicer. The format is widely used in the machine learning community and I find my self duplicating data to common formats just to visualize it. As an example, there is also the xdmf format which can read the data array from h5 files and which can be visualized in paraview. Would it be difficult to add support for this?
Otherwise, is it possible to make a python pluggin for this purpose; if so what would be an example to start with?


Hi Roger -

Sure, that sounds pretty useful and doable in a few lines of python. I believe you can easily get a numpy array with contents of the h5 file and you can populate a vtkMRMLScalarVolumeNode with the data.

1 Like