Package com.xinapse.filter
Class SharpenFilter
java.lang.Object
com.xinapse.filter.AbstractKernelFilter
com.xinapse.filter.FixedWeightsKernelFilter
com.xinapse.filter.LaplacianFilter
com.xinapse.filter.SharpenFilter
- All Implemented Interfaces:
SpatialFilter
A
FixedWeightsKernelFilter for performing a sharpen filtering operation on an image.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA FilterSpecifierPanel for a sharpening filter.Nested classes/interfaces inherited from class com.xinapse.filter.LaplacianFilter
LaplacianFilter.LaplacianSpecifierPanelNested classes/interfaces inherited from interface com.xinapse.filter.SpatialFilter
SpatialFilter.SpecifierPanel -
Field Summary
Fields inherited from class com.xinapse.filter.FixedWeightsKernelFilter
weightsFields inherited from class com.xinapse.filter.AbstractKernelFilter
bcFields inherited from interface com.xinapse.filter.SpatialFilter
N_DOTS -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetName()Returns the human-readable name of this filter.static StringReturns the name of this type of filter when specifying it in program optional arguments.static SpatialFilter.SpecifierPanelgetSpecifierPanel(String preferencesNodeName) Returns a SpatialFilter.SpecifierPanel that can be used to set the parameters for a SharpenFilter.static voidRuns a self-test of this class.static SharpenFilternew2DInstance(float pixelXSize, float pixelYSize, int kernelSize) Creates a new 2-DSharpenFiltersuitable for filtering an image with the given pixel sizes.static SharpenFilternew2DInstance(ReadableImage image, int kernelSize) Creates a new 2-DSharpenFiltersuitable for filtering the supplied image.static SharpenFilternew3DInstance(float pixelXSize, float pixelYSize, float pixelZSize, int kernelSize) Creates a new 3-DSharpenFiltersuitable for sharpening an image.static SharpenFilternew3DInstance(ReadableImage image, int kernelSize) Creates a new 3-DSharpenFiltersuitable for sharpening the supplied image.static SharpenFilternewInstance(org.apache.commons.cli.CommandLine commandLine, ReadableImage image) Creates a newSharpenFilterusing the supplied command line arguments.Methods inherited from class com.xinapse.filter.LaplacianFilter
getOptionsMethods inherited from class com.xinapse.filter.FixedWeightsKernelFilter
add, add, convolve, copyResize, filterInPlaceBinary, filterInPlaceByte, filterInPlaceDouble, filterInPlaceFloat, filterInPlaceFloat, filterInPlaceInt, filterInPlaceLong, filterInPlaceShort, filterInPlaceUByte, filterInPlaceUInt, filterInPlaceUShort, getFlatKernelWeights, getNKernelCols, getNKernelRows, getNKernelSlices, scale, sumWeights, toImage, toStringMethods inherited from class com.xinapse.filter.AbstractKernelFilter
filter, filter, filter, filterInPlace, filterInPlace, filterInPlace, filterInPlace, filterInPlace, filterInPlace, filterInPlaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.xinapse.filter.SpatialFilter
filter, filter, filterInPlace, filterInPlace, filterInPlace, filterInPlace
-
Method Details
-
newInstance
public static SharpenFilter newInstance(org.apache.commons.cli.CommandLine commandLine, ReadableImage image) throws InvalidArgumentException Creates a newSharpenFilterusing 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.- Returns:
- a new
SharpenFilter. - Throws:
InvalidArgumentException- if the filter cannot be created from the arguments.
-
new2DInstance
Creates a new 2-DSharpenFiltersuitable 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:
- new 2-D
SharpenFilter.
-
new2DInstance
Creates a new 2-DSharpenFiltersuitable 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:
- new 2-D
SharpenFilter.
-
new3DInstance
public static SharpenFilter new3DInstance(ReadableImage image, int kernelSize) throws InvalidImageException Creates a new 3-DSharpenFiltersuitable for sharpening the supplied image.- Parameters:
image- the image to which this filter is designed to apply. The image pixel sizes are used to determine the kernel weights.kernelSize- the (odd) kernel size for the filter.- Returns:
- new 3-D
SharpenFilter. - Throws:
InvalidImageException- if the supplied image is invalid.
-
new3DInstance
public static SharpenFilter new3DInstance(float pixelXSize, float pixelYSize, float pixelZSize, int kernelSize) Creates a new 3-DSharpenFiltersuitable for sharpening an image.- 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:
- new 3-D
SharpenFilter.
-
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.
-
getSpecifierPanel
Returns a SpatialFilter.SpecifierPanel that can be used to set the parameters for a SharpenFilter.- 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
Returns the human-readable name of this filter.- Returns:
- the human-readable name of this filter.
-
main
Runs a self-test of this class.- Parameters:
args- the program aguments (ignored).
-