Sign inSign up

fnndsc/pl-surface-distance

By fnndsc

•Updated over 4 years ago

Surface Distance Error

Image
Machine learning & AI
Data science
0

4.7K

fnndsc/pl-surface-distance repository overview

⁠Surface Distance Error

Version MIT License ci

⁠Abstract

pl-surface-distance is a ChRIS⁠ ds plugin which calculates the distance error of surfaces (.obj) from masks (.mnc). It is for assessing the accuracy of surface extraction and deformation algorithms.

pl-surface-distance can operate on multiple data files in its input directory. For every mask in its input directory: for every surface in the directory of the mask, compute the distance from every vertex of the surface to the mask.

Under the hood, pl-surface-distance is a script which calls mincchamfer and volume_object_evaluate.

⁠Installation

pl-surface-distance 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-surface-distance as a container:

singularity exec docker://fnndsc/pl-mask-distance surfdisterr input/ output/

To print its available options, run:

singularity exec docker://fnndsc/pl-mask-distance surfdisterr --help

⁠Examples

surfdisterr requires two positional arguments: a directory containing input data, and a directory where to create output data. First, create the input directory and move input data into it.

mkdir incoming/ outgoing/
mv some.dat other.dat incoming/
singularity exec docker://fnndsc/pl-mask-distance:latest surfdisterr [--args] incoming/ outgoing/

⁠Development

Instructions for developers.

⁠Building

Build a local container image:

docker build -t localhost/fnndsc/pl-mask-distance .
⁠Get JSON Representation

Run chris_plugin_info⁠ to produce a JSON description of this plugin, which can be uploaded to a ChRIS Store.

docker run --rm localhost/fnndsc/pl-mask-distance chris_plugin_info > chris_plugin_info.json
⁠Local Test Run

Mount the source code app.py into a container to test changes without rebuild.

docker run --rm -it --userns=host -u $(id -u):$(id -g) \
    -v $PWD/surfdisterr.py:/usr/local/lib/python3.10/site-packages/surfdisterr.py:ro \
    -v $PWD/in:/incoming:ro -v $PWD/out:/outgoing:rw -w /outgoing \
    localhost/fnndsc/pl-mask-distance surfdisterr /incoming /outgoing

Tag summary

Content type

Image

Digest

Size

2 GB

Last updated

over 4 years ago

docker pull fnndsc/pl-surface-distance