Package qupath.lib.regions
Class ImagePlane
java.lang.Object
qupath.lib.regions.ImagePlane
- All Implemented Interfaces:
Comparable<ImagePlane>
Helper class to store z-slice and time point indices, optionally along with a channel index as well.
These values are frequently required together, such as with ROIs and RegionRequests.
It is more convenient (and less error-prone) to use a single ImagePlane instance rather than passing the indices as
separate integers each time they are needed.
- Author:
- Pete Bankhead
-
Method Summary
Modifier and TypeMethodDescriptionintCompare with another ImagePlane, in the order t, z, c.booleanintgetC()Get the channel index.static ImagePlaneReturns an ImagePlane with channel -1, z of 0 and t of 0.static ImagePlanegetPlane(int z, int t) Returns an ImagePlus, where the z-slice and time point can be specified and channel is ignored (i.e.static ImagePlanegetPlane(ImageRegion region) Returns an ImagePlane with channel -1 and z and t set from an existing ImageRegion.static ImagePlaneReturns an ImagePlane with channel -1, and z and t set from an existing ROI.static ImagePlanegetPlaneWithChannel(int c, int z, int t) Returns an ImagePlane, where the channel, z-slice and time point can be specified.static ImagePlanegetPlaneWithChannel(ROI roi) Returns an ImagePlane with channel, z and t set from an existing ROI.intgetT()Get the time point index.intgetZ()Get the z-slice index.inthashCode()toString()
-
Method Details
-
getC
public int getC()Get the channel index. This may be -1 to indicate no channel is specified.- Returns:
-
getZ
public int getZ()Get the z-slice index.- Returns:
-
getT
public int getT()Get the time point index.- Returns:
-
compareTo
Compare with another ImagePlane, in the order t, z, c.- Specified by:
compareToin interfaceComparable<ImagePlane>
-
toString
-
hashCode
public int hashCode() -
equals
-
getPlane
Returns an ImagePlus, where the z-slice and time point can be specified and channel is ignored (i.e. set to -1).- Parameters:
z-t-- Returns:
-
getDefaultPlane
Returns an ImagePlane with channel -1, z of 0 and t of 0.Use of this method is discouraged; it is appropriate only for 2D images.
- Returns:
-
getPlaneWithChannel
Returns an ImagePlane with channel, z and t set from an existing ROI.- Parameters:
roi-- Returns:
-
getPlane
Returns an ImagePlane with channel -1, and z and t set from an existing ROI.- Parameters:
roi-- Returns:
-
getPlane
Returns an ImagePlane with channel -1 and z and t set from an existing ImageRegion.- Parameters:
region-- Returns:
-
getPlaneWithChannel
Returns an ImagePlane, where the channel, z-slice and time point can be specified.- Parameters:
c-z-t-- Returns:
-