VNC analogue of lsm_to_nrrd for sources that have already been registered into a Janelia template space and arrive as plain ImageJ hyperstack TIFFs (no LSM metadata). The caller passes the voxdims they know from the target template — the ImageJ TIFF resolution tags are typically uncalibrated for these "registered" exports and would otherwise read as 1 px / unit.

Pure R: uses tiff::readTIFF to read every page of the hyperstack, infers the channel/slice axis order from the ImageDescription tag (channels=, slices=), and writes per-channel im3d NRRDs via nat::write.nrrd.

tif_to_nrrd_channels(
  input,
  output_dir,
  voxdims,
  prefix = NULL,
  channels = c(0L, 1L),
  labels = NULL,
  verbose = TRUE
)

Arguments

input

path to a 2-channel ImageJ-format TIFF.

output_dir

directory for output NRRDs (created if missing).

voxdims

length-3 numeric c(x, y, z) voxel size in microns (e.g. c(0.4, 0.4, 0.4) for a JRCVNC2018F-aligned source).

prefix

optional output stem (default = input file basename).

channels

integer indices of the channels to extract (zero-based, matching the TIFF order). Default c(0L, 1L).

labels

per-channel labels used in the output filenames (<stem>_<label>.nrrd). Defaults to ch0, ch1, ...

verbose

logical; emit a one-line shape summary.

Value

a named character vector of absolute NRRD paths, one per requested channel.