Class IdentityImposeValueRelationToHistogram
A voxel score that imposes a value relation to a histogram.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
calculate
(int[] voxelIntensities) Calculates a score for a set of voxel intensities.int
The index of the energy channel to check.int
The index of the energy channel to use if the relation check fails.int
The index of the histogram to use for comparison.The relation to test between the voxel value and the histogram value.double
getValue()
The value to return if the relation test passes.void
initialize
(List<Histogram> histograms, Optional<Dictionary> dictionary) Initializes the voxels-score.boolean
isMax()
Whether to use the maximum (true) or minimum (false) value from the histogram.void
setEnergyChannelIndexCheck
(int energyChannelIndexCheck) The index of the energy channel to check.void
setEnergyChannelIndexFail
(int energyChannelIndexFail) The index of the energy channel to use if the relation check fails.void
setHistogramIndex
(int histogramIndex) The index of the histogram to use for comparison.void
setMax
(boolean max) Whether to use the maximum (true) or minimum (false) value from the histogram.void
setRelation
(RelationBean relation) The relation to test between the voxel value and the histogram value.void
setValue
(double value) The value to return if the relation test passes.Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
IdentityImposeValueRelationToHistogram
public IdentityImposeValueRelationToHistogram()
-
-
Method Details
-
calculate
Description copied from class:VoxelScore
Calculates a score for a set of voxel intensities.- Specified by:
calculate
in classVoxelScore
- Parameters:
voxelIntensities
- an array of voxel intensity values- Returns:
- the calculated score for the given voxel intensities
- Throws:
FeatureCalculationException
- if the calculation fails
-
initialize
public void initialize(List<Histogram> histograms, Optional<Dictionary> dictionary) throws InitializeException Description copied from class:VoxelScore
Initializes the voxels-score.Must be called before
VoxelScore.calculate(int[])
.- Overrides:
initialize
in classVoxelScore
- Parameters:
histograms
- one or more histograms associated with this calculationdictionary
- optionalDictionary
associated with this calculation- Throws:
InitializeException
- if anything goes wrong
-
getEnergyChannelIndexCheck
public int getEnergyChannelIndexCheck()The index of the energy channel to check. -
setEnergyChannelIndexCheck
public void setEnergyChannelIndexCheck(int energyChannelIndexCheck) The index of the energy channel to check. -
getEnergyChannelIndexFail
public int getEnergyChannelIndexFail()The index of the energy channel to use if the relation check fails. -
setEnergyChannelIndexFail
public void setEnergyChannelIndexFail(int energyChannelIndexFail) The index of the energy channel to use if the relation check fails. -
getHistogramIndex
public int getHistogramIndex()The index of the histogram to use for comparison. -
setHistogramIndex
public void setHistogramIndex(int histogramIndex) The index of the histogram to use for comparison. -
getRelation
The relation to test between the voxel value and the histogram value. -
getValue
public double getValue()The value to return if the relation test passes. -
setValue
public void setValue(double value) The value to return if the relation test passes. -
isMax
public boolean isMax()Whether to use the maximum (true) or minimum (false) value from the histogram. -
setMax
public void setMax(boolean max) Whether to use the maximum (true) or minimum (false) value from the histogram.
-