@@ -182,7 +182,14 @@ class BaseResult(abc.ABC):
182182 labels: result labels (one label per column of result array)
183183 """
184184
185+ #: Class attribute that defines a string prefix used to uniquely identify instances
186+ #: of this class in metadata serialization. Each subclass should override this with
187+ #: a unique identifier (e.g., "_properties_" for properties, "_shapes_" for shapes).
188+ #: This prefix is prepended to the object title when creating metadata keys,
189+ #: enabling type identification during deserialization.
185190 PREFIX = "" # To be overriden in children classes
191+
192+ #: Class attribute that defines a tuple of attributes to be serialized in metadata.
186193 METADATA_ATTRS = () # To be overriden in children classes
187194
188195 def __init__ (
@@ -628,12 +635,21 @@ class NoDefaultOption:
628635class BaseObj (Generic [TypeROI ], metaclass = BaseObjMeta ):
629636 """Object (signal/image) interface"""
630637
638+ #: Class attribute that defines a string prefix used to uniquely identify instances
639+ #: of this class in metadata serialization. Each subclass should override this with
640+ #: a unique identifier (e.g., "s" for signals, "i" for images).
641+ #: This prefix is used as part of the key for storing and retrieving object-specific
642+ #: metadata, supporting type-based serialization and deserialization.
631643 PREFIX = "" # This is overriden in children classes
632644
633645 # This is overriden in children classes with a gds.DictItem instance:
634646 metadata : dict [str , Any ] = {}
635647 annotations : str = ""
636648
649+ #: Class attribute that defines a tuple of valid NumPy data types supported by this
650+ #: class. This is used to validate the data type of the object when it is set or
651+ #: modified and to ensure that the object can handle the data correctly.
652+ #: Subclasses should override this with a specific set of valid data types.
637653 VALID_DTYPES = (np .float64 ,) # To be overriden in children classes
638654
639655 def __init__ (self ):
@@ -1228,6 +1244,10 @@ class BaseROI(Generic[TypeObj, TypeSingleROI, TypeROIParam], abc.ABC): # type:
12281244 inverse: if True, ROI is outside the region of interest
12291245 """
12301246
1247+ #: Class attribute that defines a string prefix used for identifying ROI types
1248+ #: in object metadata. This prefix is used when serializing and deserializing ROIs,
1249+ #: allowing the system to determine the appropriate ROI class for reconstruction.
1250+ #: Each ROI subclass should override this with a unique string identifier.
12311251 PREFIX = "" # This is overriden in children classes
12321252
12331253 def __init__ (self , singleobj : bool | None = None , inverse : bool = False ) -> None :
0 commit comments