public class SurfaceAreaROIDescriptor extends ROIDescriptor
ROIDescriptor
)Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID |
Constructor and Description |
---|
SurfaceAreaROIDescriptor() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
compute(ROI roi,
Sequence sequence,
int z,
int t,
int c)
Computes the descriptor on the specified ROI and return the result.
|
static double |
computeSurfaceArea(ROI roi,
Sequence sequence,
int z,
int t,
int c)
Computes and returns the surface area expressed in the unit of the descriptor (see
getUnit(Sequence) ) for the specified ROI. |
java.lang.String |
getDescription()
Returns a single line description (used as tooltip) for this descriptor
|
java.lang.String |
getId()
Returns the id of this descriptor.
|
java.lang.String |
getName()
Returns the name of this descriptor.
|
java.lang.Class<?> |
getType()
Returns the type of result for this descriptor
|
java.lang.String |
getUnit(Sequence sequence)
Returns the unit of this descriptor (
ex: "px", "mm", "µm2"... |
compute, equals, hashCode
public static final java.lang.String ID
public SurfaceAreaROIDescriptor()
public java.lang.String getId()
ROIDescriptor
getId
in class ROIDescriptor
public java.lang.String getName()
ROIDescriptor
getName
in class ROIDescriptor
public java.lang.String getDescription()
ROIDescriptor
getDescription
in class ROIDescriptor
public java.lang.String getUnit(Sequence sequence)
ROIDescriptor
ex: "px", "mm", "µm2"...
).
It can return an empty or null
string (default implementation) if there is no
specific unit attached to the descriptor.getUnit
in class ROIDescriptor
sequence
- the sequence on which we want to compute the descriptor (if required) to get access to
the pixel size informations and return according unitpublic java.lang.Class<?> getType()
ROIDescriptor
getType
in class ROIDescriptor
ROIDescriptor.compute(ROI, Sequence, int, int, int)
public java.lang.Object compute(ROI roi, Sequence sequence, int z, int t, int c) throws java.lang.UnsupportedOperationException
ROIDescriptor
compute
in class ROIDescriptor
roi
- the ROI on which the descriptor(s) should be computedsequence
- an optional sequence where the pixel size can be retrievedz
- the specific Z position (slice) where we want to compute the descriptor or
-1
to compute it over the whole ROI Z dimension.t
- the specific T position (frame) where we want to compute the descriptor or
-1
to compute it over the whole ROI T dimension.c
- the specific C position (channel) where we want to compute the descriptor or
-1
to compute it over the whole ROI C dimension.java.lang.UnsupportedOperationException
- if the type of the given ROI is not supported by this descriptor, or if
sequence
is null
while the calculation requires it, or if
the specified Z, T or C position are not supported for this descriptorpublic static double computeSurfaceArea(ROI roi, Sequence sequence, int z, int t, int c) throws java.lang.UnsupportedOperationException
getUnit(Sequence)
) for the specified ROI.Double.Nan
if the operation is not supported for that ROI.roi
- the ROI on which we want to compute the surface areasequence
- an optional sequence where the pixel size can be retrievedz
- the specific Z position (slice) where we want to compute the descriptor or
-1
to compute it over the whole ROI Z dimension.t
- the specific T position (frame) where we want to compute the descriptor or
-1
to compute it over the whole ROI T dimension.c
- the specific C position (channel) where we want to compute the descriptor or
-1
to compute it over the whole ROI C dimension.java.lang.UnsupportedOperationException
- if the specified Z, T or C position are not supported for this descriptor or if
surface area calculation is not supported on this ROI.