File tree Expand file tree Collapse file tree 2 files changed +228
-149
lines changed Expand file tree Collapse file tree 2 files changed +228
-149
lines changed Original file line number Diff line number Diff line change 139
139
140
140
from .filebasedimages import FileBasedHeader , FileBasedImage
141
141
from .filebasedimages import ImageFileError # flake8: noqa; for back-compat
142
+ from .viewers import OrthoSlicer3D
142
143
from .volumeutils import shape_zoom_affine
143
144
144
145
@@ -661,3 +662,21 @@ def __getitem__(self):
661
662
raise TypeError ("Cannot slice image objects; consider slicing image "
662
663
"array data with `img.dataobj[slice]` or "
663
664
"`img.get_data()[slice]`" )
665
+
666
+ def plot (self , show = True ):
667
+ """Plot the image using OrthoSlicer3D
668
+
669
+ Parameters
670
+ ----------
671
+ show : bool
672
+ If True, the viewer will be shown.
673
+
674
+ Returns
675
+ -------
676
+ viewer : instance of OrthoSlicer3D
677
+ The viewer.
678
+ """
679
+ out = OrthoSlicer3D (self .get_data ())
680
+ if show :
681
+ out .show ()
682
+ return out
You can’t perform that action at this time.
0 commit comments