Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 2.05 KB

README.md

File metadata and controls

68 lines (44 loc) · 2.05 KB

pl-pyvista-volume

Version MIT License ci

pl-pyvista-volume is a ChRIS ds plugin which calculates the volume enclosed by a polygonal mesh. It accepts an input directory containing MNI .obj surface files, and writes outputs to both stdout and text files in an output directory.

PyVista is used for calculating volume from a polygonal mesh.

Installation

pl-pyvista-volume is a ChRIS plugin, meaning it can run from either within ChRIS or the command-line.

Get it from chrisstore.co

Local Usage

To get started with local command-line usage, use Apptainer (a.k.a. Singularity) to run pl-pyvista-volume as a container:

apptainer exec docker://fnndsc/pl-pyvista-volume surfvol input/ output/

To print its available options, run:

apptainer exec docker://fnndsc/pl-pyvista-volume surfvol --help

See examples for sample data.

Local Installation

For development, use pip to install the package locally.

python -m venv venv
source venv/bin/activate
pip install -e .

Testing

pytest

Notes

Multiprocessing

vtk and pyvista require multiprocessing (instead of multithreading) for concurrency. On 8 cores:

multiprocessing:

real    0m38.632s
user    2m31.680s
sys     0m7.660s

multithreading:

real    2m43.133s
user    2m28.311s
sys     0m5.364s