Skip to content

Commit 2adfe19

Browse files
committed
fix: set cal_max in the NIfTI header for visualization after IntensityClip
Resolves: #877.
1 parent 44814ec commit 2adfe19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

niworkflows/interfaces/nibabel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,8 @@ def _advanced_clip(
724724

725725
hdr = img.header.copy()
726726
hdr.set_data_dtype(dtype)
727+
hdr["cal_max"] = data.max()
728+
727729
img.__class__(data, img.affine, hdr).to_filename(out_file)
728730

729731
return str(out_file)

0 commit comments

Comments
 (0)