|
4 | 4 | [](https://github.com/FNNDSC/pl-adapt_object_mesh/blob/main/LICENSE) |
5 | 5 | [](https://github.com/FNNDSC/pl-adapt_object_mesh/actions/workflows/ci.yml) |
6 | 6 |
|
7 | | -`pl-adapt_object_mesh` is a [_ChRIS_](https://chrisproject.org/) |
8 | | -_ds_ plugin which takes in ... as input files and |
9 | | -creates ... as output files. |
10 | | - |
11 | | -## Abstract |
| 7 | + |
12 | 8 |
|
13 | | -... |
| 9 | +`pl-adapt_object_mesh` is a [_ChRIS_](https://chrisproject.org/) |
| 10 | +_ds_ plugin wrapper for |
| 11 | +[`adapt_object_mesh`](https://github.com/aces/surface-extraction/blob/clasp_3-0-3/src/adapt_object_mesh.c), |
| 12 | +a polygonal mesh smoothing program from [CIVET](http://mcin.ca/technology/civet/). |
| 13 | +It implements |
| 14 | +It runs `adapt_object_mesh` on every `.obj` file in its input directory, |
| 15 | +writing outputs to an output directory, and printing logs to log files |
| 16 | +which are created next to the output surfaces. |
14 | 17 |
|
15 | 18 | ## Installation |
16 | 19 |
|
17 | 20 | `pl-adapt_object_mesh` is a _[ChRIS](https://chrisproject.org/) plugin_, meaning it can |
18 | 21 | run from either within _ChRIS_ or the command-line. |
19 | 22 |
|
20 | | -[](https://chrisstore.co/plugin/pl-adapt_object_mesh) |
| 23 | +[](https://chrisstore.co/plugin/pl-adapt_object_mesh) |
21 | 24 |
|
22 | 25 | ## Local Usage |
23 | 26 |
|
24 | 27 | To get started with local command-line usage, use [Apptainer](https://apptainer.org/) |
25 | | -(a.k.a. Singularity) to run `pl-adapt_object_mesh` as a container: |
26 | | - |
27 | | -```shell |
28 | | -singularity exec docker://fnndsc/pl-adapt_object_mesh adapt_object_mesh_wrapper [--args values...] input/ output/ |
29 | | -``` |
30 | | - |
| 28 | +(a.k.a. Singularity) to run `pl-adapt_object_mesh` as a container. |
31 | 29 | To print its available options, run: |
32 | 30 |
|
33 | 31 | ```shell |
34 | | -singularity exec docker://fnndsc/pl-adapt_object_mesh adapt_object_mesh_wrapper --help |
35 | | -``` |
36 | | - |
37 | | -## Examples |
38 | | - |
39 | | -`adapt_object_mesh_wrapper` requires two positional arguments: a directory containing |
40 | | -input data, and a directory where to create output data. |
41 | | -First, create the input directory and move input data into it. |
42 | | - |
43 | | -```shell |
44 | | -mkdir incoming/ outgoing/ |
45 | | -mv some.dat other.dat incoming/ |
46 | | -singularity exec docker://fnndsc/pl-adapt_object_mesh:latest adapt_object_mesh_wrapper [--args] incoming/ outgoing/ |
47 | | -``` |
48 | | - |
49 | | -## Development |
50 | | - |
51 | | -Instructions for developers. |
52 | | - |
53 | | -### Building |
54 | | - |
55 | | -Build a local container image: |
56 | | - |
57 | | -```shell |
58 | | -docker build -t localhost/fnndsc/pl-adapt_object_mesh . |
59 | | -``` |
60 | | - |
61 | | -### Running |
62 | | - |
63 | | -Mount the source code `adapt_object_mesh_wrapper.py` into a container to try out changes without rebuild. |
64 | | - |
65 | | -```shell |
66 | | -docker run --rm -it --userns=host -u $(id -u):$(id -g) \ |
67 | | - -v $PWD/adapt_object_mesh_wrapper.py:/usr/local/lib/python3.10/site-packages/adapt_object_mesh_wrapper.py:ro \ |
68 | | - -v $PWD/in:/incoming:ro -v $PWD/out:/outgoing:rw -w /outgoing \ |
69 | | - localhost/fnndsc/pl-adapt_object_mesh adapt_object_mesh_wrapper /incoming /outgoing |
70 | | -``` |
71 | | - |
72 | | -### Testing |
73 | | - |
74 | | -Run unit tests using `pytest`. |
75 | | -It's recommended to rebuild the image to ensure that sources are up-to-date. |
76 | | -Use the option `--build-arg extras_require=dev` to install extra dependencies for testing. |
77 | | - |
78 | | -```shell |
79 | | -docker build -t localhost/fnndsc/pl-adapt_object_mesh:dev --build-arg extras_require=dev . |
80 | | -docker run --rm -it localhost/fnndsc/pl-adapt_object_mesh:dev pytest |
81 | | -``` |
82 | | - |
83 | | -## Release |
84 | | - |
85 | | -Steps for release can be automated by [Github Actions](.github/workflows/ci.yml). |
86 | | -This section is about how to do those steps manually. |
87 | | - |
88 | | -### Increase Version Number |
89 | | - |
90 | | -Increase the version number in `setup.py` and commit this file. |
91 | | - |
92 | | -### Push Container Image |
93 | | - |
94 | | -Build and push an image tagged by the version. For example, for version `1.2.3`: |
95 | | - |
96 | | -``` |
97 | | -docker build -t docker.io/fnndsc/pl-adapt_object_mesh:1.2.3 . |
98 | | -docker push docker.io/fnndsc/pl-adapt_object_mesh:1.2.3 |
| 32 | +apptainer exec docker://fnndsc/pl-adapt_object_mesh adapt_object_mesh_wrapper --help |
99 | 33 | ``` |
100 | 34 |
|
101 | | -### Get JSON Representation |
102 | | - |
103 | | -Run [`chris_plugin_info`](https://github.com/FNNDSC/chris_plugin#usage) |
104 | | -to produce a JSON description of this plugin, which can be uploaded to a _ChRIS Store_. |
| 35 | +## Example |
105 | 36 |
|
106 | 37 | ```shell |
107 | | -docker run --rm localhost/fnndsc/pl-adapt_object_mesh:dev chris_plugin_info > chris_plugin_info.json |
| 38 | +singularity exec docker://fnndsc/pl-adapt_object_mesh:latest adapt_object_mesh_wrapper --iterations 50 incoming/ outgoing/ |
108 | 39 | ``` |
109 | | - |
0 commit comments