Skip to main content

Object-oriented CIVET bindings for Python

Project description

pycivet

.github/workflows/test.yml PyPI License - MIT

Object-oriented Python bindings for CIVET binaries like transform_objects and mincreshape.

Overview

pycivet provides helper methods which lazily invoke CIVET binaries with object-oriented syntax. Intermediate files are written to temporary locations and then unlinked immediately.

This Perl code snippet from marching_cubes.pl can be expressed in Python as such:

https://github.com/aces/surface-extraction/blob/7c9c5987a2f8f5fdeb8d3fd15f2f9b636401d9a1/scripts/marching_cubes.pl.in#L125-L134

from civet import MNI_DATAPATH
from civet.surface import ObjFile

starting_model = ObjFile(MNI_DATAPATH / 'surface-extraction' / 'white_model_320.obj')
starting_model.flip_x().slide_right().save('./output.obj')

Installation

It is recommended you install this package in a container image, e.g.

FROM docker.io/fnndsc/mni-conda-base:civet2.1.1-python3.10.2
RUN pip install pycivet

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

pycivet-0.0.1a5.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

pycivet-0.0.1a5-py3-none-any.whl (2.8 kB view hashes)

Uploaded Python 3

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