histocartography.utils.io module

Summary

Functions:

buffer_plot_and_get

check_for_dir

Checks if directory exists, if not, makes a new directory

download_box_link

download_example_data

download_test_data

get_filename

Get file name in the path

h5_to_numpy

Convert h5 object into numpy array

h5_to_tensor

Convert h5 object into torch tensor

is_box_url

load_json

Load json file as a dict.

write_json

is_box_url(candidate)[source]
buffer_plot_and_get(fig)[source]
get_filename(path)[source]

Get file name in the path

check_for_dir(path)[source]

Checks if directory exists, if not, makes a new directory

h5_to_tensor(h5_object, device)[source]

Convert h5 object into torch tensor

h5_to_numpy(h5_object)[source]

Convert h5 object into numpy array

load_json(fname)[source]

Load json file as a dict. :param fname: (str) path to json

write_json(path, data)[source]
download_test_data(out_dir)[source]
download_example_data(out_dir='')[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}
}