Skip to content

Commit 976eace

Browse files
committed
ENH: Add get_norm_zooms for MGHHeader
1 parent d66dc77 commit 976eace

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

nibabel/freesurfer/mghformat.py

+9
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,15 @@ def set_zooms(self, zooms):
282282
if len(zooms) == 4:
283283
hdr['tr'] = zooms[3]
284284

285+
def get_norm_zooms(self, raise_unknown=False):
286+
''' Get zooms in mm/s units '''
287+
zooms = self.get_zooms()
288+
289+
if len(zooms) == 4:
290+
zooms = zooms[:3] + (zooms[3] / 1000)
291+
292+
return zooms
293+
285294
def get_data_shape(self):
286295
''' Get shape of data
287296
'''

0 commit comments

Comments
 (0)