Skip to content

Commit

Permalink
nibabel import
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Feb 12, 2023
1 parent c99f887 commit 71c6f95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fileformats/medimage/nifti.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import nibabel
from fileformats.generic import File
from fileformats.core import mark
from fileformats.core.mixin import (
Expand All @@ -14,10 +13,12 @@ class Nifti(NeuroImage):
ext = ".nii"

def load_metadata(self):
import nibabel
return dict(nibabel.load(self.fspath).header)

@property
def data_array(self):
import nibabel
return nibabel.load(self.fspath).get_data()

@property
Expand Down

0 comments on commit 71c6f95

Please sign in to comment.