Skip to content

get_slice for nifti subclass for 4D to 3D image #190

Description

@lucywowen

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions