Fixed database typo and removed unnecessary class identifier.
This commit is contained in:
parent
00ad49a143
commit
45fb349a7d
5098 changed files with 952558 additions and 85 deletions
|
@ -0,0 +1,21 @@
|
|||
__all__ = ['imread', 'imsave']
|
||||
|
||||
try:
|
||||
import SimpleITK as sitk
|
||||
except ImportError:
|
||||
raise ImportError("SimpleITK could not be found. "
|
||||
"Please try "
|
||||
" easy_install SimpleITK "
|
||||
"or refer to "
|
||||
" http://simpleitk.org/ "
|
||||
"for further instructions.")
|
||||
|
||||
|
||||
def imread(fname):
|
||||
sitk_img = sitk.ReadImage(fname)
|
||||
return sitk.GetArrayFromImage(sitk_img)
|
||||
|
||||
|
||||
def imsave(fname, arr):
|
||||
sitk_img = sitk.GetImageFromArray(arr, isVector=True)
|
||||
sitk.WriteImage(sitk_img, fname)
|
Loading…
Add table
Add a link
Reference in a new issue