def image_to_cortex(self, image,<EOL>surface='<STR_LIT>', hemi=None, affine=None, method=None, fill=<NUM_LIT:0>, dtype=None,<EOL>weights=None):
if hemi is None: hemi = '<STR_LIT>'<EOL>hemi = hemi.lower()<EOL>if hemi in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT:all>', '<STR_LIT>']:<EOL><INDENT>return tuple([self.image_to_cortex(image, surface=surface, hemi=h, affine=affine,<EOL>method=method, fill=fill, dtype=dtype, weights=weights)<EOL>for h in ['<STR_LIT>', '<STR_LIT>']])<EOL><DEDENT>else:<EOL><INDENT>hemi = getattr(self, hemi)<EOL>return hemi.from_image(image, surface=surface, affine=affine,<EOL>method=method, fill=fill, dtype=dtype, weights=weights,<EOL>native_to_vertex_matrix=self.native_to_vertex_matrix)<EOL><DEDENT>
sub.image_to_cortex(image) is equivalent to the tuple
  (sub.lh.from_image(image), sub.rh.from_image(image)).
sub.image_to_cortex(image, surface) uses the given surface (see also cortex.surface).