public class SparseGradientSafe<T extends ImageSingleBand,G extends GradientValue> extends Object implements SparseImageGradient<T,G>
SparseImageGradient classes and checks to see if
the image is in bounds or not. If not the gradient is set to one.| Constructor and Description |
|---|
SparseGradientSafe(SparseImageGradient<T,G> wrap) |
| Modifier and Type | Method and Description |
|---|---|
G |
compute(int x,
int y)
Computes the gradient at the specified point.
|
Class<G> |
getGradientType() |
boolean |
isInBounds(int x,
int y)
Checks to see if the entire sample region is contained inside the image or not.
|
void |
setImage(T input)
Specifies the image being processed.
|
public SparseGradientSafe(SparseImageGradient<T,G> wrap)
public void setImage(T input)
SparseImageOperatorsetImage in interface SparseImageOperator<T extends ImageSingleBand>input - Image being processedpublic boolean isInBounds(int x,
int y)
SparseImageOperatorisInBounds in interface SparseImageOperator<T extends ImageSingleBand>public G compute(int x, int y)
SparseImageGradientcompute in interface SparseImageGradient<T extends ImageSingleBand,G extends GradientValue>x - x-axis pixel coordinatey - y-axis pixel coordinatepublic Class<G> getGradientType()
getGradientType in interface SparseImageGradient<T extends ImageSingleBand,G extends GradientValue>Copyright © 2013. All Rights Reserved.