|
1 | | -# ConFixel: Moved to ModelArrayIO |
| 1 | +# ModelArrayIO |
2 | 2 |
|
3 | | -ConFixel has moved beyond fixels and handles a lot of other modalities. |
4 | | -It also got optimized! |
5 | | -[Going forward, ConFixel is now ModelArrayIO.](https://pennlinc.github.io/ModelArrayIO/). |
6 | | -This repository will be left here because the URL is in the publication. |
| 3 | +**ModelArrayIO** is a Python package that converts between neuroimaging formats (fixel `.mif`, voxel NIfTI, CIFTI-2 dscalar) and the HDF5 (`.h5`) layout used by the R package [ModelArray](https://pennlinc.github.io/ModelArray/). It can also write ModelArray statistical results back to imaging formats. |
7 | 4 |
|
| 5 | +**Relationship to ConFixel:** The earlier project [**ConFixel**](https://github.com/PennLINC/ConFixel) is superseded by ModelArrayIO. The ConFixel repository is retained for history (including links from publications) and will be archived; new work should use this repository. |
8 | 6 |
|
9 | | -`ConFixel` is companion converter software for [ModelArray](https://pennlinc.github.io/ModelArray/) for converting data back and forth from the HDF5 file format. |
| 7 | +Documentation for installation and usage: [ModelArrayIO on GitHub](https://github.com/PennLINC/ModelArrayIO#installation) (this README). For conda, HDF5 libraries, and installing the ModelArray R package, see the ModelArray vignette [Installation](https://pennlinc.github.io/ModelArray/articles/installations.html). |
10 | 8 |
|
11 | 9 | <p align="center"> |
12 | 10 |
|
13 | 11 |  |
14 | 12 |
|
15 | 13 | </p> |
16 | 14 |
|
17 | | -`ConFixel` software includes three converters: `ConFixel` for fixel-wise data (`.mif`), `ConVoxel` for voxel-wise data (NIfTI) and `ConCIFTI` for CIFTI-2 dscalar files. Each converter converts between the original image format and the HDF5 file format (`.h5`) that ModelArray uses. |
| 15 | +ModelArrayIO provides three converter areas, each with import and export commands: |
18 | 16 |
|
19 | | -Below lists the commands in each converter. After [installation](#installation), these commands can be directly called in a terminal console. |
| 17 | +After [installation](#installation), these commands are available in your terminal: |
20 | 18 |
|
21 | | -* `ConFixel` converter for fixel-wise data (MRtrix image format `.mif`): |
22 | | - * `.mif` --> `.h5`: command `confixel` |
23 | | - * `.h5` --> `.mif`: command `fixelstats_write` |
24 | | -* `ConVoxel` converter for voxel-wise data (NIfTI): |
25 | | - * NIfTI --> `.h5`: command `convoxel` |
26 | | - * `.h5` --> NIfTI: command `volumestats_write` |
27 | | -* `ConCIFTI` converter for greyordinate-wise data (CIFTI-2): |
28 | | - * CIFTI-2 --> `.h5`: command `concifti` |
29 | | - * `.h5` --> CIFTI-2: command `ciftistats_write` |
| 19 | +* **Fixel-wise** data (MRtrix `.mif`): |
| 20 | + * `.mif` → `.h5`: `confixel` (CLI name kept for compatibility with earlier ConFixel workflows) |
| 21 | + * `.h5` → `.mif`: `fixelstats_write` |
| 22 | +* **Voxel-wise** data (NIfTI): |
| 23 | + * NIfTI → `.h5`: `convoxel` |
| 24 | + * `.h5` → NIfTI: `volumestats_write` |
| 25 | +* **Greyordinate-wise** data (CIFTI-2): |
| 26 | + * CIFTI-2 → `.h5`: `concifti` |
| 27 | + * `.h5` → CIFTI-2: `ciftistats_write` |
30 | 28 |
|
31 | 29 | ## Installation |
32 | 30 | ### Install dependent software MRtrix (only required for fixel-wise data `.mif`) |
33 | | -When converting fixel-wise data's format (`.mif`), converter `ConFixel` uses function `mrconvert` from MRtrix, so please make sure MRtrix has been installed. If it's not installed yet, please refer to [MRtrix's webpage](https://www.mrtrix.org/download/) for how to install it. Type `mrview` in the terminal to check whether MRtrix installation is successful. |
| 31 | +For fixel-wise `.mif` conversion, the `confixel` / `fixelstats_write` tools use MRtrix `mrconvert`. Install MRtrix from [MRtrix’s webpage](https://www.mrtrix.org/download/) if needed. Run `mrview` in the terminal to verify the installation. |
34 | 32 |
|
35 | | -If your input data is voxel-wise data or CIFTI (greyordinate-wise) data, you can skip this step. |
| 33 | +If your data are voxel-wise or CIFTI only, you can skip this step. |
36 | 34 |
|
37 | | -### Install `ModelArrayIO` software |
38 | | -Before installing ModelArrayIO software, you may want to create a conda environment - see [here](https://pennlinc.github.io/ModelArray/articles/installations.html) for more. If you installed MRtrix in a conda environment, you can directly install ConFixel software in that environment. |
| 35 | +### Install ModelArrayIO |
| 36 | +You may want a conda environment first—see [ModelArray: Installation](https://pennlinc.github.io/ModelArray/articles/installations.html). If MRtrix is installed in that environment, install ModelArrayIO in the same environment. |
39 | 37 |
|
40 | | -You can install `ModelArrayIO` software from `GitHub`: |
| 38 | +Install from GitHub: |
41 | 39 |
|
42 | 40 | ``` console |
43 | 41 | git clone https://github.com/PennLINC/ModelArrayIO.git |
44 | 42 | cd ModelArrayIO |
45 | 43 | pip install . # build via pyproject.toml |
46 | 44 | ``` |
47 | 45 |
|
48 | | -If you are a developer, and if there is any update in the source code locally, you may update the installation with an editable install: |
| 46 | +Editable install for development: |
49 | 47 |
|
50 | 48 | ``` console |
51 | 49 | # From the repository root |
52 | 50 | pip install -e . |
53 | 51 | ``` |
54 | 52 |
|
55 | | -Alternatively, if you have `hatch` installed, you can build wheels/sdist locally: |
| 53 | +With `hatch` installed, you can build wheels/sdist locally: |
56 | 54 |
|
57 | 55 | ``` console |
58 | 56 | hatch build |
59 | 57 | pip install dist/*.whl |
60 | 58 | ``` |
61 | 59 |
|
62 | 60 | ## How to use |
63 | | -We provide [walkthrough for how to use `ConFixel` for fixel-wise data](notebooks/walkthrough_fixel-wise_data.md), and [walkthrough for `ConVoxel` for voxel-wise data](notebooks/walkthrough_voxel-wise_data.md). |
| 61 | +We provide a [walkthrough for fixel-wise data](notebooks/walkthrough_fixel-wise_data.md) (`confixel` / `fixelstats_write`) and a [walkthrough for voxel-wise data](notebooks/walkthrough_voxel-wise_data.md) (`convoxel` / `volumestats_write`). |
64 | 62 |
|
65 | | -As `ConFixel` software is usually used together with [ModelArray](https://pennlinc.github.io/ModelArray/), we also provide [a combined walkthrough](https://pennlinc.github.io/ModelArray/articles/walkthrough.html) of ConFixel + ModelArray with example fixel-wise data. |
| 63 | +Together with [ModelArray](https://pennlinc.github.io/ModelArray/), see the [combined walkthrough](https://pennlinc.github.io/ModelArray/articles/walkthrough.html) with example fixel-wise data (ModelArray + ModelArrayIO). |
| 64 | + |
| 65 | +CLI help: |
66 | 66 |
|
67 | | -You can also refer to `--help` for additional information: |
68 | 67 | ``` console |
69 | 68 | confixel --help |
70 | 69 | ``` |
71 | | -You can replace `confixel` with other commands in ConFixel. |
| 70 | + |
| 71 | +Use the same pattern for `convoxel`, `concifti`, `fixelstats_write`, `volumestats_write`, and `ciftistats_write`. |
72 | 72 |
|
73 | 73 | ## Storage backends: HDF5 and TileDB |
74 | 74 |
|
|
0 commit comments