Revision 10941 trunk/libraries/libRaster/src/org/gvsig/raster/dataaccess/buffer/RasterMemoryBuffer.java
RasterMemoryBuffer.java | ||
---|---|---|
40 | 40 |
private IntBand[] intBuf = null; |
41 | 41 |
private FloatBand[] floatBuf = null; |
42 | 42 |
private DoubleBand[] doubleBuf = null; |
43 |
private int percent = 0; |
|
43 | 44 |
|
44 | 45 |
public class ByteBand extends RasterBand{ |
45 | 46 |
public byte[][] buf = null; |
... | ... | |
1277 | 1278 |
* @see org.gvsig.raster.driver.datasetproperties.IHistogramable#getHistogram() |
1278 | 1279 |
*/ |
1279 | 1280 |
public Histogram getHistogram() throws HistogramException { |
1281 |
percent = 0; |
|
1280 | 1282 |
if(getDataType() != IBuffer.TYPE_BYTE) |
1281 | 1283 |
return null; |
1282 | 1284 |
Histogram hist = new Histogram(getBandCount(), 256); |
... | ... | |
1284 | 1286 |
for (int col = 0; col < getHeight(); col++) |
1285 | 1287 |
for (int row = 0; row < getWidth(); row++) |
1286 | 1288 |
hist.incrementPxValue(iBand, getElemByte(row, col, iBand)); |
1289 |
percent = 100; |
|
1287 | 1290 |
return hist; |
1288 | 1291 |
} |
1289 | 1292 |
|
... | ... | |
1312 | 1315 |
return hist; |
1313 | 1316 |
} |
1314 | 1317 |
|
1318 |
/* |
|
1319 |
* (non-Javadoc) |
|
1320 |
* @see org.gvsig.raster.driver.datasetproperties.IHistogramable#getPercent() |
|
1321 |
*/ |
|
1322 |
public int getPercent() { |
|
1323 |
return percent; |
|
1324 |
} |
|
1325 |
|
|
1315 | 1326 |
} |
Also available in: Unified diff