Skip to content
This repository has been archived by the owner on Oct 18, 2021. It is now read-only.

tiff_split

Gabriele Girelli edited this page Sep 11, 2018 · 6 revisions

To split a TIFF image in smaller TIFF images of the specified side(s), use tiff_split. If two different sides are provided, the smaller images will be rectangular. The first side corresponds to the X (columns) and the second to the Y (rows). By default, only one side is required, which is used by the script for both X and Y sides. i.e., square smaller images are produced.

If the original dimensions are not multiples of the specified side, a portion of the image is lost, unless the --enlarge option is used. In that case, the smaller images generated from the image border will contain empty pixels.

If the input image is a 3D stack, it will be split only on XY and the output images will have the same number of slices. Using the -2 option, only the first slice is split (i.e., the output will be in 2D).

By default, split images are generated left-to-right, top-to-bottom, e.g.,

1 2 3
4 5 6
7 8 9

Use the option -I to generate them top-to-bottom, left-to-right, e.g.,

1 4 7
2 5 8
3 6 9

Examples:

  • Square images of 100x100 px
    tiff_split big_image.tif split_out_dir 100 -e
  • Rectangular images of 125x100 px
    tiff_split big_image.tif split_out_dir 100 125 -e

For more details, run tiff_split -h.

Clone this wiki locally