public class ROIVolumeDescriptor extends ROIDescriptor
ROIDescriptor)| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ID |
| Constructor and Description |
|---|
ROIVolumeDescriptor() |
| 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.
|
static double |
computeVolume(double interiorPoints,
ROI roi,
Sequence sequence)
Computes and returns the volume from a given number of interior points expressed in the
unit of the descriptor (see
getUnit(Sequence)) for the specified sequence and ROI. |
static double |
computeVolume(ROI roi,
Sequence sequence)
Computes and returns the volume 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 |
getUnit(Sequence sequence)
Returns the unit of this descriptor (
ex: "px", "mm", "µm2"... |
boolean |
needRecompute(SequenceEvent change)
Returns
true if this descriptor need to be recomputed when the specified Sequence change event
happen. |
computeDescriptor, computeDescriptor, equals, getDescriptor, getDescriptor, getDescriptors, getId, getName, getType, hashCode, needRecompute, separateChannel, toStringpublic static final java.lang.String ID
public ROIVolumeDescriptor()
public java.lang.String getDescription()
ROIDescriptorgetDescription in class ROIDescriptorpublic java.lang.String getUnit(Sequence sequence)
ROIDescriptorex: "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 ROIDescriptorsequence - the sequence on which we want to compute the descriptor (if required) to get access to
the pixel size informations and return according unitpublic boolean needRecompute(SequenceEvent change)
ROIDescriptortrue if this descriptor need to be recomputed when the specified Sequence change event
happen.false, override this method if a descriptor need a specific implementation.needRecompute in class ROIDescriptorROIDescriptor.compute(ROI, Sequence)public java.lang.Object compute(ROI roi, Sequence sequence) throws java.lang.UnsupportedOperationException
ROIDescriptorcompute in class ROIDescriptorroi - the ROI on which the descriptor(s) should be computedsequence - an optional sequence where the pixel informations can be retrieved (see ROIDescriptor.separateChannel())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 itpublic static double computeVolume(ROI roi, Sequence sequence) throws java.lang.UnsupportedOperationException
getUnit(Sequence)) for the
specified ROI.UnsupportedOperationException if the operation is not supported for that ROI.roi - the ROI on which we want to compute the volumesequence - an optional sequence where the pixel size can be retrievedgetUnit(Sequence))java.lang.UnsupportedOperationException - if the operation is not supported for this ROIpublic static double computeVolume(double interiorPoints, ROI roi, Sequence sequence) throws java.lang.UnsupportedOperationException
getUnit(Sequence)) for the specified sequence and ROI.Double.Nan if the operation is not supported for that ROI.interiorPoints - the number of interior points (override the ROI value)roi - the ROI we want to compute the volumesequence - the input sequence used to retrieve operation unit by using pixel size
information.getUnit(Sequence))java.lang.UnsupportedOperationException - if the operation is not supported for this ROI