Skip to content

Commit

Permalink
ENH: Add get_norm_zooms for MGHHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Dec 20, 2017
1 parent d66dc77 commit 976eace
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nibabel/freesurfer/mghformat.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,15 @@ def set_zooms(self, zooms):
if len(zooms) == 4:
hdr['tr'] = zooms[3]

def get_norm_zooms(self, raise_unknown=False):
''' Get zooms in mm/s units '''
zooms = self.get_zooms()

if len(zooms) == 4:
zooms = zooms[:3] + (zooms[3] / 1000)

return zooms

def get_data_shape(self):
''' Get shape of data
'''
Expand Down

0 comments on commit 976eace

Please sign in to comment.