Class CalculateNumberVoxels
- All Implemented Interfaces:
ResettableCalculation
Calculates the number of voxels in a single object, optionally flattening in the Z-dimension.
This calculation part can either count the voxels in the 3D object or in its 2D projection
(flattened in the Z-dimension), depending on the flattenZ parameter.
-
Constructor Summary
ConstructorsConstructorDescriptionCalculateNumberVoxels(boolean flattenZ) Creates a newCalculateNumberVoxelsinstance. -
Method Summary
Methods inherited from class org.anchoranalysis.feature.calculate.part.CalculationPart
getOrCalculate, hasCachedResult, invalidate
-
Constructor Details
-
CalculateNumberVoxels
public CalculateNumberVoxels(boolean flattenZ) Creates a newCalculateNumberVoxelsinstance.- Parameters:
flattenZ- Whether to flatten the object in the Z-dimension before counting voxels.
-
-
Method Details
-
execute
Executes the calculation to count the number of voxels in the object.- Specified by:
executein classCalculationPart<Double,FeatureInputSingleObject> - Parameters:
input- The input single object.- Returns:
- The number of voxels in the object (or its 2D projection if
flattenZis true).
-
equals
- Specified by:
equalsin classCalculationPart<Double,FeatureInputSingleObject>
-
canEqual
-
hashCode
public int hashCode()- Specified by:
hashCodein classCalculationPart<Double,FeatureInputSingleObject>
-