Skip to content
Snippets Groups Projects
Commit 0e2f5e88 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

Put is4DImage back, but deprecate it

parent 522c4ed4
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,7 @@ import string ...@@ -38,6 +38,7 @@ import string
import logging import logging
import six import six
import deprecation
import numpy as np import numpy as np
import nibabel as nib import nibabel as nib
...@@ -458,6 +459,14 @@ class Nifti(notifier.Notifier): ...@@ -458,6 +459,14 @@ class Nifti(notifier.Notifier):
return len(self.__shape) return len(self.__shape)
@deprecation.deprecated(deprecated_in='1.1.0',
removed_in='1.2.0',
details='Use ndims instead')
def is4DImage(self):
"""Returns ``True`` if this image is 4D, ``False`` otherwise. """
return len(self.__shape) > 3 and self.__shape[3] > 1
def getXFormCode(self, code=None): def getXFormCode(self, code=None):
"""This method returns the code contained in the NIFTI header, """This method returns the code contained in the NIFTI header,
indicating the space to which the (transformed) image is oriented. indicating the space to which the (transformed) image is oriented.
......
six==1.* six==1.*
deprecation=1.*
numpy==1.* numpy==1.*
nibabel==2.* nibabel==2.*
indexed_gzip==0.3.* indexed_gzip==0.3.*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment