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

Oops forgot to add a setter method for image metadata. Related fix in

DicomImage
parent 78ca0151
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ class DicomImage(fslimage.Image): ...@@ -67,7 +67,7 @@ class DicomImage(fslimage.Image):
if metadata is not None: if metadata is not None:
for k, v in metadata.items(): for k, v in metadata.items():
self.addMeta(k, v) self.setMeta(k, v)
@property @property
......
...@@ -174,6 +174,7 @@ class Nifti(notifier.Notifier): ...@@ -174,6 +174,7 @@ class Nifti(notifier.Notifier):
metaValues metaValues
metaItems metaItems
getMeta getMeta
setMeta
**Notification** **Notification**
...@@ -713,6 +714,12 @@ class Nifti(notifier.Notifier): ...@@ -713,6 +714,12 @@ class Nifti(notifier.Notifier):
return self.__meta.get(*args, **kwargs) return self.__meta.get(*args, **kwargs)
def setMeta(self, *args, **kwargs):
"""Add some metadata with the specified key (``dict.__setitem__``).
"""
self.__meta.__setitem__(*args, **kwargs)
class Image(Nifti): class Image(Nifti):
"""Class which represents a NIFTI image. Internally, the image is """Class which represents a NIFTI image. Internally, the image is
loaded/stored using a :mod:`nibabel.nifti1.Nifti1Image` or loaded/stored using a :mod:`nibabel.nifti1.Nifti1Image` or
......
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