Skip to content

Commit

Permalink
Merge pull request #878 from nipreps/fix/877
Browse files Browse the repository at this point in the history
FIX: Set cal_max in the NIfTI header for visualization after ``IntensityClip``
  • Loading branch information
oesteban authored Jun 22, 2024
2 parents 44814ec + 2adfe19 commit 1dc0327
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()

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

return str(out_file)
Expand Down

0 comments on commit 1dc0327

Please sign in to comment.