- CACAO installation
- Anaconda installation
- PyImageStreamIO + pyBind11 library
- Summary environment variables
- usage
source: https://github.com/CACAO-org/CACAO
cd $HOME
git clone --recursive https://github.com/cacao-org/cacao cacao
cd cacao
autoreconf -vif
./configure
make
make install
export CACAO_ROOT=$HOME/cacao
For an easier maintenance, I recommend the use of anaconda. You can also use virtualenv to have a python sandbox but I can't help you.
cd $HOME
export CONDA_ROOT=$HOME/miniconda3
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p $CONDA_ROOT
export PATH=$CONDA_ROOT/bin:$PATH
cd $HOME
git clone --recursive https://github.com/pybind/pybind11.git
export PYBIND11_ROOT=$HOME/pybind11
git clone -b dev https://github.com/milk-org/pyImageStreamIO.git
cd pyImageStreamIO
make
make install_conda
In your .bashrc, you should have defined:
export CACAO_ROOT=$HOME/cacao
export PYBIND11_ROOT=$HOME/pybind11
export CONDA_ROOT=$HOME/miniconda3
export PATH=$CONDA_ROOT/bin:$PATH
import numpy as np
from pyImageStreamIO import Image, Datatype
img = Image()
img.create("test", [512, 512], Datatype.FLOAT, 1, 1)
img.write(np.ones((512,512), dtype=np.float32))
img2 = Image()
img2.link("test")
img2.semwait(0)
data = np.array(img2, copy=False)
note: the keyword copy=False
avoid the copy operation