From a95870fe5cd8ed9e27238f81bb83235a173fa7e5 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauldmccarthy@gmail.com> Date: Thu, 12 Dec 2019 10:23:35 +0000 Subject: [PATCH] RF: Don't use nibabel get_data method --- fsl/data/mghimage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fsl/data/mghimage.py b/fsl/data/mghimage.py index a143e06ce..be29b5cad 100644 --- a/fsl/data/mghimage.py +++ b/fsl/data/mghimage.py @@ -12,6 +12,7 @@ Freesurfer ``mgh``/``mgz`` image files. import os.path as op import six +import numpy as np import nibabel as nib import fsl.utils.path as fslpath @@ -54,7 +55,7 @@ class MGHImage(fslimage.Image): name = 'MGH image' filename = None - data = image.get_data() + data = np.asanyarray(image.dataobj) xform = image.affine vox2surf = image.header.get_vox2ras_tkr() -- GitLab