Skip to content

Commit

Permalink
Added a get_raw_image function to get the full NiFTI image
Browse files Browse the repository at this point in the history
  • Loading branch information
emzcoffey committed Oct 19, 2014
1 parent 2fafa8c commit 2053245
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/ImageReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ def get_image(self,imagefile):
img = nibabel.load(os.path.join(self.sourcedir,imagefile))

return img.get_data()

def get_raw_image(self,imagefile):
""" Returns a data structure with the voxel contents """

# Load an image and convert it to an array
img = nibabel.load(os.path.join(self.sourcedir,imagefile))

return img

def mask_image(self,imagefile, maskfile):
"""
Expand Down

0 comments on commit 2053245

Please sign in to comment.