Skip to content

Commit

Permalink
Defer skimage.viewer import
Browse files Browse the repository at this point in the history
  • Loading branch information
gb119 committed Nov 24, 2021
1 parent 291766d commit 748a279
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Stoner/Image/folders.py
Expand Up @@ -7,7 +7,6 @@
from json import loads, dumps
from copy import deepcopy, copy

from skimage.viewer import CollectionViewer
import numpy as np
from matplotlib.pyplot import figure, Figure, subplot, tight_layout
from PIL.TiffImagePlugin import ImageFileDirectory_v2
Expand Down Expand Up @@ -470,6 +469,8 @@ def to_tiff(self, filename):

def view(self):
"""Create a matplotlib animated view of the contents."""
from skimage.viewer import CollectionViewer # defer import until we needit

cv = CollectionViewer(list(self.images))
cv.show()
return cv
Expand Down

0 comments on commit 748a279

Please sign in to comment.