Skip to content

Commit

Permalink
add test for int16 crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Korbinian Eckstein committed Sep 25, 2022
1 parent e5f778b commit d0f660a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Binary file added test/data/small/int16.nii
Binary file not shown.
7 changes: 7 additions & 0 deletions test/niftihandling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ mag_nii = readmag(fn_mag; rescale=true)
fn_mag_gz = "data/small/Mag.nii.gz"
@test all(readmag(fn_mag_gz) .== readmag(fn_mag))

# Test int16 rescale
fn_int16 = "data/small/int16.nii"
int16_nii = readmag(fn_int16)
int16_nii[:]
int16p_nii = readphase(fn_int16)
int16p_nii[:]

function header_test(hdr, hdr2)
@test hdr.scl_inter == 0
@test hdr.scl_slope == 1
Expand Down

2 comments on commit d0f660a

@korbinian90
Copy link
Owner

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/68925

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.6 -m "<description of version>" d0f660a2d4043577abec067e176082ef3c1642bd
git push origin v1.0.6

Please sign in to comment.