com.xinapse.filter
Class LaplacianFilter

java.lang.Object
  extended by com.xinapse.filter.AbstractKernelFilter
      extended by com.xinapse.filter.FixedWeightsKernelFilter
          extended by com.xinapse.filter.LaplacianFilter
All Implemented Interfaces:
SpatialFilter
Direct Known Subclasses:
SharpenFilter

public class LaplacianFilter
extends FixedWeightsKernelFilter
implements SpatialFilter

A FixedWeightsKernelFilter for performing a Laplacian filtering of an image.


Nested Class Summary
static class LaplacianFilter.LaplacianSpecifierPanel
          A FilterSpecifierPanel for a Laplacian edge-detection filter.
 
Nested classes/interfaces inherited from interface com.xinapse.filter.SpatialFilter
SpatialFilter.SpecifierPanel
 
Field Summary
 
Fields inherited from class com.xinapse.filter.FixedWeightsKernelFilter
weights
 
Fields inherited from interface com.xinapse.filter.SpatialFilter
N_DOTS
 
Constructor Summary
protected LaplacianFilter(float[][][] weights)
           
 
Method Summary
static java.lang.String getName()
          Returns the human-readable name of this filter.
static java.lang.String getOptionName()
          Returns the name of this type of filter when specifying it in program optional arguments.
static org.apache.commons.cli.Options getOptions()
          Returns the options for this type of filter.
static SpatialFilter.SpecifierPanel getSpecifierPanel(java.lang.String preferencesNodeName)
          Returns a SpatialFilter.SpecifierPanel that can be used to set the parameters for a LaplacianFilter.
static void main(java.lang.String[] args)
          Runs a self-test of this class.
static LaplacianFilter new2DInstance(float pixelXSize, float pixelYSize, int kernelSize)
          Creates a new 2-D LaplacianFilter suitable for filtering an image with the given pixel sizes.
static LaplacianFilter new2DInstance(LoadableImage image, int kernelSize)
          Creates a new 2-D LaplacianFilter suitable for filtering the supplied image.
static LaplacianFilter new3DInstance(float pixelXSize, float pixelYSize, float pixelZSize, int kernelSize)
          Creates a new 3-D LaplacianFilter suitable for filtering an image to obtain the intensity gradient.
static LaplacianFilter new3DInstance(LoadableImage image, int kernelSize)
          Creates a new 3-D LaplacianFilter suitable for filtering the supplied image to obtain the intensity gradient.
static LaplacianFilter newInstance(org.apache.commons.cli.CommandLine commandLine, LoadableImage image)
          Creates a new LaplacianFilter using the supplied command line arguments.
 
Methods inherited from class com.xinapse.filter.FixedWeightsKernelFilter
add, add, convolve, copyResize, filterInPlaceBinary, filterInPlaceByte, filterInPlaceDouble, filterInPlaceFloat, filterInPlaceInt, filterInPlaceLong, filterInPlaceShort, filterInPlaceUByte, filterInPlaceUInt, filterInPlaceUShort, getNKernelCols, getNKernelRows, getNKernelSlices, scale, sumWeights, toString
 
Methods inherited from class com.xinapse.filter.AbstractKernelFilter
filter, filter, filter, filterInPlace, filterInPlace, filterInPlace, filterInPlace, filterInPlace, filterInPlace, filterInPlace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.xinapse.filter.SpatialFilter
filter, filter, filterInPlace, filterInPlace, filterInPlace, filterInPlace
 

Constructor Detail

LaplacianFilter

protected LaplacianFilter(float[][][] weights)
Method Detail

newInstance

public static LaplacianFilter newInstance(org.apache.commons.cli.CommandLine commandLine,
                                          LoadableImage image)
                                   throws com.xinapse.util.InvalidArgumentException
Creates a new LaplacianFilter using the supplied command line arguments.

Parameters:
commandLine - the command line from which a program is invoked.
image - the image to which this filter is designed to apply.
Throws:
com.xinapse.util.InvalidArgumentException

new2DInstance

public static LaplacianFilter new2DInstance(LoadableImage image,
                                            int kernelSize)
Creates a new 2-D LaplacianFilter suitable for filtering the supplied image.

Parameters:
image - the image to which this filter is designed to apply. The image pixel size is used to scale the kernel weights.
kernelSize - the (odd) kernel size for the filter.
Returns:
a LaplacianFilter.

new2DInstance

public static LaplacianFilter new2DInstance(float pixelXSize,
                                            float pixelYSize,
                                            int kernelSize)
Creates a new 2-D LaplacianFilter suitable for filtering an image with the given pixel sizes.

Parameters:
pixelXSize - the pixel width.
pixelYSize - the pixel height.
kernelSize - the (odd) kernel size for the filter.
Returns:
a LaplacianFilter.

new3DInstance

public static LaplacianFilter new3DInstance(LoadableImage image,
                                            int kernelSize)
                                     throws InvalidImageException
Creates a new 3-D LaplacianFilter suitable for filtering the supplied image to obtain the intensity gradient.

Parameters:
image - the image to which this filter is designed to apply. The image pixel size is used to determine the kernel weights.
kernelSize - the (odd) kernel size for the filter.
Returns:
a LaplacianFilter.
Throws:
InvalidImageException - if the supplied image is invalid.

new3DInstance

public static LaplacianFilter new3DInstance(float pixelXSize,
                                            float pixelYSize,
                                            float pixelZSize,
                                            int kernelSize)
Creates a new 3-D LaplacianFilter suitable for filtering an image to obtain the intensity gradient.

Parameters:
pixelXSize - the image horizontal pixel size used to determine the kernel weights.
pixelYSize - the image vertical pixel size used to determine the kernel weights.
pixelZSize - the image slice thickness used to determine the kernel weights.
kernelSize - the (odd) kernel size for the filter.
Returns:
a LaplacianFilter.

getOptionName

public static java.lang.String getOptionName()
Returns the name of this type of filter when specifying it in program optional arguments.

Returns:
the name of the filter for selection in program arguments.

getOptions

public static org.apache.commons.cli.Options getOptions()
Returns the options for this type of filter.

Returns:
the options for this type of filter.

getSpecifierPanel

public static SpatialFilter.SpecifierPanel getSpecifierPanel(java.lang.String preferencesNodeName)
Returns a SpatialFilter.SpecifierPanel that can be used to set the parameters for a LaplacianFilter.

Parameters:
preferencesNodeName - the preferences node name from which the initial settings will be taken.
Returns:
a SpatialFilter.SpecifierPanel to set the parameters for this type of filter.

getName

public static java.lang.String getName()
Returns the human-readable name of this filter.

Returns:
the human-readable name of this filter.

main

public static void main(java.lang.String[] args)
Runs a self-test of this class.

Parameters:
args - the program aguments (ignored).


Copyright 2006-2011 Xinapse Systems Limited. All Rights Reserved.