Class BlurStrategy
- Direct Known Subclasses:
BlurGaussian3D,BlurGaussianEachSlice2D
A method for applying blurring to an image.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidblur(VoxelsUntyped voxels, Dimensions dimensions, MessageLogger logger) Applies the blur operation to the given voxels.protected doublecalculateSigma(Dimensions dimensions, MessageLogger logger) Calculates the sigma value to use for blurring, considering the dimensions and whether sigma is in meters.doublegetSigma()The sigma value for the blur operation.booleanIf true, treats sigma as if it's in meters (physical units).voidsetSigma(double sigma) The sigma value for the blur operation.voidsetSigmaInMeters(boolean sigmaInMeters) If true, treats sigma as if it's in meters (physical units).Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
BlurStrategy
public BlurStrategy()
-
-
Method Details
-
blur
public abstract void blur(VoxelsUntyped voxels, Dimensions dimensions, MessageLogger logger) throws OperationFailedException Applies the blur operation to the given voxels.- Parameters:
voxels- theVoxelsUntypedto blurdimensions- theDimensionsof the voxelslogger- theMessageLoggerfor logging messages- Throws:
OperationFailedException- if the blur operation fails
-
calculateSigma
protected double calculateSigma(Dimensions dimensions, MessageLogger logger) throws OperationFailedException Calculates the sigma value to use for blurring, considering the dimensions and whether sigma is in meters.- Parameters:
dimensions- theDimensionsof the imagelogger- theMessageLoggerfor logging messages- Returns:
- the calculated sigma value
- Throws:
OperationFailedException- if the calculation fails or the sigma is too large
-
getSigma
public double getSigma()The sigma value for the blur operation. -
setSigma
public void setSigma(double sigma) The sigma value for the blur operation. -
isSigmaInMeters
public boolean isSigmaInMeters()If true, treats sigma as if it's in meters (physical units). If false, treats sigma as if it's in pixels. -
setSigmaInMeters
public void setSigmaInMeters(boolean sigmaInMeters) If true, treats sigma as if it's in meters (physical units). If false, treats sigma as if it's in pixels.
-