Class VoxelScore
- Direct Known Subclasses:
Difference,Identity,IdentityImposeValueRelationToHistogram,OutsideRange,RejectIfIntensityLessThan,SingleChannel
Calculates a per-voxel score.
This abstract class provides a framework for calculating scores on a per-voxel basis.
Implementations should define the specific scoring algorithm in the calculate(int[]) method.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract doublecalculate(int[] voxelIntensities) Calculates a score for a set of voxel intensities.voidinitialize(List<Histogram> histograms, Optional<Dictionary> dictionary) Initializes the voxels-score.Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
VoxelScore
public VoxelScore()
-
-
Method Details
-
initialize
public void initialize(List<Histogram> histograms, Optional<Dictionary> dictionary) throws InitializeException Initializes the voxels-score.Must be called before
calculate(int[]).- Parameters:
histograms- one or more histograms associated with this calculationdictionary- optionalDictionaryassociated with this calculation- Throws:
InitializeException- if anything goes wrong
-
calculate
Calculates a score for a set of voxel intensities.- Parameters:
voxelIntensities- an array of voxel intensity values- Returns:
- the calculated score for the given voxel intensities
- Throws:
FeatureCalculationException- if the calculation fails
-