Class VoxelScore
Object
org.anchoranalysis.bean.AnchorBean<B>
org.anchoranalysis.bean.initializable.InitializableBean<T,ImageInitialization>
org.anchoranalysis.image.bean.ImageBean<VoxelScore>
org.anchoranalysis.image.feature.bean.VoxelScore
public abstract class VoxelScore extends ImageBean<VoxelScore>
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 Constructor Description VoxelScore() -
Method Summary
Modifier and Type Method Description abstract doublecalculate(int[] voxelIntensities)Calculates a score for a set of voxel intensities.voidinitialize(List<org.anchoranalysis.math.histogram.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<org.anchoranalysis.math.histogram.Histogram> histograms, Optional<Dictionary> dictionary) throws InitializeExceptionInitializes 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
-