TomographicImaging / CILViewer

A simple Viewer for 3D data built with VTK
Apache License 2.0
8 stars 6 forks source link

Convert HDF5 attributes to a dict before returning #325

Closed lauramurgatroyd closed 1 year ago

lauramurgatroyd commented 1 year ago

What happens at the moment is that the attributes are returned and then the file is closed. This then means the attributes aren't accessible: if I try to read the attributes, they are returned as type: <Attributes of closed HDF5 object>, and then if I try to print the keys I get an error:

ValueError: Invalid dataset identifier (invalid dataset identifier)

Changing to return the attributes as a dict resolves this issue and allows me to access the attributes items