If you want to change your settings or unsubscribe please visit:
The input is a <filename>.tiff – a TIFF image stack generated by ImageJ Java plugin (usingÂ bioformats) withÂ Elphel-specificÂ information in ImageJ written TIFF tags.
Reading andÂ formatting image data for the Tensorflow can be split into the following subtasks:
- convert a TIFF image stack into a NumPy array
- extract information from the TIFF header tags
- reshape/perform a few array manipulations based on the information fromÂ the tags.
~$ python3 imagej_tiff.pyÂ <filename>.tiff
It will print header info in the terminal and display the layers (and decoded values) using Matplotlib.
Subtasks 1. and 2. are simply done by Pillow. As for 3., if it was a simple TIFF image stack there would be no need to have extra scripts.
If the layer were just stacked along depth the shape would be (2178, 2916, 5). The script reshapes the data into tiles and puts the values into a separate array, so the output is 2 Numpy arrays:
- image data shape: (242, 324, 9, 9, 4) with the layers along the last dimension
- values data shape: (242, 324, 3)
And they are ready to be used in the Tensorflow.
For more details and example output, see this wiki page or inspect the source. The most detailed general info is probably in the slides from our presentation for CVPR2018 – format description starts from p.19.
Without using Python displaying layers and decoding tags is natively supported by ImageJ or Fiji. To read the tags exiftool or tiffinfo linux programs can be used.
Other Python libraries that could have worked (but examples for Pillow were easier to find):
_______________________________________________ Support-list mailing list Supportfirstname.lastname@example.org http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com