Skip to content

Commit 1c2f9fd

Browse files
committed
ENH: Add get_norm_zooms for MGHHeader
1 parent c487382 commit 1c2f9fd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

nibabel/freesurfer/mghformat.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,15 @@ def set_zooms(self, zooms):
287287
''.format(zooms[3]))
288288
hdr['tr'] = zooms[3]
289289

290+
def get_norm_zooms(self, raise_unknown=False):
291+
''' Get zooms in mm/s units '''
292+
zooms = self.get_zooms()
293+
294+
if len(zooms) == 4:
295+
zooms = zooms[:3] + (zooms[3] / 1000,)
296+
297+
return zooms
298+
290299
def get_data_shape(self):
291300
''' Get shape of data
292301
'''

0 commit comments

Comments
 (0)