Skip to content

Commit

Permalink
fix: set cal_max in the NIfTI header for visualization after ``Intens…
Browse files Browse the repository at this point in the history
…ityClip``

Resolves: #877.
  • Loading branch information
oesteban committed Jun 22, 2024
1 parent 44814ec commit 2adfe19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions niworkflows/interfaces/nibabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,8 @@ def _advanced_clip(

hdr = img.header.copy()
hdr.set_data_dtype(dtype)
hdr["cal_max"] = data.max()

Check warning on line 727 in niworkflows/interfaces/nibabel.py

View check run for this annotation

Codecov / codecov/patch

niworkflows/interfaces/nibabel.py#L727

Added line #L727 was not covered by tests

img.__class__(data, img.affine, hdr).to_filename(out_file)

return str(out_file)
Expand Down

0 comments on commit 2adfe19

Please sign in to comment.