Skip to content

Commit

Permalink
MAINT: Add possibility to not add img (but background) and instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwboth committed Nov 26, 2023
1 parent 18135d3 commit 8221eff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/darsia/assistants/point_selection_assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@

class PointSelectionAssistant(darsia.BaseAssistant):
def __init__(self, img: darsia.Image, **kwargs) -> None:
if img is None:
img = kwargs.get("background")
assert img is not None, "No image provided."

# Only continue for 2d images
assert img.space_dim == 2, "Only 2d images are supported."

# Set name for titles in plots
self.name = "Point selection assistant"
"""Name of assistant."""
self.name = kwargs.get("name", "Point selection assistant")
"""Name of assistant / short version of instructions."""

super().__init__(img, use_coordinates=False, **kwargs)

Expand Down

0 comments on commit 8221eff

Please sign in to comment.