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

Implement stream interface and testing #6

Merged
merged 12 commits into from
Aug 30, 2024

Conversation

AlexVCaron
Copy link
Contributor

There is much to say here, but TLDR the whole package is now fully tested, so I believe it does works at creating valid md5 from the Nifti.

There seems to be a lot going on (that's what OOP tends to do, especially in java), but it's mainly two new classes doing the same thing on different levels to keep it readable.

In the StreamUtil, you get the core stream data interface It gets you from the array data in the Nifti and Headers to bytestreams of even actual DataStreams that reprent doubles or integers.

In the NiftiStreamUtil, you get functions to unpack the NiftiVolume into the stream. Not much to say here, it's an adapter between StreamUtil and niftijio.

With that, in Methods, we get controlled streams of bytes from the header and the data to feed to an encoder that gets us the md5 in hexadecimal in a string representation. All of that without ever touching Locale or decoding anything into a charset.

@arnaudbore arnaudbore merged commit eb788ff into scilus:main Aug 30, 2024
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