Class SobelFilter.MagnitudeFilter
java.lang.Object
com.xinapse.filter.SobelFilter.MagnitudeFilter
- All Implemented Interfaces:
SpatialFilter
- Enclosing class:
SobelFilter
A {
SpatialFilter for producing the magnitude of the gradient of an image.
This filter combines the x, y an z Sobel filters to calculate the magnitude of the gradient.-
Nested Class Summary
Nested classes/interfaces inherited from interface SpatialFilter
SpatialFilter.SpecifierPanel -
Field Summary
Fields inherited from interface SpatialFilter
FILTERING_STRING -
Method Summary
Modifier and TypeMethodDescriptionfilter(ReadableImage image, MonitorWorker worker, Logger logger) Filter a ReadableImage, returning a new image which is a filtered version of the supplied image.filter(ReadableImage image, Logger logger) Filter a ReadableImage, returning a new image which is a filtered version of the supplied image.voidfilterInPlace(WritableImage image, MonitorWorker worker, Logger logger) Filter a WritableImage "in place".voidfilterInPlace(WritableImage image, Logger logger) Filter a WritableImage "in place".voidfilterInPlace(Object pixels, PixelDataType dataType, int nCols, int nRows, int nSlices, MonitorWorker worker, Logger logger) Filter an array of pixel values "in place".voidfilterInPlace(Object pixels, PixelDataType dataType, int nCols, int nRows, int nSlices, Logger logger) Filter an array of pixel values "in place".static SobelFilter.MagnitudeFilternew2DInstance(float pixelXSize, float pixelYSize) Creates a new 2-DSobelFilter.MagnitudeFiltersuitable for filtering images with the given pixel sizes, to obtain the magnitude of the intensity gradient.static SobelFilter.MagnitudeFilternew2DInstance(ReadableImage image) Creates a new 2-DSobelFilter.MagnitudeFiltersuitable for filtering the supplied image to obtain the magnitude of the intensity gradient.static SobelFilter.MagnitudeFilternew3DInstance(float pixelXSize, float pixelYSize, float pixelZSize) Creates a new 3-DSobelFilter.MagnitudeFiltersuitable for filtering images with the given pixel sizes, to obtain the magnitude of the intensity gradient.static SobelFilter.MagnitudeFilternew3DInstance(ReadableImage image) Creates a new 3-DSobelFilter.MagnitudeFiltersuitable for filtering the supplied image to obtain the magnitude of the intensity gradient.
-
Method Details
-
new2DInstance
Creates a new 2-DSobelFilter.MagnitudeFiltersuitable for filtering the supplied image to obtain the magnitude of 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.- Returns:
- new 2-D
SobelFilter.MagnitudeFilterto obtain the magnitude of the intensity gradient.
-
new2DInstance
Creates a new 2-DSobelFilter.MagnitudeFiltersuitable for filtering images with the given pixel sizes, to obtain the magnitude of the intensity gradient.- Parameters:
pixelXSize- the pixel width.pixelYSize- the pixel height.- Returns:
- new 2-D
SobelFilter.MagnitudeFilterto obtain the magnitude of the intensity gradient.
-
new3DInstance
Creates a new 3-DSobelFilter.MagnitudeFiltersuitable for filtering the supplied image to obtain the magnitude of 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.- Returns:
- new 3-D
SobelFilter.MagnitudeFilterto obtain the magnitude of the intensity gradient.
-
new3DInstance
public static SobelFilter.MagnitudeFilter new3DInstance(float pixelXSize, float pixelYSize, float pixelZSize) Creates a new 3-DSobelFilter.MagnitudeFiltersuitable for filtering images with the given pixel sizes, to obtain the magnitude of the intensity gradient.- Parameters:
pixelXSize- the pixel width.pixelYSize- the pixel height.pixelZSize- the slice thickness.- Returns:
- new 3-D
SobelFilter.MagnitudeFilterto obtain the magnitude of the intensity gradient.
-
filter
public WritableImage filter(ReadableImage image, Logger logger) throws InvalidImageException, IOException Description copied from interface:SpatialFilterFilter a ReadableImage, returning a new image which is a filtered version of the supplied image.- Specified by:
filterin interfaceSpatialFilter- Parameters:
image- the image to be filtered.logger- theLoggerfor verbose reporting and error messages.- Returns:
- a filtered version of the supplied image.
- Throws:
InvalidImageException- if the supplied image cannot be filtered with this filter.IOException- if an I/O error occurs.
-
filter
public WritableImage filter(ReadableImage image, MonitorWorker worker, Logger logger) throws InvalidImageException, IOException, CancelledException Description copied from interface:SpatialFilterFilter a ReadableImage, returning a new image which is a filtered version of the supplied image.- Specified by:
filterin interfaceSpatialFilter- Parameters:
image- the image to be filtered.worker- theMonitorWorkerthat may be used to cancel the filter operation.logger- theLoggerfor verbose reporting and error messages.- Returns:
- a filtered version of the supplied image.
- Throws:
InvalidImageException- if the supplied image cannot be filtered with this filter.IOException- if an I/O error occurs.CancelledException- if the filter operation is cancelled by the user or programmatically.
-
filterInPlace
public void filterInPlace(WritableImage image, Logger logger) throws InvalidImageException, IOException Description copied from interface:SpatialFilterFilter a WritableImage "in place".- Specified by:
filterInPlacein interfaceSpatialFilter- Parameters:
image- the image to be filtered.logger- theLoggerfor verbose reporting and error messages.- Throws:
InvalidImageException- if the supplied image cannot be filtered with this filter.IOException- if an I/O error occurs.
-
filterInPlace
public void filterInPlace(WritableImage image, MonitorWorker worker, Logger logger) throws InvalidImageException, IOException, CancelledException Description copied from interface:SpatialFilterFilter a WritableImage "in place".- Specified by:
filterInPlacein interfaceSpatialFilter- Parameters:
image- the image to be filtered.worker- theMonitorWorkerthat may be used to cancel the filter operation.logger- theLoggerfor verbose reporting and error messages.- Throws:
InvalidImageException- if the supplied image cannot be filtered with this filter.IOException- if an I/O error occurs.CancelledException- if the filter operation is cancelled by the user or programmatically.
-
filterInPlace
public void filterInPlace(Object pixels, PixelDataType dataType, int nCols, int nRows, int nSlices, Logger logger) Description copied from interface:SpatialFilterFilter an array of pixel values "in place".- Specified by:
filterInPlacein interfaceSpatialFilter- Parameters:
pixels- the array of image pixel values.dataType- the PixelDataType of the pixels.nCols- the number of image columns.nRows- the number of image rows.nSlices- the number of image slices.logger- theLoggerfor verbose reporting and error messages.
-
filterInPlace
public void filterInPlace(Object pixels, PixelDataType dataType, int nCols, int nRows, int nSlices, MonitorWorker worker, Logger logger) throws CancelledException Description copied from interface:SpatialFilterFilter an array of pixel values "in place".- Specified by:
filterInPlacein interfaceSpatialFilter- Parameters:
pixels- the array of image pixel values.dataType- the PixelDataType of the pixels.nCols- the number of image columns.nRows- the number of image rows.nSlices- the number of image slices.worker- theMonitorWorkerthat may be used to cancel the filter operation.logger- theLoggerfor verbose reporting and error messages.- Throws:
CancelledException- if the filter operation is cancelled by the user or programmatically.
-