Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDF5 Read & Write #111

Merged
merged 55 commits into from
Nov 4, 2021
Merged

HDF5 Read & Write #111

merged 55 commits into from
Nov 4, 2021

Conversation

lauramurgatroyd
Copy link
Member

@lauramurgatroyd lauramurgatroyd commented May 4, 2021

  • Allows reading of HDF5 files to vtkImageData with HDF5Reader, and reading a cropped version of the image with RequestSubset
  • Allows writing of vtkImageData to HDF5 files with write_image_data_to_hdf5
  • Resampling of HDF5 with cilHDF5ImageResampleReader
  • Tests of the above

To do:

  • Test RequestSubset works when selecting a channel
  • Possibly rename methods
  • Add resample reader

@@ -946,29 +979,149 @@ def SetFileName(self, value):
def GetFileName(self):
return self.__FileName



class cilHDF5ImageResampleReader(cilBaseResampleReader):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only change to conversion.py that isn't just formatting is the addition of this cilHDF5ImageResampleReader class

@lauramurgatroyd
Copy link
Member Author

lauramurgatroyd commented Jun 14, 2021

Note:
I had to place the hdf5 methods into a new file hdf5_io. This was necessary to avoid circular imports.
The problem was that the cilHDF5ImageResampleReader reader lives with the other resample readers in conversion.py, and this class requires the use of HDF5Reader. Also the ImageDataCreator in io requires the ResampleReaders. So the hdf5 classes couldn't be placed in io.

@lauramurgatroyd lauramurgatroyd marked this pull request as ready for review June 14, 2021 09:09
@lauramurgatroyd
Copy link
Member Author

See #127 for improvements to structure of the resample reader

@lauramurgatroyd
Copy link
Member Author

lauramurgatroyd commented Oct 1, 2021

Once #150 is working and merged, can check that the HDF5 test runs with the gh-action, and then will merge this

@lauramurgatroyd
Copy link
Member Author

The unit tests pass locally but currently fail when run in the github action. Maybe there's a problem with writing the files?

@lauramurgatroyd
Copy link
Member Author

It is now fixed!

@lauramurgatroyd
Copy link
Member Author

Waiting on fix of #150, otherwise we agreed this was ready

@lauramurgatroyd lauramurgatroyd merged commit 2c00abf into master Nov 4, 2021
@lauramurgatroyd lauramurgatroyd mentioned this pull request Nov 8, 2021
@paskino paskino deleted the hdf5_read_write branch January 16, 2022 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants