Code for AMap project.
This repository aims to enable projection of tissue blocks registrered to a source organ to a new reference organ (usually the Human Reference Atlas, part of HuBMAP).
-
Clone the repository with
git clone https://github.com/cns-iu/hra-amap.git
-
Clone the repository (
https://github.com/ohirose/bcpd
) withgit clone https://github.com/ohirose/bcpd.git
. This implements the Bayesian Coherent Point Drift algorithm based on the following paper A Bayesian Formulation of Coherent Point Drift. The repository is ~1GB in file size hence it is not shipped with our repository and requires additional setup:-
For Windows
- No setup required.
-
For MacOS and Linux
-
Install the OpenMP and the LAPACK libraries if not installed. For MacOS, make sure XCode is installed. OpenMP can then be installed with the
homebrew
package manager (https://brew.sh
) followed bybrew install libomp
-
Type
make OPT=-DUSE_OPENMP ENV=<your-environment>
. Substitute<uyour-environment>
withLINUX
for Linux,HOMEBREW_INTEL
for Intel Macs andHOMEBREW
for Macs with Apple Silicon. In case of aclang
error during installation for MacOS, ensure to check if themakefile
within thebcpd
repository is pointing to the correct path forlibomp.dylib
. In newer Macs, the correct path should be/opt/homebrew/Cellar/libomp/19.1.7/lib/libomp.dylib
-
-
-
Ensure that the two repositories (hra-amap and bcpd) are at the same root level.
-
We recommend creating a virtual environment using
miniconda
oranaconda
since the code requires the Python version to be <= 3.12. After activating the environment, install the following libraries:
pip install trimesh
pip install pyyaml
pip install open3d
pip install pyvista
pip install point-cloud-utils
- To run a quick registration using the provided pipeline, please see
notebooks/Usage.ipynb
. Make sure to set appropriate parts in the code on your local system.