Skip to content

Commit

Permalink
Merge pull request #23 from rii-mango/rordenlab-master
Browse files Browse the repository at this point in the history
Rordenlab master
  • Loading branch information
hanayik authored Mar 17, 2023
2 parents d1893ab + 9d0a55b commit 01675ae
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nifti-reader-js",
"version": "0.6.1",
"version": "0.6.2",
"description": "A JavaScript NIfTI file format reader.",
"main": "src/nifti.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion release/current/nifti-reader-min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions release/current/nifti-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4769,7 +4769,8 @@ nifti.isCompressed = function (data) {
* @returns {ArrayBuffer}
*/
nifti.decompress = function (data) {
return fflate.decompressSync(new Uint8Array(data)).buffer;
const decompressed = fflate.decompressSync(new Uint8Array(data)).buffer;
return decompressed
};


Expand Down Expand Up @@ -5117,7 +5118,7 @@ nifti.NIFTI1.prototype.readHeader = function (data) {
// Added by znshje on 27/11/2021
//
/* See: https://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1.h */
if (this.qform_code > 0) {
if ((this.qform_code > 0) && (this.sform_code < this.qform_code)) {
// METHOD 2 (used when qform_code > 0, which should be the "normal" case):
// ---------------------------------------------------------------------
// The (x,y,z) coordinates are given by the pixdim[] scales, a rotation
Expand Down
2 changes: 1 addition & 1 deletion src/nifti1.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ nifti.NIFTI1.prototype.readHeader = function (data) {
// Added by znshje on 27/11/2021
//
/* See: https://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1.h */
if (this.qform_code > 0) {
if ((this.qform_code > 0) && (this.sform_code < this.qform_code)) {
// METHOD 2 (used when qform_code > 0, which should be the "normal" case):
// ---------------------------------------------------------------------
// The (x,y,z) coordinates are given by the pixdim[] scales, a rotation
Expand Down

0 comments on commit 01675ae

Please sign in to comment.