public abstract class ROIDescriptor extends java.lang.Object
Constructor and Description |
---|
ROIDescriptor() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
compute(ROI roi,
Sequence sequence)
Computes the descriptor on the specified ROI and return the result.
|
abstract 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.
|
boolean |
equals(java.lang.Object obj) |
abstract 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.
|
abstract java.lang.String |
getName()
Returns the name of this descriptor.
|
abstract 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"... |
int |
hashCode() |
public ROIDescriptor()
public java.lang.String getId()
public abstract java.lang.String getName()
public abstract java.lang.String getDescription()
public java.lang.String getUnit(Sequence sequence)
ex: "px", "mm", "µm2"...
).
It can return an empty or null
string (default implementation) if there is no
specific unit attached to the descriptor.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 abstract java.lang.Class<?> getType()
public abstract java.lang.Object compute(ROI roi, Sequence sequence, int z, int t, int c) throws java.lang.UnsupportedOperationException
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 java.lang.Object compute(ROI roi, Sequence sequence) throws java.lang.UnsupportedOperationException
roi
- the ROI on which the descriptor(s) should be computedsequence
- an optional sequence where the pixel size can be retrievedjava.lang.UnsupportedOperationException
- if the type of the given ROI is not supported by this descriptor, or if
sequence
is null
while the calculation requires itpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object