コード例 #1
0
 def __read_nii_file(self,path):
     temp_path = path[:-3]+"npy"
     if os.path.exists(temp_path)==True:
         if self.update==False:
             self.get_saved = True
             return np.load(temp_path)
     img = nib.load(path)
     img = np.array(img.dataobj[:,:,:])
     # print("*****")
     # print(img.shape,img.dtype)
     # print(img.min(),img.max())
     # print("*****")
     img = CutPadding.cut_img_3D(img)
     # print("*****")
     # print(img.shape,img.dtype)
     # print(img.min(),img.max())
     # print("*****")
     return img
コード例 #2
0
 def __cut_nii_file(self, img):
     return CutPadding.cut_img_3D(img)