Skip to content

Commit

Permalink
bug fix with debug prints: change color map
Browse files Browse the repository at this point in the history
  • Loading branch information
n-poulsen committed Mar 27, 2024
1 parent f2d859b commit a36fdfe
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/napari_deeplabcut/_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,18 @@ def to_hex(nparray):
return res

self._display.reset()
mode = "label" if self.color_mode == str(keypoints.ColorMode.BODYPART) else "id"
logging.warning(self.color_mode)
logging.warning(str(keypoints.ColorMode.BODYPART))
logging.warning(str(keypoints.ColorMode.INDIVIDUAL))
logging.warning(str(self.color_mode == str(keypoints.ColorMode.BODYPART)))
logging.warning(str(self.color_mode == str(keypoints.ColorMode.INDIVIDUAL)))
logging.warning("---")
mode = "label"
if self.color_mode == str(keypoints.ColorMode.BODYPART):
mode = "id"

logging.warning(f"SELECTED MODE: {mode}")
logging.warning("---")
for layer in self.viewer.layers:
if isinstance(layer, Points) and layer.metadata:
self._display.update_color_scheme(
Expand All @@ -874,7 +885,6 @@ def to_hex(nparray):
for name, color in layer.metadata["face_color_cycles"][mode].items()
}
)
break

def _remap_frame_indices(self, layer):
if not self._images_meta.get("paths"):
Expand Down

0 comments on commit a36fdfe

Please sign in to comment.