@staticmethod<EOL><INDENT>def load_images(name, path):<DEDENT>
ims = {}<EOL>mgh_images = Subject.load_mgh_images(name, path)<EOL>def _make_imm_mask(arr, val, eq=True):<EOL><INDENT>arr = (arr == val) if eq else (arr != val)<EOL>arr.setflags(write=False)<EOL>return fsmgh.MGHImage(arr, mgh_images['<STR_LIT>'].affine, mgh_images['<STR_LIT>'].header)<EOL><DEDENT>ims['<STR_LIT>']  = lambda:_make_imm_mask(mgh_images['<STR_LIT>'].get_data(), <NUM_LIT:3>)<EOL>ims['<STR_LIT>'] = lambda:_make_imm_mask(mgh_images['<STR_LIT>'].get_data(), <NUM_LIT:2>)<EOL>ims['<STR_LIT>']  = lambda:_make_imm_mask(mgh_images['<STR_LIT>'].get_data(), <NUM_LIT>)<EOL>ims['<STR_LIT>'] = lambda:_make_imm_mask(mgh_images['<STR_LIT>'].get_data(), <NUM_LIT>)<EOL>ims['<STR_LIT>']    = lambda:_make_imm_mask(mgh_images['<STR_LIT>'].get_data(), <NUM_LIT:0>, False)<EOL>def _make_accessor(nm): return lambda:mgh_images[nm]<EOL>for (tname, name) in zip(['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'],<EOL>['<STR_LIT>',     '<STR_LIT>',       '<STR_LIT>',         '<STR_LIT>']):<EOL><INDENT>ims[tname] = _make_accessor(name)<EOL><DEDENT>for k in six.iterkeys(mgh_images):<EOL><INDENT>if k in Subject._auto_retino_names:<EOL><INDENT>tr = Subject._auto_retino_names[k]<EOL>ims[tr] = _make_accessor(k)<EOL><DEDENT><DEDENT>return pimms.lazy_map(ims)<EOL>
Subject.load_images(name, path) yields a persistent map of MRImages tracked by the given
  subject sub; in freesurfer subjects these are renamed and converted from their typical
  freesurfer filenames (such as 'ribbon') to forms that conform to the neuropythy naming
  conventions (such as 'gray_mask'). To access data by their original names, use the
  Subject.load_mgh_images() function.