A Python package for efficient 3D mesh processing and visualization tailored to microscopy image analysis, bridging the gap between volumetric data and surface representation for biological research. This package will be the backbone of a Blender addon and a Napari plugin.
Allows to transform a binary mask or a labeled-map into a set of meshes.
- Images are read thourgh Dask, so they can be of any arbitrary size.
- Works whether images are isotropic or not.
- In the case of a labels-map, each individual label has its own buffer and so, their own mesh. Otherwise, everything is connected. The OME-TIF and OME-ZAR file formats are the only supported formats.
- Multi-channels and multi-timepoints stacks are handled.
- The output is an Alembic (.abc) file.
- Meshes can be optimized given their local curvature to minimize the number of vertices.
- We will need a Python environment with the
pybind11
module available. - Navigate to the project's root directory (the one containing
setup.py
). - In there, create a folder named
build
. - Run the command
python setup.py build_ext --inplace
. - Run the command
pip install -e .
. - You can now use the module in this Python environment.
- You will need to have
CMake
installed. - Navigate to the project's root directory (the one containing
setup.py
). - In there, create a folder named
tests-build
and jump into it. - From this folder, run the command:
cmake ..
. - Still in this folder, you can now run:
make
, which will result in the creation of theM4M
executable. - Run
./M4M
to launch the testing session.
- You will need the
pytest
module. - To do that, you first need to build the project with the "For production" instructions.
- Then, you can navigate to the
meshes4mic/src/meshes4mic/tests
folder. - From there, you can simply run
pytest .
to launch the testing session.