Package com.xinapse.filter
Class SobelFilter
java.lang.Object
com.xinapse.filter.AbstractKernelFilter
com.xinapse.filter.FixedWeightsKernelFilter
com.xinapse.filter.SobelFilter
- All Implemented Interfaces:
SpatialFilter
A
FixedWeightsKernelFilter for performing a Sobel filtering of an image.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA {SpatialFilterfor producing the magnitude of the gradient of an image.static classA FilterSpecifierPanel for a Sobel edge-detection filter.static enumAn enumeration of the types of Sobel filter.Nested 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 org.apache.commons.cli.OptionsReturns the options for this type of filter.static SpatialFilter.SpecifierPanelgetSpecifierPanel(String preferencesNodeName) Returns a SpatialFilter.SpecifierPanel that can be used to set the parameters for a SobelFilter.static SobelFilternew2DXInstance(float pixelXSize) Creates a new 2-DSobelFiltersuitable for filtering an image to obtain the intensity gradient in the x-direction.static SobelFilternew2DXInstance(ReadableImage image) Creates a new 2-DSobelFiltersuitable for filtering the supplied image to obtain the intensity gradient in the x-direction.static SobelFilternew2DYInstance(float pixelYSize) Creates a new 2-DSobelFiltersuitable for filtering an image to obtain the intensity gradient in the y-direction.static SobelFilternew2DYInstance(ReadableImage image) Creates a new 2-DSobelFiltersuitable for filtering the supplied image to obtain the intensity gradient in the y-direction.static SobelFilternew3DXInstance(float pixelXSize) Creates a new 3-DSobelFiltersuitable for filtering an image to obtain the intensity gradient in the x-direction.static SobelFilternew3DXInstance(ReadableImage image) Creates a new 3-DSobelFiltersuitable for filtering the supplied image to obtain the intensity gradient in the x-direction.static SobelFilternew3DYInstance(float pixelYSize) Creates a new 3-DSobelFiltersuitable for filtering an image to obtain the intensity gradient in the y-direction.static SobelFilternew3DYInstance(ReadableImage image) Creates a new 3-DSobelFiltersuitable for filtering the supplied image to obtain the intensity gradient in the y-direction.static SobelFilternew3DZInstance(float pixelZSize) Creates a new 3-DSobelFiltersuitable for filtering an image to obtain the intensity gradient in the z-direction.static SobelFilternew3DZInstance(ReadableImage image) Creates a new 3-DSobelFiltersuitable for filtering the supplied image to obtain the intensity gradient in the z-direction.static SpatialFilternewInstance(org.apache.commons.cli.CommandLine commandLine, ReadableImage image) Creates a newSobelFilterusing the supplied command line arguments.Methods 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 SpatialFilter newInstance(org.apache.commons.cli.CommandLine commandLine, ReadableImage image) throws InvalidArgumentException Creates a newSobelFilterusing 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
SobelFilter. - Throws:
InvalidArgumentException- if the filter cannot be created from the arguments.
-
new2DXInstance
Creates a new 2-DSobelFiltersuitable for filtering the supplied image to obtain the intensity gradient in the x-direction.- Parameters:
image- the image to which this filter is designed to apply. The image pixel size is used to determine the kernel weights.- Returns:
- new 2-D
SobelFilterto obtain the intensity gradient in the x-direction.
-
new2DXInstance
Creates a new 2-DSobelFiltersuitable for filtering an image to obtain the intensity gradient in the x-direction.- Parameters:
pixelXSize- the pixel width of the image image to which this filter is designed to apply. The image pixel size is used to determine the kernel weights.- Returns:
- new 2-D
SobelFilterto obtain the intensity gradient in the x-direction.
-
new2DYInstance
Creates a new 2-DSobelFiltersuitable for filtering the supplied image to obtain the intensity gradient in the y-direction.- Parameters:
image- the image to which this filter is designed to apply. The image pixel size is used to determine the kernel weights.- Returns:
- new 2-D
SobelFilterto obtain the intensity gradient in the y-direction.
-
new2DYInstance
Creates a new 2-DSobelFiltersuitable for filtering an image to obtain the intensity gradient in the y-direction.- Parameters:
pixelYSize- the pixel height of the image image to which this filter is designed to apply. The image pixel size is used to determine the kernel weights.- Returns:
- new 2-D
SobelFilterto obtain the intensity gradient in the y-direction.
-
new3DXInstance
Creates a new 3-DSobelFiltersuitable for filtering the supplied image to obtain the intensity gradient in the x-direction.- Parameters:
image- the image to which this filter is designed to apply. The image pixel size is used to determine the kernel weights.- Returns:
- new 3-D
SobelFilterto obtain the intensity gradient in the x-direction.
-
new3DXInstance
Creates a new 3-DSobelFiltersuitable for filtering an image to obtain the intensity gradient in the x-direction.- Parameters:
pixelXSize- the image horizontal pixel size used to determine the kernel weights.- Returns:
- new 3-D
SobelFilterto obtain the intensity gradient in the X-direction.
-
new3DYInstance
Creates a new 3-DSobelFiltersuitable for filtering the supplied image to obtain the intensity gradient in the y-direction.- Parameters:
image- the image to which this filter is designed to apply. The image pixel size is used to determine the kernel weights.- Returns:
- new 3-D
SobelFilterto obtain the intensity gradient in the y-direction.
-
new3DYInstance
Creates a new 3-DSobelFiltersuitable for filtering an image to obtain the intensity gradient in the y-direction.- Parameters:
pixelYSize- the image vertical pixel size used to determine the kernel weights.- Returns:
- new 3-D
SobelFilterto obtain the intensity gradient in the y-direction.
-
new3DZInstance
Creates a new 3-DSobelFiltersuitable for filtering the supplied image to obtain the intensity gradient in the z-direction.- Parameters:
image- the image to which this filter is designed to apply. The image pixel size is used to determine the kernel weights.- Returns:
- new 3-D
SobelFilterto obtain the intensity gradient in the z-direction.
-
new3DZInstance
Creates a new 3-DSobelFiltersuitable for filtering an image to obtain the intensity gradient in the z-direction.- Parameters:
pixelZSize- the image slice thickness used to determine the kernel weights.- Returns:
- new 3-D
SobelFilterto obtain the intensity gradient in the z-direction.
-
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
Returns a SpatialFilter.SpecifierPanel that can be used to set the parameters for a SobelFilter.- 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.
-