phenotypic.sdk_.register.PlotterRegistry#
- class phenotypic.sdk_.register.PlotterRegistry[source]#
Bases:
BaseRegistry[BasePlotter]Registry for plotter classes.
Plotters are registered by their
call_nameclass attribute, which must match the method name used for dispatch (e.g.,call_name = "overlay"corresponds toimage.plot.size_distribution()).Methods
__init__Return names of all registered components.
Look up registered class by name.
Decorator that registers a class by its
call_nameclass attribute.- classmethod get(name: str) type[T]#
Look up registered class by name.
- Parameters:
name (str) – The registered name of the component.
- Returns:
The registered class.
- Raises:
ValueError – If name is not registered.
- Return type:
type[T]
- classmethod register(target_cls: type[T]) type[T]#
Decorator that registers a class by its
call_nameclass attribute.If
call_nameis not defined on the class, defaults to the class name.- Parameters:
target_cls (type[T]) – The class to register.
- Returns:
The registered class (unchanged).
- Raises:
ValueError – If a component with the same name is already registered.
- Return type:
type[T]