Skip to content

Commit acd3644

Browse files
committed
MNT: Remove FileBasedImage.get_header
1 parent c903c81 commit acd3644

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

nibabel/filebasedimages.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from .filename_parser import (types_filenames, TypesFilenamesError,
1616
splitext_addext)
1717
from .openers import ImageOpener
18-
from .deprecated import deprecate_with_version
1918

2019

2120
class ImageFileError(Exception):
@@ -79,7 +78,6 @@ class FileBasedImage(object):
7978
8079
methods:
8180
82-
* get_header() (deprecated, use header property instead)
8381
* to_filename(fname) - writes data to filename(s) derived from
8482
``fname``, where the derivation may differ between formats.
8583
* to_file_map() - save image to files with which the image is already
@@ -208,15 +206,6 @@ def __getitem__(self, key):
208206
"""
209207
raise TypeError("Cannot slice image objects.")
210208

211-
@deprecate_with_version('get_header method is deprecated.\n'
212-
'Please use the ``img.header`` property '
213-
'instead.',
214-
'2.1', '4.0')
215-
def get_header(self):
216-
""" Get header from image
217-
"""
218-
return self.header
219-
220209
def get_filename(self):
221210
""" Fetch the image filename
222211

nibabel/tests/test_image_api.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,6 @@ def validate_header(self, imaker, params):
119119
with pytest.raises(AttributeError):
120120
img.header = hdr
121121

122-
def validate_header_deprecated(self, imaker, params):
123-
# Check deprecated header API
124-
img = imaker()
125-
with pytest.raises(ExpiredDeprecationError):
126-
hdr = img.get_header()
127-
128122
def validate_filenames(self, imaker, params):
129123
# Validate the filename, file_map interface
130124

0 commit comments

Comments
 (0)