In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [1]:
from PIL import Image
import numpy as np
import scipy.misc
import nibabel as nb
from ndreg import *
In [2]:
import os
In [3]:
!ls -lh Aut1367.nii
In [4]:
inImg = imgRead('Aut1367.nii')
imgShow(inImg, vmax = 500)
In [ ]:
type(inImg)
print np.asarray(inImg).shape
In [5]:
inArray = sitk.GetArrayFromImage(inImg)
In [6]:
print inArray.shape
print type(inArray)
In [8]:
plane = 0;
for plane in (0,1,2,3):
output = inArray[plane]
## Save as TIFF
scipy.misc.toimage(output).save('sample' + str(plane) + '.tiff')
In [ ]:
In [ ]:
In [ ]:
In [ ]: