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

Fix HDF5 cropped reader #462

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

DanicaSTFC
Copy link
Collaborator

@DanicaSTFC DanicaSTFC commented Feb 26, 2025

Describe your changes

  • Added missing brackets
  • Fixed extent problem in the reader
  • Delete useless print

Describe any testing you have performed

Consider adding example code to examples
I tested this on the idvc app, in the registration tab we crop the image.

Link relevant issues

Checklist when you are ready to request a review

  • I have performed a self-review of my code
  • I have added docstrings in line with the guidance in the CIL developer guide
  • I have implemented unit tests that cover any new or modified functionality
  • CHANGELOG.md has been updated with any functionality change
  • Request review from all relevant developers
  • Change pull request label to 'waiting for review'

Contribution Notes

  • The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in CILViewer (the Work) under the terms and conditions of the Apache-2.0 License
  • I confirm that the contribution does not violate any intellectual property rights of third parties

Qt contributions should follow Qt naming conventions i.e. camelCase method names.

VTK contributions should follow VTK naming conventions i.e. PascalCase method names.

@DanicaSTFC DanicaSTFC added this to the Version 25.0.0 milestone Feb 26, 2025
@DanicaSTFC DanicaSTFC self-assigned this Feb 26, 2025
@DanicaSTFC DanicaSTFC requested a review from paskino February 26, 2025 17:22
@DanicaSTFC DanicaSTFC marked this pull request as ready for review February 26, 2025 17:23
reader = HDF5SubsetReader()
reader.SetInputConnection(full_reader.GetOutputPort())
# Either the TargetExtent or TargetZExtent should have been set.
# We prioritise the TargetExtent
if self.GetTargetExtent() is None:
extent = [0, -1, 0, -1, self.GetTargetZExtent[0], self.GetTargetZExtent[1]]
extent = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should actually use the extent rather than the dimensions, but it should be fine for the time being. Maybe we should later add an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

cilHDF5CroppedReader does not work
2 participants