diff --git a/setup.py b/setup.py index 7185eee..94b7d0b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="stackview", - version="0.4.0", + version="0.5.0", author="Robert Haase", author_email="robert.haase@tu-dresden.de", description="Interactive image stack viewing in jupyter notebooks", diff --git a/stackview/__init__.py b/stackview/__init__.py index ad275e5..db05dd3 100644 --- a/stackview/__init__.py +++ b/stackview/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.4.0" +__version__ = "0.5.0" import warnings from ._static_view import jupyter_displayable_output, insight diff --git a/stackview/_image_widget.py b/stackview/_image_widget.py index 2e98aff..3a013f9 100644 --- a/stackview/_image_widget.py +++ b/stackview/_image_widget.py @@ -97,8 +97,8 @@ def _labels_lut(): lut = rs.rand(65537, 3) lut[0, :] = 0 # these are the first four colours from matplotlib's default - lut[1] = [1.0, 0.4980392156862745, 0.054901960784313725] - lut[2] = [0.12156862745098039, 0.4666666666666667, 0.7058823529411765] + lut[1] = [0.12156862745098039, 0.4666666666666667, 0.7058823529411765] + lut[2] = [1.0, 0.4980392156862745, 0.054901960784313725] lut[3] = [0.17254901960784313, 0.6274509803921569, 0.17254901960784313] lut[4] = [0.8392156862745098, 0.15294117647058825, 0.1568627450980392] - return lut \ No newline at end of file + return lut diff --git a/stackview/_static_view.py b/stackview/_static_view.py index 6d64eb2..db22dd5 100644 --- a/stackview/_static_view.py +++ b/stackview/_static_view.py @@ -59,16 +59,12 @@ def _repr_html_(self): from ._image_widget import _is_label_image labels = _is_label_image(self) - # In case the image is 2D, 3D and larger than 100 pixels, turn on fancy view - if len(self.shape) in (2, 3) and size_in_pixels >= 100: - import matplotlib.pyplot as plt - _imshow(self, - labels=labels, - continue_drawing=True, - colorbar=not labels) - image = _png_to_html(_plt_to_png()) - else: - return "
numpy.ndarray(" + str(np.asarray(self)) + ", dtype=" + str(self.dtype) + ")" + import matplotlib.pyplot as plt + _imshow(self, + labels=labels, + continue_drawing=True, + colorbar=not labels) + image = _png_to_html(_plt_to_png()) if size_in_bytes > 1024: size_in_bytes = size_in_bytes / 1024