Class Quantile
Calculates the threshold value from a quantile of a histogram.
By default, it calculates the median i.e. quantile of 0.5
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
calculateLevel
(Histogram histogram) Determines a voxel intensity that can be used for thresholding.protected boolean
boolean
double
int
hashCode()
boolean
isAddOne()
void
setAddOne
(boolean addOne) void
setQuantile
(double quantile) Methods inherited from class org.anchoranalysis.bean.NullParametersBean
initializeRecursive, onInitialization, onInitialization
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
Quantile
public Quantile()
-
-
Method Details
-
calculateLevel
Description copied from class:CalculateLevel
Determines a voxel intensity that can be used for thresholding.- Specified by:
calculateLevel
in classCalculateLevel
- Parameters:
histogram
- a histogram of voxel-intensities from which a threshold-level can be derived.- Returns:
- the threshold-level.
- Throws:
OperationFailedException
- if a level cannot be successfully calculated.
-
equals
- Specified by:
equals
in classCalculateLevel
-
canEqual
-
hashCode
public int hashCode()- Specified by:
hashCode
in classCalculateLevel
-
getQuantile
public double getQuantile() -
setQuantile
public void setQuantile(double quantile) -
isAddOne
public boolean isAddOne() -
setAddOne
public void setAddOne(boolean addOne)
-