# mni2mz3
[![crates.io](https://img.shields.io/crates/v/mni2mz3?label=version)](https://crates.io/crates/mni2mz3)
[![MIT License](https://img.shields.io/github/license/fnndsc/mni2mz3)](https://github.com/FNNDSC/mni2mz3/blob/main/LICENSE)
[![test](https://github.com/FNNDSC/mni2mz3/actions/workflows/test.yml/badge.svg)](https://github.com/FNNDSC/mni2mz3/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/FNNDSC/mni2mz3/branch/master/graph/badge.svg?token=1YQRZWW95S)](https://codecov.io/gh/FNNDSC/mni2mz3)
Converts a file from MNI polygonal surface mesh format (`.obj`\*) or
vertex-wise data (e.g. curvature, cortical thickness, `*.txt`)
to [Surf-Ice MZ3 (`.mz3`)](https://github.com/neurolabusc/surf-ice/tree/master/mz3).
Useful for visualizing surfaces using [Surf-Ice](https://github.com/neurolabusc/surf-ice) or [NiiVue](https://github.com/niivue/niivue).
> [!WARNING]
> \*Not to be confused with Wavefront .obj, which is a different spec but with the same file extension.
## Installation
There are many ways to install and use `mni2mz3`. Linux, Mac, and Windows are supported.
### Using _ChRIS_
The easiest way to run `mni2mz3` is on [_ChRIS_](https://chrisproject.org), no installation needed.
Simply upload your data to a feed in https://app.chrisproject.org, then run `pl-mni2common`.
### Using Apptainer
`pl-mni2common` is a _ChRIS_ plugin wrapper for `mni2mz3`, which means you can
use its container image to run `mni2mz3`.
```shell
apptainer run docker://ghcr.io/fnndsc/pl-mni2common:latest mni2mz3 input.obj output.mz3
```
Call the wrapper script `mni2mz3` instead to do bulk processing on an input directory.
```shell
apptainer run docker://ghcr.io/fnndsc/pl-mni2common:latest mni2mz3 inputdir/ outputdir/
```
### Using [cargo-binstall](https://github.com/cargo-bins/cargo-binstall)
```shell
cargo binstall mni2mz3
```
### Using pip
```shell
pip install mni2mz3
```
### Manual Download
Select and download the right binary for your architecture and OS from GitHub Releases:
https://github.com/FNNDSC/mni2mz3/releases/latest
### Compile From Source
Install [Rust](https://rustup.rs), then run
```shell
cargo install mni2mz3
```
## Usage
```shell
# convert mesh
mni2mz3 surface_81920.obj surface.mz3
# convert data
mni2mz3 thickness.txt thickness.mz3
```
To do bulk conversions, use the [_ChRIS_ plugin wrapper](#using-chris).
## Details
- Output file will be gzip compressed.
- For surfaces, only triangle meshes are supported.
- For data, only 32-bit single-precision "float" is supported.
## Testing
It is recommended to install [cargo-nextest](https://nexte.st/).
```shell
cargo nextest run
```
Raw data
{
"_id": null,
"home_page": null,
"name": "mni2mz3",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "surface,mesh,MNI,obj,mz3",
"author": "Jennings Zhang <jennings.zhang@childrens.harvard.edu>",
"author_email": "Jennings Zhang <jennings.zhang@childrens.harvard.edu>",
"download_url": "https://files.pythonhosted.org/packages/2f/ef/e9725c9fc98cf184e368d51f3aab5a9327c9b86fb0a333cec6dc33caefb2/mni2mz3-1.0.0.tar.gz",
"platform": null,
"description": "# mni2mz3\n\n[![crates.io](https://img.shields.io/crates/v/mni2mz3?label=version)](https://crates.io/crates/mni2mz3)\n[![MIT License](https://img.shields.io/github/license/fnndsc/mni2mz3)](https://github.com/FNNDSC/mni2mz3/blob/main/LICENSE)\n[![test](https://github.com/FNNDSC/mni2mz3/actions/workflows/test.yml/badge.svg)](https://github.com/FNNDSC/mni2mz3/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/FNNDSC/mni2mz3/branch/master/graph/badge.svg?token=1YQRZWW95S)](https://codecov.io/gh/FNNDSC/mni2mz3)\n\nConverts a file from MNI polygonal surface mesh format (`.obj`\\*) or\nvertex-wise data (e.g. curvature, cortical thickness, `*.txt`)\nto [Surf-Ice MZ3 (`.mz3`)](https://github.com/neurolabusc/surf-ice/tree/master/mz3).\nUseful for visualizing surfaces using [Surf-Ice](https://github.com/neurolabusc/surf-ice) or [NiiVue](https://github.com/niivue/niivue).\n\n> [!WARNING]\n> \\*Not to be confused with Wavefront .obj, which is a different spec but with the same file extension.\n\n## Installation\n\nThere are many ways to install and use `mni2mz3`. Linux, Mac, and Windows are supported.\n\n### Using _ChRIS_\n\nThe easiest way to run `mni2mz3` is on [_ChRIS_](https://chrisproject.org), no installation needed.\nSimply upload your data to a feed in https://app.chrisproject.org, then run `pl-mni2common`.\n\n### Using Apptainer\n\n`pl-mni2common` is a _ChRIS_ plugin wrapper for `mni2mz3`, which means you can\nuse its container image to run `mni2mz3`.\n\n```shell\napptainer run docker://ghcr.io/fnndsc/pl-mni2common:latest mni2mz3 input.obj output.mz3\n```\n\nCall the wrapper script `mni2mz3` instead to do bulk processing on an input directory.\n\n```shell\napptainer run docker://ghcr.io/fnndsc/pl-mni2common:latest mni2mz3 inputdir/ outputdir/\n```\n\n### Using [cargo-binstall](https://github.com/cargo-bins/cargo-binstall)\n\n```shell\ncargo binstall mni2mz3\n```\n\n### Using pip\n\n```shell\npip install mni2mz3\n```\n\n### Manual Download\n\nSelect and download the right binary for your architecture and OS from GitHub Releases:\nhttps://github.com/FNNDSC/mni2mz3/releases/latest\n\n### Compile From Source\n\nInstall [Rust](https://rustup.rs), then run\n\n```shell\ncargo install mni2mz3\n```\n\n## Usage\n\n```shell\n# convert mesh\nmni2mz3 surface_81920.obj surface.mz3\n\n# convert data\nmni2mz3 thickness.txt thickness.mz3\n```\n\nTo do bulk conversions, use the [_ChRIS_ plugin wrapper](#using-chris).\n\n## Details\n\n- Output file will be gzip compressed.\n- For surfaces, only triangle meshes are supported.\n- For data, only 32-bit single-precision \"float\" is supported.\n\n## Testing\n\nIt is recommended to install [cargo-nextest](https://nexte.st/).\n\n```shell\ncargo nextest run\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Brain imaging surface mesh file format converter",
"version": "1.0.0",
"project_urls": {
"Source Code": "https://github.com/FNNDSC/mni2mz3"
},
"split_keywords": [
"surface",
"mesh",
"mni",
"obj",
"mz3"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d0ccd2b14ae01ffca351c8177fca049bc03e564a3fe68282d00f57322cec6bf2",
"md5": "1a30cfee0d89abd6f04f874190914059",
"sha256": "c03c2c4f9b01210514b6b015a0b273e007faa21cbbe72572b9061222cf139728"
},
"downloads": -1,
"filename": "mni2mz3-1.0.0-py3-none-macosx_10_7_x86_64.whl",
"has_sig": false,
"md5_digest": "1a30cfee0d89abd6f04f874190914059",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 222520,
"upload_time": "2023-11-15T23:04:23",
"upload_time_iso_8601": "2023-11-15T23:04:23.804794Z",
"url": "https://files.pythonhosted.org/packages/d0/cc/d2b14ae01ffca351c8177fca049bc03e564a3fe68282d00f57322cec6bf2/mni2mz3-1.0.0-py3-none-macosx_10_7_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e9ce49570b467ecfe84c1f0b5bbb5e954d4065e1461c363d58488877f15b274b",
"md5": "5bdbec8b95135c90ed84ed09cf26e46b",
"sha256": "c314cd3339fcbb291a2e11e82658fa6728c1adf6021ef0245480c0bb27075ab2"
},
"downloads": -1,
"filename": "mni2mz3-1.0.0-py3-none-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "5bdbec8b95135c90ed84ed09cf26e46b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 210537,
"upload_time": "2023-11-15T23:04:25",
"upload_time_iso_8601": "2023-11-15T23:04:25.806008Z",
"url": "https://files.pythonhosted.org/packages/e9/ce/49570b467ecfe84c1f0b5bbb5e954d4065e1461c363d58488877f15b274b/mni2mz3-1.0.0-py3-none-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6088fed7235d87ba6ea18a8dc2c293ab9155fc2aa0de67254cbd1a64e8dad266",
"md5": "86509c455e96f39608059c32740078ca",
"sha256": "086e1e6552e7352b715d9e8c3dccb066968aedefe1314bbc070ad9fca430e842"
},
"downloads": -1,
"filename": "mni2mz3-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"has_sig": false,
"md5_digest": "86509c455e96f39608059c32740078ca",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 232542,
"upload_time": "2023-11-15T23:04:27",
"upload_time_iso_8601": "2023-11-15T23:04:27.872047Z",
"url": "https://files.pythonhosted.org/packages/60/88/fed7235d87ba6ea18a8dc2c293ab9155fc2aa0de67254cbd1a64e8dad266/mni2mz3-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "500b80438875b18205beb4094d2ed2d6c1fed71c9ff1ccb730582d8a0b0e414d",
"md5": "1a2fc5c6ea15550d6e88eb40238b43d9",
"sha256": "882ada27c95c4238c503a581b5005d901b7a6f739858e0fa909dfba4100387c7"
},
"downloads": -1,
"filename": "mni2mz3-1.0.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
"has_sig": false,
"md5_digest": "1a2fc5c6ea15550d6e88eb40238b43d9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 233711,
"upload_time": "2023-11-15T23:04:29",
"upload_time_iso_8601": "2023-11-15T23:04:29.773532Z",
"url": "https://files.pythonhosted.org/packages/50/0b/80438875b18205beb4094d2ed2d6c1fed71c9ff1ccb730582d8a0b0e414d/mni2mz3-1.0.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e37bbabdb14b0e37191ab347b72b24adebffc5d5d6a82df3edd9100c4aa44e4d",
"md5": "3ccb4358d868fbea703cb89409e334f6",
"sha256": "9c211ec7c8dbceb95c8416475885eb62e7786326e36e41a34213cdd2070b73fa"
},
"downloads": -1,
"filename": "mni2mz3-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "3ccb4358d868fbea703cb89409e334f6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 240558,
"upload_time": "2023-11-15T23:04:32",
"upload_time_iso_8601": "2023-11-15T23:04:32.015837Z",
"url": "https://files.pythonhosted.org/packages/e3/7b/babdb14b0e37191ab347b72b24adebffc5d5d6a82df3edd9100c4aa44e4d/mni2mz3-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ce5f5d113aeff76b1e3b0e1593c8fde3c5cac624aee582eec0d744d216c9d183",
"md5": "c086cc9feae5b8b14d59b9fd510ef9f7",
"sha256": "008d5ca79e27ff0f5951021cd7cab603fc0a139da86d67e252c350bc385ff08b"
},
"downloads": -1,
"filename": "mni2mz3-1.0.0-py3-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "c086cc9feae5b8b14d59b9fd510ef9f7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 155803,
"upload_time": "2023-11-15T23:04:34",
"upload_time_iso_8601": "2023-11-15T23:04:34.105286Z",
"url": "https://files.pythonhosted.org/packages/ce/5f/5d113aeff76b1e3b0e1593c8fde3c5cac624aee582eec0d744d216c9d183/mni2mz3-1.0.0-py3-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2fefe9725c9fc98cf184e368d51f3aab5a9327c9b86fb0a333cec6dc33caefb2",
"md5": "b7a753b2f62f42fd60dad30b3d42207d",
"sha256": "c279a57f54b8b99c1909ca8067682f40da03a60a0dbea13843af17ac4f0c317c"
},
"downloads": -1,
"filename": "mni2mz3-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "b7a753b2f62f42fd60dad30b3d42207d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 16364,
"upload_time": "2023-11-15T23:04:35",
"upload_time_iso_8601": "2023-11-15T23:04:35.477430Z",
"url": "https://files.pythonhosted.org/packages/2f/ef/e9725c9fc98cf184e368d51f3aab5a9327c9b86fb0a333cec6dc33caefb2/mni2mz3-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-15 23:04:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "FNNDSC",
"github_project": "mni2mz3",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mni2mz3"
}