Comprehensive TIFF I/O with Full Support for 'ImageJ' TIFF Files

General purpose TIFF file I/O for R users. Currently the only such package with read and write support for TIFF files with floating point (real-numbered) pixels, and the only package that can correctly import TIFF files that were saved from 'ImageJ' and write TIFF files than can be correctly read by 'ImageJ' < https://imagej.nih.gov/ij/>. Also supports text image I/O.


Travis-CI BuildStatus AppVeyor BuildStatus codecov

CRAN_Status_Badge RStudio CRANdownloads RStudio CRAN monthlydownloads Rdocumentation

Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped. lifecycle

DOI DOI

Introduction

This is a general purpose TIFF I/O utility for R. The tiff package already exists for this purpose but ijtiff adds some functionality and overcomes some bugs therein.

  • ijtiff can write TIFF files whose pixel values are real (floating-point) numbers; tiff cannot.
  • ijtiff can read and write text images; tiff cannot.
  • tiff struggles to interpret channel information and gives cryptic errors when reading TIFF files written by the ImageJ software; ijtiff works smoothly with these images.

To learn about ijtiff and how to use it, visit the package website at https://ropensci.github.io/ijtiff.

Installation

libtiff

ijtiff requires you to have the libtiff C library installed. To install libtiff:

  • On Debian Linux, try sudo apt-get install libtiff5-dev, or if that fails, try
    sudo apt-get install libtiff4-dev.
  • On Fedora Linux, try sudo yum install libtiff5-dev, or if that doesn’t work, try
    sudo yum install libtiff4-dev.
  • On Mac, you need Homebrew. Then in the terminal, run brew install libtiff.
  • On 64-bit Windows, no setup is required 😄. If you have 32-bit windows, you need to install libtiff from http://gnuwin32.sourceforge.net/packages/tiff.htm.

Installing the release version of the ijtiff R package

You can install ijtiff from CRAN (recommended) with:

install.packages("ijtiff")

Installing the development version of the ijtiff R package

You can install the development version from GitHub with:

devtools::install_github("ropensci/ijtiff")

Acknowledgement

This package uses a lot of code from the original tiff package by Simon Urbanek.

Advice for Package Authors

If you’re authoring a package which is to depend on ijtiff and you’re using AppVeyor, be sure to force AppVeyor to use 64-bit architecture. This avoids some peculiarities of 32-bit AppVeyor which cause ijtiff installations to fail. You can see how to do this in the appveyor.yml file in this repository.

Contribution

Contributions to this package are welcome. The preferred method of contribution is through a github pull request. Feel free to contact me by creating an issue. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

ropensci_footer

News

ijtiff 1.5.0

NEW FEATURES

  • Allow ZIP compression (which seems to be the best).

BUG FIXES

  • write_txt_img() was using decimal points for integers (e.g. 3.000 instead of just 3).

ijtiff 1.4.2

BUG FIXES

  • Hacky fix for configure script to deal with lack of -ljbig on Solaris.
  • Trim the package to below 5MB by compressing a few TIFF files.

ijtiff 1.4.1

NEW FEATURES

  • The package is now lighter in appearance because it doesn't explicitly depend on tibble.

BUG FIXES

  • The configure script now allows for needing --static with pkg-config.

ijtiff 1.4.0

NEW FEATURES

  • A pkgdown website.

MINOR IMPROVEMENTS

  • Better vignettes.
  • Better error messages.

ijtiff 1.3.0

NEW FEATURES

  • Conversion functions linescan_to_stack() and stack_to_linescan() useful for FCS data.

ijtiff 1.2.0

MINOR IMPROVEMENTS

  • Improved the description of the package in DESCRIPTION, vignette and README.
  • Added a hex sticker.
  • Limited support for tiled images thanks to new author Kent Johnson.
  • write_tif() is now slightly (<10%) faster.
  • write_tif() messages are now more informative.

ijtiff 1.1.0

NEW FEATURES

  • count_imgs() counts the number of images in a TIFF file without reading the images themselves.
  • read_tags() reads the tags from TIFF images without reading the images themselves.

MINOR IMPROVEMENTS

  • Now includes citation information.
  • C code is more readable.
  • display() is more flexible, accepting 3 and 4-dimensional arrays, just displaying the first frame from the first channel.

ijtiff 1.0.0

PEER REVIEW

  • The package is now peer reviewed by ROpenSci.

ijtiff 0.3.0

MINOR IMPROVEMENTS

  • Improve README and vignette with more tangible and fun example.

BUG FIXES

  • Fix windows libtiff issues (thanks to Jeroen Ooms).
  • Found some ImageJ-written TIFFs that weren't being read correctly and fixed that.
  • Fix protection stack overflow error for TIFFs with many images.

ijtiff 0.2.0

  • First CRAN release.

MINOR IMPROVEMENTS

  • Include handy shortcuts for 2- and 3-dimensional arrays.
  • Messasges to inform the user about what kind of image is being read/written.

ijtiff 0.1.0

  • First github release.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("ijtiff")

2.0.4 by Rory Nolan, a month ago


https://docs.ropensci.org/ijtiff, https://www.github.com/ropensci/ijtiff#readme


Report a bug at https://www.github.com/ropensci/ijtiff/issues


Browse source code at https://github.com/cran/ijtiff


Authors: Rory Nolan [aut, cre] , Kent Johnson [aut] , Simon Urbanek [ctb] , Sergi Padilla-Parra [ths] , Jeroen Ooms [rev, ctb] , Jon Clayden [rev]


Documentation:   PDF Manual  


GPL-3 license


Imports checkmate, dplyr, filesstrings, fs, glue, graphics, grDevices, magrittr, methods, purrr, Rcpp, readr, rlang, stringr, withr

Suggests abind, covr, EBImage, knitr, pacman, rmarkdown, spelling, testthat, tiff

Linking to Rcpp

System requirements: libtiff, libjpeg, zlib


Imported by autothresholdr, detrendr, nandb.


See at CRAN