Skip to main content

Python library for computing statistical depth of ensembles of contours. The library supports the Contour Band Depth and Inclusion Depth methods. It also supports finding the ensemble's modes of variation by using depth-based clustering. Finally, it offers visualization utilities like spaghetti plots and Contour Box Plots.

Project description

contour-depth

License PyPI version

Python library for computing statistical depth of ensembles of contours. The library supports the Contour Band Depth and Inclusion Depth methods. It also supports finding the ensemble's modes of variation by using depth-based clustering. Finally, it offers visualization utilities like spaghetti plots and Contour Box Plots.

Different stages of the ensemble analysis process for an ensemble of segmentations of the right parotid gland of a head and neck cancer patient. a) and b) present an overview of the ensemble using a spaghetti plot and a contour boxplot based on the depths of the complete ensemble. c) and d) present a multi-modal analysis of the ensemble. c) depicts an overview of the different modes of variation and d) focuses on the less representative variation mode.

Installation

You can install the library via pip:

pip install contour-depth

Usage

To setup an environment follow the steps:

  1. Install a conda (we recommend using miniconda)
  2. Create environment: conda create --name=test-env python=3.9
  3. Activate environment: conda activate test-env
  4. Install dependencies with pip: pip install contour-depth (or pip install . if building from the repository) and pip install matplotlib. Other dependencies should be already available.
  5. To test installation, from the root of the repository run python boxplot_demo.py or python clustering_demo.py. No errors should be raised.

The directory napari_demo shows how to integrate the contour-depth package with a graphical user interface. Further, it demonstrates the usage of the contour-depth package with three-dimensional data using a medical image segmentation dataset.

Citation

If you use this library in your work and would like to cite it, please use the following BibTeX entries:

@article{10.1109/TVCG.2024.3350076,
  title={Inclusion Depth for Contour Ensembles}, 
  author={Chaves-de-Plaza, Nicolas F. and Mody, Prerak and Staring, Marius and van Egmond, René and Vilanova, Anna and Hildebrandt, Klaus},
  journal={IEEE Transactions on Visualization and Computer Graphics},   
  year={2024},
  volume={30},
  number={9},  
  pages={6560-6571},
  keywords={Data visualization;Visualization;Uncertainty;Feature extraction;Data models;Computational modeling;Semantic segmentation;Uncertainty visualization;contours;ensemble summarization;depth statistics},
  doi={10.1109/TVCG.2024.3350076}
}
@article{10.1111/cgf.15083,
  title = {Depth for Multi-Modal Contour Ensembles},
	author = {Chaves-de-Plaza, N.F. and Molenaar, M. and Mody, P. and Staring, M. and van Egmond, R. and Eisemann, E. and Vilanova, A. and Hildebrandt, K.},
	journal = {Computer Graphics Forum},
	year = {2024},	
	volume = {43},
  doi={10.1111/cgf.15083}
}

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contour_depth-0.0.2.tar.gz (9.2 MB view details)

Uploaded Source

Built Distribution

contour_depth-0.0.2-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file contour_depth-0.0.2.tar.gz.

File metadata

  • Download URL: contour_depth-0.0.2.tar.gz
  • Upload date:
  • Size: 9.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for contour_depth-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6940c143bc7e98e912d1a3f91439b45d0e75732a1cf17df6bdc9b4269d435b39
MD5 0211a061847633ab4fc0cd4696724492
BLAKE2b-256 8d085a88dc2fc3700d8d984edeb68ba1604245f7de1a75a85bb724399b1ad70a

See more details on using hashes here.

File details

Details for the file contour_depth-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for contour_depth-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f91eef3c25a82a47a4447485c00cdbbe3f76c4387d1980eda0e01b17aa2c13a6
MD5 6f81222112cce9717c1e1946d842ca08
BLAKE2b-256 f866ed176723abdce1612e22d3075ef3a2fb5176644e24011ba4d265de363184

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page