ImgUtils Class Documentation#

Package: sc.fiji.snt.util

Static utilities for handling and manipulation of `RandomAccessibleInterval`s

Methods#

Getters Methods#

static getCalibration(ImgPlus)
static getCtSlice(Dataset, int, int)
static getCtSlice3d(ImagePlus, int, int)

Get a view of the ImagePlus at the specified channel and frame.

static getOrigin(ImgPlus, AxisType)
static getOrigins(ImgPlus)

Other Methods#

static createIntervals([J, [J)

Partition the source dimensions into a list of Intervals with given dimensions. If the block dimensions are not multiples of the image dimensions, some blocks will have slightly different dimensions.

static crop(ImgPlus, [J, [J, boolean)
static dropSingletonDimensions(ImgPlus)
static findSpatialAxisIndices(ImgPlus)
static findSpatialAxisIndicesWithFallback(ImgPlus)
static imgPlusToCalibration(ImgPlus)
static impToRealRai5d(ImagePlus)

Wrap an ImagePlus to a RandomAccessibleInterval such that the number of dimensions in the resulting rai is 5 and the axis order is XYCZT. Axes that are not present in the input imp have singleton dimensions in the rai.

For example, given a 2D, multichannel imp, the dimensions of the result rai are [ |X|, |Y|, |C|, 1, 1 ]

static maxDimension([J)
static outOfBounds([J, [J, [J)

Checks if pos is outside the bounds given by min and max

static raiToImp(RandomAccessibleInterval, String)

Convert a RandomAccessibleInterval to an ImagePlus. If the input has 3 dimensions, the 3rd dimension is treated as depth.

static splitIntoBlocks(RandomAccessibleInterval, [J)

Partition the source rai into a list of IntervalView with given dimensions. If the block dimensions are not multiples of the image dimensions, some blocks will have truncated dimensions.

static subInterval(RandomAccessibleInterval, Localizable, Localizable, long)

Get an N-D sub-interval of an N-D image, given two corner points and specified padding. If necessary, the computed sub-interval is clamped at the min and max of each dimension of the input interval.

static subVolume(RandomAccessibleInterval, long, long, long, long, long, long, long)

Get a 3D sub-volume of an image, given two corner points and specified padding. If the input is 2D, a singleton dimension is added. If necessary, the computed sub-volume is clamped at the min and max of each dimension of the input interval.

static toImagePlus(ImgPlus)
static wrapWithAxes(RandomAccessibleInterval, ImgPlus, String)

See Also#