Revision 995 org.gvsig.raster.cache/trunk/org.gvsig.raster.cache/org.gvsig.raster.cache.lib.api/src/main/java/org/gvsig/raster/cache/buffer/Buffer.java
Buffer.java | ||
---|---|---|
1 | 1 |
package org.gvsig.raster.cache.buffer; |
2 | 2 |
|
3 |
import java.awt.geom.Rectangle2D; |
|
3 | 4 |
import java.awt.image.DataBuffer; |
4 | 5 |
import java.io.IOException; |
5 | 6 |
import java.util.ArrayList; |
... | ... | |
7 | 8 |
import org.gvsig.raster.cache.buffer.exception.BandNotCompatibleException; |
8 | 9 |
import org.gvsig.raster.cache.buffer.exception.OperationNotSupportedException; |
9 | 10 |
import org.gvsig.raster.cache.buffer.exception.WrongParameterException; |
11 |
import org.gvsig.raster.cache.buffer.histogram.Histogramable; |
|
10 | 12 |
|
11 | 13 |
/** |
12 | 14 |
* Interfaz que contiene las operaciones que debe soportar un buffer de datos. |
13 | 15 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
14 | 16 |
* |
15 | 17 |
*/ |
16 |
public interface Buffer { |
|
18 |
public interface Buffer extends Histogramable {
|
|
17 | 19 |
public static boolean noDataValueEnable = false; |
18 | 20 |
public static double defaultNoDataValue = -99999.0; |
19 | 21 |
|
... | ... | |
24 | 26 |
public final static int TYPE_INT = DataBuffer.TYPE_INT; |
25 | 27 |
public final static int TYPE_FLOAT = DataBuffer.TYPE_FLOAT; |
26 | 28 |
public final static int TYPE_DOUBLE = DataBuffer.TYPE_DOUBLE; |
27 |
public final static int TYPE_IMAGE = -1; |
|
29 |
|
|
30 |
//Read type constants |
|
31 |
public static final int READ_ONLY = 0; |
|
32 |
public static final int READ_WRITE = 1; |
|
33 |
//If the returned buffer is a cache buffer then it will have vertical stripes |
|
34 |
public static final int READ_WRITE_CVERT = 2; |
|
28 | 35 |
|
29 | 36 |
//************************************** |
30 | 37 |
//************GETTING INFO************** |
... | ... | |
64 | 71 |
* Get no data value |
65 | 72 |
* @return double |
66 | 73 |
*/ |
67 |
public NoData getNoDataValue(); |
|
74 |
public BufferNoData getNoDataValue();
|
|
68 | 75 |
|
69 | 76 |
/** |
70 | 77 |
* Sets no data value |
71 | 78 |
* @return double |
72 | 79 |
*/ |
73 |
public void setNoDataValue(NoData noDataValue); |
|
80 |
public void setNoDataValue(BufferNoData noDataValue);
|
|
74 | 81 |
|
75 | 82 |
/** |
76 | 83 |
* Get true if current buffer is writable and false if is not. |
... | ... | |
86 | 93 |
* @return true si est? dentro y false si cae fuera. |
87 | 94 |
*/ |
88 | 95 |
public boolean isInside(int x, int y); |
96 |
|
|
97 |
/** |
|
98 |
* Gets a bouding box of this buffer |
|
99 |
* @return |
|
100 |
*/ |
|
101 |
public Rectangle2D getDataExtent(); |
|
102 |
|
|
103 |
/** |
|
104 |
* Sets the bounding box of this buffer |
|
105 |
* @param extent |
|
106 |
*/ |
|
107 |
public void setDataExtent(Rectangle2D extent); |
|
89 | 108 |
|
90 | 109 |
/** |
91 | 110 |
* Libera el buffer de memoria |
92 | 111 |
* @throws IOException |
93 | 112 |
*/ |
94 | 113 |
public void free() throws IOException; |
114 |
|
|
115 |
/** |
|
116 |
* Sets the RasterDataStore reference |
|
117 |
* @param store |
|
118 |
*/ |
|
119 |
public void setStore(Object store); |
|
120 |
|
|
121 |
/** |
|
122 |
* Gets the RasterDataStore reference |
|
123 |
* @return |
|
124 |
*/ |
|
125 |
public Object getStore(); |
|
95 | 126 |
|
96 | 127 |
//************************************** |
97 | 128 |
//************GETTING DATA************** |
Also available in: Unified diff