Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

milk-org/pyImageStreamIO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using pyImageStreamIO to read/write python data from/into CACAO SHM

CACAO installation

source: https:/CACAO-org/CACAO

cd $HOME
git clone --recursive https:/cacao-org/cacao cacao
cd cacao
autoreconf -vif
./configure
make
make install
export CACAO_ROOT=$HOME/cacao

Anaconda installation

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

PyImageStreamIO + pyBind11 library

cd $HOME
git clone --recursive https:/pybind/pybind11.git
export PYBIND11_ROOT=$HOME/pybind11
git clone -b dev https:/milk-org/pyImageStreamIO.git
cd pyImageStreamIO
make
make install_conda

Summary environment variables

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

usage

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published