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] Raw encoded NRRDs parse correctly #229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions io/parserNRRD.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,15 @@ X.parserNRRD.prototype.parse = function(container, object, data, flag) {
// here we start the unzipping and get a typed Uint8Array back
var inflate = new Zlib.Gunzip(new Uint8Array(_data));
_data = inflate.decompress();
// .. let's use the underlying array buffer
_data = _data.buffer;
}
// .. let's use the underlying array buffer
_data = _data.buffer;
else
{
// If the data is raw, get the array buffer of only the data.
_data = _data.buffer.slice(_data_start);
}

var MRI = {
data : null,
min : Infinity,
Expand Down