Module imp3d

Class Filter

All Implemented Interfaces:
ChannelMap, Manageable, PersistenceCapable, Shareable, UserFields, XObject, Map, Serializable
Direct Known Subclasses:
Laplace3D, Smooth3D

public abstract class Filter extends ChannelMapNode
A Filter is the base for 3D image filtering operations. Subclasses provide a 3D filter coefficient matrix (which is queried by the getCoefficient* functions). The filter is applied to the requested channel by sampling values for each coefficient in the matrix and then calculating the weigthed sum. The size of the sampling cube can be adjusted by the fields sx, sy and sy (in x/y/z and u/v directions).
Author:
nmi
See Also:
  • Field Details

  • Constructor Details

    • Filter

      public Filter()
  • Method Details

    • getSx

      public float getSx()
    • setSx

      public void setSx(float value)
    • getSy

      public float getSy()
    • setSy

      public void setSy(float value)
    • getSz

      public float getSz()
    • setSz

      public void setSz(float value)
    • getCoefficient

      protected abstract float getCoefficient(int gx, int gy, int gz)
      Get the coefficient at position (gx/gy/gz) in the filter matrix. The functions getCoefficientMaskSize* are used to obtain the indexable range (i.e. sx, sy and sz), so 0 <= gx <= sx. Derived classes implement this function to provide filter coefficients. The Filter class will perform the filtering by applying those coefficients as weigths to the sampled values from the input channel.
      Parameters:
      gx -
      gy -
      gz -
      Returns:
    • getFloatValue

      public float getFloatValue(ChannelData data, int channel)
      Specified by:
      getFloatValue in interface ChannelMap
      Overrides:
      getFloatValue in class ChannelMapNode
    • accept

      public void accept(ChannelMapNodeVisitor visitor)
      Overrides:
      accept in class ChannelMapNode