loki2.data.dataclass.cell_graph
Graph Data model for Loki2.
This module defines the data structure for representing cell graphs from whole slide images.
For more information, please check out docs/readmes/graphs.md
Module Contents
- class loki2.data.dataclass.cell_graph.CellGraphDataWSI
Dataclass for Graph Data representing cells or patches in a WSI.
This class stores node features, positions, and metadata for graph-based representations of whole slide images.
- Parameters:
x – Node feature matrix with shape (num_nodes, num_node_features).
positions – Each of the objects defined in x has a physical position in a Cartesian coordinate system, be it detected cells or extracted patches. Shape (num_nodes, 2).
metadata – Metadata about the objects stored here. Can include information about cell types, coordinates, or other annotations.
- x: torch.Tensor
- positions: torch.Tensor
- metadata: Dict[str, Any]