Class BlurStrategy

Object
AnchorBean<BlurStrategy>
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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    blur(VoxelsUntyped voxels, Dimensions dimensions, MessageLogger logger)
    Applies the blur operation to the given voxels.
    protected double
    calculateSigma(Dimensions dimensions, MessageLogger logger)
    Calculates the sigma value to use for blurring, considering the dimensions and whether sigma is in meters.
    double
    The sigma value for the blur operation.
    boolean
    If true, treats sigma as if it's in meters (physical units).
    void
    setSigma(double sigma)
    The sigma value for the blur operation.
    void
    setSigmaInMeters(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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.