Package 'ti'

Title: A single-channel UINT8 TIFF toolkit
Description: The {ti} package provides a set of tools for working with single-channel unsigned 8-bit integer TIFF images.
Authors: Bart Rogiers [cre, aut] (<https://orcid.org/0000-0002-8836-0988>, <https://rogiersbart.github.io>), SCK CEN [cph, fnd]
Maintainer: Bart Rogiers <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2024-11-23 05:18:29 UTC
Source: https://github.com/rogiersbart/ti

Help Index


Convert a brick of bytes to a TIFF image

Description

Convert a brick of bytes to a TIFF image

Usage

ff_bob2tif(path, dims, out = fs::path_ext_set(path, "tif"))

Arguments

path

Input image path.

dims

Dimension vector for the TIF image dimensions.

out

Output image path. Defaults to the input image path, with .tif extension.

Value

The image array, invisibly.


Compress a TIFF image

Description

Compress a TIFF image

Usage

ff_compress(path, type = "deflate", out = path)

Arguments

path

Input image path.

type

Type of compression to apply ("none", "LZW", "PackBits", "RLE", "JPEG", "deflate" (default) or "Zip").

out

Output image path. Defaults to the input image path.

Value

The output image, invisibly.


Convert a CSV file to a TIFF image

Description

Convert a CSV file to a TIFF image

Usage

ff_csv2tif(path, dims, out = fs::path_ext_set(path, "tif"))

Arguments

path

Input image path.

dims

Dimension vector for the TIF image dimensions.

out

Output image path. Defaults to the input image path, with .tif extension.

Value

The image array, invisibly.


Extract specific frames from a multi-frame TIFF

Description

Extract specific frames from a multi-frame TIFF

Usage

ff_extract(path, frames, out = fs::path_ext_set(path, "%frame.tif"))

Arguments

path

Path of the multi-frame TIFF.

frames

Frame numbers to extract.

out

Path for the output single-frame images, using "%frame" as placeholder for the frame number. Defaults to the input file path with extension ".001.tif" etc.


Invert a TIFF image

Description

Invert a TIFF image

Usage

ff_invert(path, out = path)

Arguments

path

Input image path.

out

Output image path. Defaults to the input image path.

Value

The output image, invisibly.


Merge single-frame images into a multi-frame TIFF

Description

Merge single-frame images into a multi-frame TIFF

Usage

ff_merge(paths, out)

Arguments

paths

Paths to the single-frame images to be merged.

out

Path to the output multi-frame TIFF.


Convert a NumPy array to a TIFF image

Description

Convert a NumPy array to a TIFF image

Usage

ff_npy2tif(path, out = fs::path_ext_set(path, "tif"))

Arguments

path

Input image path.

out

Output image path. Defaults to the input image path, with .tif extension.

Value

The image array, invisibly.


Convert a PNG image to a TIFF image

Description

Convert a PNG image to a TIFF image

Usage

ff_png2tif(path, out = fs::path_ext_set(path, "tif"))

Arguments

path

Input image path.

out

Output image path. Defaults to the input image path, with .tif extension.

Value

The image array, invisibly.


Read a TIFF image

Description

Read a TIFF image

Usage

ff_read(path)

Arguments

path

Image path.


Split a multi-frame TIFF into single-frame images

Description

Split a multi-frame TIFF into single-frame images

Usage

ff_split(path, out = fs::path_ext_set(path, "%frame.tif"))

Arguments

path

Path of the multi-frame TIFF.

out

Path for the output single-frame images, using "%frame" as placeholder for the frame number. Defaults to the input file path with extension ".001.tif" etc.


Stretch the contrast of a TIFF image

Description

Stretch the contrast of a TIFF image

Usage

ff_stretch(path, out = path)

Arguments

path

Input image path.

out

Output image path. Defaults to the input image path.

Value

The output image, invisibly.


Convert a TIFF image to a brick of bytes

Description

Convert a TIFF image to a brick of bytes

Usage

ff_tif2bob(path, out = fs::path_ext_set(path, "bob"))

Arguments

path

Input image path.

out

Output image path. Defaults to the input image path, with .tif extension.

Value

The image array, invisibly.


Convert a TIFF image to a CSV file

Description

Convert a TIFF image to a CSV file

Usage

ff_tif2csv(path, out = fs::path_ext_set(path, "csv"))

Arguments

path

Input image path.

out

Output image path. Defaults to the input image path, with .tif extension.

Value

The image array, invisibly.


Convert a TIFF image to a NumPy array

Description

Convert a TIFF image to a NumPy array

Usage

ff_tif2npy(path, out = fs::path_ext_set(path, "npy"))

Arguments

path

Input image path.

out

Output image path. Defaults to the input image path, with .tif extension.

Value

The image array, invisibly.


Convert a TIFF image to a PNG image

Description

Convert a TIFF image to a PNG image

Usage

ff_tif2png(path, out = fs::path_ext_set(path, "png"))

Arguments

path

Input image path.

out

Output image path. Defaults to the input image path, with .tif extension.

Value

The image array, invisibly.


Transpose a TIFF image

Description

Transpose a TIFF image

Usage

ff_transpose(path, dims, out = path)

Arguments

path

Input image path.

dims

The dimension permutation vector.

out

Output image path. Defaults to the input image path.

Value

The output image, invisibly.


Write a TIFF image

Description

Write a TIFF image

Usage

ff_write(img, path, compression = "deflate")

Arguments

img

2D or 3D array.

path

Path to write to.

compression

Type of compression to apply ("none", "LZW", "PackBits", "RLE", "JPEG", "deflate" (default) or "Zip").