public abstract class AbstractROI extends Object implements ROI
Modifier and Type | Field and Description |
---|---|
static String |
PERSISTENT_DESCRIPTION |
static String |
PERSISTENT_NAME |
protected Extent |
roiExtent
Mínimo extent que contiene al ROI.
|
protected Statistics |
statistic |
protected int |
xOffset
Coord. x del grid donde está laz esquina sup. iz. del roi (coords. pixel).
|
protected int |
yOffset
Coord. y del grid donde está la esquina sup. iz. del roi (coords. pixel).
|
Constructor and Description |
---|
AbstractROI(RasterDataStore store) |
Modifier and Type | Method and Description |
---|---|
ROI |
add(ROI roi) |
void |
clearBandsSubset()
Restaura el subconjunto accesible por el ROI a todas las bandas del Grid.
|
ROI |
exclusiveOr(ROI roi) |
int |
getBandCount() |
int[] |
getBandsSubset() |
double |
getCellSize() |
Color |
getColor() |
long |
getID() |
int |
getLayerHeight() |
int |
getLayerWidth() |
double |
getMaxValue() |
double |
getMeanValue() |
double |
getMinValue() |
String |
getName() |
double |
getNoDataValue() |
Extent |
getROIExtent()
Gets the bounding box of this ROI
|
int |
getROIPxHeight() |
int |
getROIPxWidth() |
static Extent |
getROIsMaximunExtent(List<ROI> rois)
Obtiene el extent máximo de todas las ROIs pasadas por parámetro.
|
protected Statistics |
getStatistic() |
RasterDataStore |
getStore() |
Extent |
getStoreExtent() |
long |
getValues() |
double[][] |
getVarCovMatrix()
Devuelve la matriz de varianza-covarianza, si no se encuentra calculada se calcula
|
double |
getVariance() |
ROI |
intersect(ROI roi) |
abstract boolean |
isInside(double x,
double y,
double w,
double h)
Checks if a rectangle in pixel coordinates intersects with some geometry of this ROI
|
abstract boolean |
isInsideOfPolygon(int x,
int y)
Checks if a point in pixel coordinates which is inside the grid, belongs to
a geometry
|
void |
loadFromState(PersistentState state)
Deprecated.
The regions of interest should not be persisted
|
static void |
registerPersistence()
Deprecated.
The regions of interest should not be persisted
|
void |
saveToState(PersistentState state)
Deprecated.
The regions of interest should not be persisted
|
void |
setBandsSubset(int[] bandsSubset)
Establece el Subconjunto de bandas que abarca el ROI.
|
void |
setColor(Color color) |
void |
setID(long id) |
void |
setName(String name) |
ROI |
subtract(ROI roi) |
String |
toString() |
public static final String PERSISTENT_NAME
public static final String PERSISTENT_DESCRIPTION
protected Statistics statistic
protected Extent roiExtent
protected int xOffset
protected int yOffset
public AbstractROI(RasterDataStore store)
public RasterDataStore getStore()
public static Extent getROIsMaximunExtent(List<ROI> rois)
rois
- Lista de ROIs para calcular la extensión máxima que ocupanpublic double getCellSize()
public Extent getROIExtent()
ROI
getROIExtent
in interface ROI
public Extent getStoreExtent()
public int getLayerWidth()
public int getLayerHeight()
public long getValues() throws GridException
GridException
public double getMaxValue() throws GridException
GridException
public double getMeanValue() throws GridException
GridException
public double getMinValue() throws GridException
GridException
public double[][] getVarCovMatrix() throws GridException
GridException
public int getROIPxWidth()
public int getROIPxHeight()
public double getNoDataValue()
public double getVariance() throws GridException
GridException
public abstract boolean isInsideOfPolygon(int x, int y)
isInsideOfPolygon
in interface ROI
x
- X coordinatey
- Y coordinatepublic abstract boolean isInside(double x, double y, double w, double h)
public void setBandsSubset(int[] bandsSubset)
public void clearBandsSubset()
public int getBandCount()
public int[] getBandsSubset()
protected Statistics getStatistic()
public void loadFromState(PersistentState state) throws PersistenceException
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
PersistenceException
public static void registerPersistence()