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

Add ReaderOptions and ReaderStreamedOptions #70

Merged
merged 5 commits into from
Jun 19, 2020

Conversation

nilgoyette
Copy link
Collaborator

  • Make InMemNiftiObject's methods privates
  • Make StreamedNiftiObject's methods privates
  • Remove the deprecated new_from_stream method
  • Apply one fix on header when requested
  • Fix all tests

Sorry, there was some automatic formatting when I saved (like in lib.rs). The other concerns I have at the moment are:

  • One can still read the complete image by creating a File, reading the header, then reading the volume. Should I block that? By making some methods pub crate in header.rs and volume/inmen.rs?
  • I don't want to block it too much because we want a way to read only the header without reading the complete image. We're already using this in our codebase. It's practical and much faster.
  • I separated the features in ReaderOptions and ReaderStreamedOptions to avoid repetitive names read_file_streamed/_rank/_pair/_pair_rank (I can at least remove the 'streamed' in all names. But it does create some code copy. If we ever add some general methods, like read_header, the code will be exactly the same. So, I'm not sure it was the right decision.

- Make InMemNiftiObject's methods privates
- Make StreamedNiftiObject's methods privates
- Remove the deprecated new_from_stream method
- Apply one fix on header when requested
- Fix all tests
Copy link
Owner

@Enet4 Enet4 left a comment

Choose a reason for hiding this comment

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

Thank you for working on this @nilgoyette. Please see the comments, the most important concerns are (1) whether to keep former public APIs and (2) document the concrete header fixes.

Copy link
Owner

@Enet4 Enet4 left a comment

Choose a reason for hiding this comment

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

👍 Thanks!

@Enet4 Enet4 merged commit cecb3c3 into Enet4:master Jun 19, 2020
@Enet4 Enet4 mentioned this pull request Jun 19, 2020
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