Skip to content

PickableObject

copick.models.PickableObject

Bases: BaseModel

Metadata for a pickable objects.

Attributes:

  • name (str) –

    Name of the object.

  • is_particle (bool) –

    Whether this object should be represented by points (True) or segmentation masks (False).

  • label (Optional[int]) –

    Numeric label/id for the object, as used in multilabel segmentation masks. Must be unique.

  • color (Optional[Tuple[int, int, int, int]]) –

    RGBA color for the object.

  • emdb_id (Optional[str]) –

    EMDB ID for the object.

  • pdb_id (Optional[str]) –

    PDB ID for the object.

  • identifier (Optional[str]) –

    Identifier for the object (e.g. Gene Ontology ID or UniProtKB accession).

  • map_threshold (Optional[float]) –

    Threshold to apply to the map when rendering the isosurface.

  • radius (Optional[float]) –

    Radius of the particle, when displaying as a sphere.

name: str

is_particle: bool

label: Optional[int] = 1

color: Optional[Tuple[int, int, int, int]] = (100, 100, 100, 255)

emdb_id: Optional[str] = None

pdb_id: Optional[str] = None

identifier: Optional[str] = Field(None, alias=AliasChoices('go_id', 'identifier'))

map_threshold: Optional[float] = None

radius: Optional[float] = None

go_id

validate_label(v) -> int

Validate the label.

validate_color(v) -> Tuple[int, int, int, int]

Validate the color.