Skip to content

Commit

Permalink
complexity still exisits
Browse files Browse the repository at this point in the history
reverting back to the other method of calling viewer
  • Loading branch information
maliagehan committed Aug 20, 2024
1 parent 1afcbe0 commit fcf5bb5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
2 changes: 0 additions & 2 deletions plantcv/annotate/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from plantcv.annotate.classestomove import Viewer
from plantcv.annotate.napari_classes import napari_classes
from plantcv.annotate.napari_open import napari_open
from plantcv.annotate.napari_label_classes import napari_label_classes
Expand All @@ -9,7 +8,6 @@


__all__ = [
"Viewer",
"napari_classes",
"napari_open",
"napari_label_classes",
Expand Down
9 changes: 0 additions & 9 deletions plantcv/annotate/classestomove.py

This file was deleted.

4 changes: 2 additions & 2 deletions plantcv/annotate/napari_open.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import cv2
import numpy as np
import napari
from skimage.color import label2rgb
from plantcv.annotate import Viewer


def napari_open(img, show=True):
Expand Down Expand Up @@ -34,6 +34,6 @@ def napari_open(img, show=True):
if shape[2] > 3:
img = img.transpose(2, 0, 1)
showcall = show
viewer = Viewer(show=showcall)
viewer = napari.Viewer(show=showcall)
viewer.add_image(img)
return viewer
2 changes: 1 addition & 1 deletion plantcv/annotate/napari_points_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def napari_points_mask(img, viewer):
maskname = str(key)
mask = np.zeros((size[0], size[1]))
data = list(viewer.layers[key].data)
shapesize = viewer.layer_size(key)
shapesize = viewer.layers[key]._current_size
shapesizehalf = int(shapesize/2)

for y, x in data:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_napari_join_labels.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import numpy as np
from plantcv.annotate.napari_open import napari_open
from plantcv.annotate.napari_label_classes import napari_label_classes
from plantcv.annotate import napari_open
from plantcv.annotate import napari_label_classes
from plantcv.plantcv import readimage
from plantcv.annotate.napari_join_labels import napari_join_labels
from plantcv.annotate import napari_join_labels
from plantcv.plantcv import params


Expand Down

0 comments on commit fcf5bb5

Please sign in to comment.