diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index b587204d..26cca233 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -11,6 +11,7 @@ INSTALL_EXAMPLE( relperm ) INSTALL_EXAMPLE( Poiseuille ) INSTALL_EXAMPLE( Juanes ) INSTALL_EXAMPLE( MicroModel ) +INSTALL_EXAMPLE( Tiff ) # Create unit tests for each example diff --git a/example/Tiff/TiffPreprocessor.py b/example/Tiff/TiffPreprocessor.py new file mode 100644 index 00000000..f31e6b35 --- /dev/null +++ b/example/Tiff/TiffPreprocessor.py @@ -0,0 +1,20 @@ +from skimage import io +import glob +import numpy as np + +print("Concatenating tiff files into 3D volume") + +IMAGES=sorted(glob.glob("*.tif")) +data=np.array([]) + +mydata=[] +for im in IMAGES: + print(im) + image=io.imread(im) + mydata.append(image) +# data=np.append(data,image,2) + +data=np.array(mydata) +data.tofile("data.raw") + +