Class BlurStrategy

Direct Known Subclasses:
BlurGaussian3D, BlurGaussianEachSlice2D

public abstract class BlurStrategy extends AnchorBean<BlurStrategy>
A method for applying blurring to an image.
Author:
Owen Feehan
  • 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 - the VoxelsUntyped to blur
      dimensions - the Dimensions of the voxels
      logger - the MessageLogger for 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 - the Dimensions of the image
      logger - the MessageLogger for 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.