File: tiff_stack.rst

package info (click to toggle)
pims 0.7%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 16,336 kB
  • sloc: python: 5,559; makefile: 149
file content (31 lines) | stat: -rw-r--r-- 1,272 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
TiffStack
=========

PIMS can read most TIFF files out of the box, so you should try reading
you files ``pims.open('my_tiff_file.tif')`` and revisit this section if you
encounter an error.

A tiff stack is a single file (.tif or .tiff) containing several images,
often a time series or "Z stack."

``TiffStack`` expects a single filename. To load a collection of many
single-image tiff files (e.g., :file:`img-1.tif`, :file:`img-2.tif`) see
:doc:`image_sequence`.

Dependencies
------------

There are several Python packages for reading TIFFs. Our default reader, built
around `Christoph Gohlke's tifffile.py <http://www.lfd.uci.edu/~gohlke/code/tifffile.py.html>`__,
handles all the formats we have personally encountered. But we have
an alternative TIFF reader built around Pillow (see above).
To use a specific reader, use
``TiffStack_tifffile`` or ``TiffStack_pil``, which
depend, respectively, on the packages below. The "default" reader,
``TiffStack`` is an alias. At import time, it is pointed to the first
reader for which the required package is installed.

* `tifffile <https://pypi.python.org/pypi/tifffile>`_
* `Pillow <https://pillow.readthedocs.org/>`_ or `PIL <http://www.pythonware.com/products/pil/>`_

Tifffile is installed with the PIMS conda package.