gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.api / src / main / java / org / gvsig / raster / roi / ROI.java @ 2443
History | View | Annotate | Download (6.44 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.raster.roi; |
23 |
|
24 |
import java.awt.Color; |
25 |
|
26 |
import org.gvsig.fmap.dal.coverage.datastruct.Extent; |
27 |
import org.gvsig.fmap.dal.coverage.store.RasterDataStore; |
28 |
|
29 |
|
30 |
/**
|
31 |
* Region of interest
|
32 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
33 |
*/
|
34 |
public interface ROI { |
35 |
|
36 |
public RasterDataStore getStore();
|
37 |
|
38 |
/**
|
39 |
* Checks if the rectangle defined in the parameters is inside if the ROI or outside
|
40 |
*/
|
41 |
public boolean isInside(double x, double y, double w, double h); |
42 |
|
43 |
/**
|
44 |
* Checks if a point in pixel coordinates is inside of this region of interest
|
45 |
* @return true whether the point is inside
|
46 |
*/
|
47 |
public boolean isInsideOfPolygon(int x, int y); |
48 |
|
49 |
/**
|
50 |
* Gets the bounding box of this ROI
|
51 |
* @return
|
52 |
*/
|
53 |
public Extent getROIExtent();
|
54 |
|
55 |
public Color getColor(); |
56 |
|
57 |
public void setColor(Color color); |
58 |
|
59 |
public String getName(); |
60 |
|
61 |
public void setName(String name); |
62 |
|
63 |
public long getID(); |
64 |
|
65 |
public void setID(long id); |
66 |
|
67 |
|
68 |
// public ROI add(ROI roi);
|
69 |
//
|
70 |
// public ROI intersect(ROI roi);
|
71 |
//
|
72 |
// public ROI subtract(ROI roi);
|
73 |
//
|
74 |
// public ROI exclusiveOr(ROI roi);
|
75 |
//
|
76 |
// public double getAspect(int x, int y)
|
77 |
// throws GridException;
|
78 |
//
|
79 |
// public double getCellSize();
|
80 |
//
|
81 |
// /**
|
82 |
// * Obtiene el valor de una celda de tipo byte. Si el punto no pertenece al
|
83 |
// * ROI devuelve un valor NoData. La excepci?n ser? lanzada si intentamos
|
84 |
// * acceder a un tipo de dato erroneo.
|
85 |
// * @param x Posici?n X en coordenadas pixel del ROI
|
86 |
// * @param y Posici?n Y en coordenadas pixel del ROI
|
87 |
// * @throws RasterBufferInvalidAccessException
|
88 |
// * @return Valor byte
|
89 |
// */
|
90 |
// public byte getCellValueAsByte(int x, int y)
|
91 |
// throws GridException;
|
92 |
//
|
93 |
// /**
|
94 |
// * Obtiene el valor de una celda de tipo double. Si el punto no pertenece al
|
95 |
// * ROI devuelve un valor NoData. La excepci?n ser? lanzada si intentamos
|
96 |
// * acceder a un tipo de dato erroneo.
|
97 |
// * @param x Posici?n X en coordenadas pixel del ROI
|
98 |
// * @param y Posici?n Y en coordenadas pixel del ROI
|
99 |
// * @throws RasterBufferInvalidAccessException
|
100 |
// * @return Valor double
|
101 |
// */
|
102 |
// public double getCellValueAsDouble(int x, int y)
|
103 |
// throws GridException;
|
104 |
//
|
105 |
// /**
|
106 |
// * Obtiene el valor de una celda de tipo Float. Si el punto no pertenece al
|
107 |
// * ROI devuelve un valor NoData. La excepci?n ser? lanzada si intentamos
|
108 |
// * acceder a un tipo de dato erroneo.
|
109 |
// * @param x Posici?n X en coordenadas pixel del ROI
|
110 |
// * @param y Posici?n Y en coordenadas pixel del ROI
|
111 |
// * @throws RasterBufferInvalidAccessException
|
112 |
// * @return Valor Float
|
113 |
// */
|
114 |
// public float getCellValueAsFloat(int x, int y)
|
115 |
// throws GridException;
|
116 |
//
|
117 |
// /**
|
118 |
// * Obtiene el valor de una celda de tipo int. Si el punto no pertenece al
|
119 |
// * ROI devuelve un valor NoData. La excepci?n ser? lanzada si intentamos
|
120 |
// * acceder a un tipo de dato erroneo.
|
121 |
// * @param x Posici?n X en coordenadas pixel del ROI
|
122 |
// * @param y Posici?n Y en coordenadas pixel del ROI
|
123 |
// * @throws RasterBufferInvalidAccessException
|
124 |
// * @return Valor int
|
125 |
// */
|
126 |
// public int getCellValueAsInt(int x, int y)
|
127 |
// throws GridException;
|
128 |
//
|
129 |
// /**
|
130 |
// * Obtiene el valor de una celda de tipo short. Si el punto no pertenece al
|
131 |
// * ROI devuelve un valor NoData. La excepci?n ser? lanzada si intentamos
|
132 |
// * acceder a un tipo de dato erroneo.
|
133 |
// * @param x Posici?n X en coordenadas pixel del ROI
|
134 |
// * @param y Posici?n Y en coordenadas pixel del ROI
|
135 |
// * @throws RasterBufferInvalidAccessException
|
136 |
// * @return Valor short
|
137 |
// */
|
138 |
// public short getCellValueAsShort(int x, int y)
|
139 |
// throws GridException;
|
140 |
//
|
141 |
// public int getDirToNextDownslopeCell(int x, int y) throws GridException;
|
142 |
//
|
143 |
// public int getDirToNextDownslopeCell(int x, int y,boolean bForceDirToNoDataCell)
|
144 |
// throws GridException;
|
145 |
//
|
146 |
// public double getDistToNeighborInDir(int iDir);
|
147 |
//
|
148 |
// public GridExtent getGridExtent();
|
149 |
//
|
150 |
// public int getLayerNX();
|
151 |
//
|
152 |
// public int getLayerNY();
|
153 |
//
|
154 |
// /**
|
155 |
// *
|
156 |
// * @return n?mero de celdas del ROI.
|
157 |
// */
|
158 |
// public long getValues() throws GridException;
|
159 |
//
|
160 |
// public double getMaxValue() throws GridException;
|
161 |
//
|
162 |
// public double getMeanValue() throws GridException;
|
163 |
//
|
164 |
// public double getMinValue() throws GridException;
|
165 |
//
|
166 |
// /**
|
167 |
// * Devuelve la matriz de varianza-covarianza, si no se encuentra calculada se calcula
|
168 |
// * @retrun Matriz de varianza-covarianza
|
169 |
// */
|
170 |
// public double[][] getVarCovMatrix() throws GridException;
|
171 |
//
|
172 |
// public int getNX();
|
173 |
//
|
174 |
// public int getNY();
|
175 |
//
|
176 |
// public double getNoDataValue();
|
177 |
//
|
178 |
// public double getSlope(int x, int y) throws GridException;
|
179 |
//
|
180 |
// public GridCell[] getSortedArrayOfCells() throws GridException;
|
181 |
//
|
182 |
// public double getVariance() throws GridException;
|
183 |
//
|
184 |
//
|
185 |
// public boolean isNoDataValue(double dValue);
|
186 |
//
|
187 |
// public void setInterpolationMethod(int iMethod);
|
188 |
//
|
189 |
// public Grid getGrid();
|
190 |
//
|
191 |
//
|
192 |
// public long getID();
|
193 |
//
|
194 |
// public void setID(long id);
|
195 |
//
|
196 |
//
|
197 |
// /**
|
198 |
// *Establece el Subconjunto de bandas que abarca el ROI.
|
199 |
// *
|
200 |
// */
|
201 |
// public void setBandsSubset(int bandsSubset[]);
|
202 |
//
|
203 |
// /**
|
204 |
// * Restaura el subconjunto accesible por el ROI a todas las bandas del Grid.
|
205 |
// */
|
206 |
// public void clearBandsSubset();
|
207 |
//
|
208 |
// /**
|
209 |
// * Asigna la banda sobre la que se realizan las operaciones. Por defecto es la banda 0
|
210 |
// * con lo que para el uso de MDTs no habr? que modificar este valor.
|
211 |
// * @param band Banda sobre la que se realizan las operaciones.
|
212 |
// */
|
213 |
// public void setBandToOperate(int band);
|
214 |
//
|
215 |
// /**
|
216 |
// *
|
217 |
// * @return N?mero de bandas que abarca el ROI.
|
218 |
// */
|
219 |
// public int getBandCount();
|
220 |
//
|
221 |
// /**
|
222 |
// *
|
223 |
// * @return Subconjunto de bandas que abarca el ROI.
|
224 |
// */
|
225 |
// public int[] getBandsSubset();
|
226 |
} |