Skip to content
Snippets Groups Projects
Commit 6be5e641 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Image.save method stub.

parent 74a85b87
No related branches found
No related tags found
No related merge requests found
......@@ -610,8 +610,22 @@ class Image(Nifti1, notifier.Notifier):
def save(self, filename=None):
"""Saves this ``Image`` to the specifed file, or the :attr:`dataSource`
if ``filename`` is ``None``.
"""
if self.__dataSource is None and filename is None:
raise ValueError('A file name must be specified')
if filename is None:
filename = self.__dataSource
log.debug('Saving {} to {}'.format(self.name, filename))
raise NotImplementedError()
# TODO Update self.__dataSource if necessary
def __getitem__(self, sliceobj):
"""Access the image data with the specified ``sliceobj``.
......
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