histocartography.utils.graph module

Summary

Functions:

adj_to_dgl

Cleaning a graph by thresholding its node values.

adj_to_networkx

Cleaning a graph by thresholding its node values.

copy_graph

set_graph_on_cpu

set_graph_on_cuda

to_cpu

to_device

adj_to_networkx(adj, feat, node_importance=None, threshold=0.1, max_component=False, rm_iso_nodes=False, centroids=None, nuclei_labels=None)[source]

Cleaning a graph by thresholding its node values.

Parameters
  • adj (-) – Adjacency matrix.

  • feat (-) – An array of node features.

  • threshold (-) – The weight threshold.

  • max_component (-) – if return the largest cc

  • rm_iso_nodes (-) – if remove isolated nodes

adj_to_dgl(adj, feat, node_importance=None, threshold=0.1, max_component=False, rm_iso_nodes=False, centroids=None, nuclei_labels=None)[source]

Cleaning a graph by thresholding its node values.

Parameters
  • adj (-) – Adjacency matrix.

  • feat (-) – An array of node features.

  • threshold (-) – The weight threshold.

  • max_component (-) – if return the largest cc

  • rm_iso_nodes (-) – if remove isolated nodes

set_graph_on_cuda(graph)[source]
set_graph_on_cpu(graph)[source]
to_cpu(x)[source]
to_device(x)[source]
copy_graph(x)[source]

Reference

If you use histocartography in your projects, please cite the following:

@inproceedings{pati2021,
    title = {Hierarchical Graph Representations for Digital Pathology},
    author = {Pushpak Pati, Guillaume Jaume, Antonio Foncubierta, Florinda Feroce, Anna Maria Anniciello, Giosuè Scognamiglio, Nadia Brancati, Maryse Fiche, Estelle Dubruc, Daniel Riccio, Maurizio Di Bonito, Giuseppe De Pietro, Gerardo Botti, Jean-Philippe Thiran, Maria Frucci, Orcun Goksel, Maria Gabrani},
    booktitle = {https://arxiv.org/pdf/2102.11057},
    year = {2021}
}