README.md 1.2 KB
Newer Older
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
1 2
# Description
Class imagej_tiff to read multilayer tiff files and parse tags
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
3 4
* layers are stacked along depth (think RGB)
* parse imagej generated tags (50838 and 50839)
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
5

Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
6 7 8 9 10 11 12 13 14
# More info
* Presentation for CVPR2018: [Elphel_TP-CNN_slides.pdf](https://community.elphel.com/files/presentations/Elphel_TP-CNN_slides.pdf)
* [TIFF Image stacks for Machine Learning](https://wiki.elphel.com/wiki/Tiff_file_format_for_pre-processed_quad-stereo_sets#TIFF_image_stacks_for_ML)

# Samples
* [models/all/state_street/1527256815_150165/v01/ml/](https://community.elphel.com/3d+biquad/models/all/state_street/1527256815_150165/v01/ml/)
or
* go to [3d+biquad](https://community.elphel.com/3d+biquad/), open individual models and hit the light green button to ‘Download source files for ml’

Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
15 16 17 18 19 20
# Dependencies
* Python 3.5.2 (not strict)
* Pillow 5.1.0+ (strict)
* Numpy 1.14.2 (not strict)
* Matplotlib 2.2.2 (not strict)

Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
21
# Examples
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
22
```
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
23
#!/usr/bin/env python3
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
24 25 26 27 28 29 30
from PIL import Image
import xml.etree.ElementTree as ET
import numpy as np
import matplotlib.pyplot as plt
import imagej_tiff as ijt

tiff = ijt.imagej_tiff('test.tiff')
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
31 32 33
print(tiff.nimages)
print(tiff.labels)
print(tiff.infos)
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
34 35
tiff.show_images(['X-corr','Y-corr',0,2])
plt.show()
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
36
```