Open lucywowen opened 6 years ago
for next release, change nifti get_slice method to something like this:
def get_slice(self, index): if len(self.shape)>3: if self.shape[3]==1: return nib.Nifti1Image(header=self.header, dataobj=np.squeeze(self.get_data()), affine=self.affine)
def get_slice(self, index):
if len(self.shape)>3:
if self.shape[3]==1:
return nib.Nifti1Image(header=self.header, dataobj=np.squeeze(self.get_data()), affine=self.affine)
for next release, change nifti get_slice method to something like this:
def get_slice(self, index):
if len(self.shape)>3:
if self.shape[3]==1:
return nib.Nifti1Image(header=self.header, dataobj=np.squeeze(self.get_data()), affine=self.affine)