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 newCalculateNumberVoxels
instance. -
Method Summary
Methods inherited from class org.anchoranalysis.feature.calculate.part.CalculationPart
getOrCalculate, hasCachedResult, invalidate
-
Constructor Details
-
CalculateNumberVoxels
public CalculateNumberVoxels(boolean flattenZ) Creates a newCalculateNumberVoxels
instance.- 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:
execute
in classCalculationPart<Double,
FeatureInputSingleObject> - Parameters:
input
- The input single object.- Returns:
- The number of voxels in the object (or its 2D projection if
flattenZ
is true).
-
equals
- Specified by:
equals
in classCalculationPart<Double,
FeatureInputSingleObject>
-
canEqual
-
hashCode
public int hashCode()- Specified by:
hashCode
in classCalculationPart<Double,
FeatureInputSingleObject>
-