Revision 11072 trunk/libraries/libRaster/src/org/gvsig/raster/dataaccess/buffer/RasterBuffer.java
RasterBuffer.java | ||
---|---|---|
398 | 398 |
* @see org.gvsig.raster.driver.datasetproperties.IHistogramable#getHistogramUsingClasses(org.gvsig.raster.shared.DataClassList) |
399 | 399 |
*/ |
400 | 400 |
public Histogram getHistogramUsingClasses(DataClassList classes) throws HistogramException { |
401 |
percent = 0; |
|
401 | 402 |
Histogram hist = new Histogram(getBandCount(), classes.length()); |
402 | 403 |
for (int iBand = 0; iBand < getBandCount(); iBand++) { |
403 | 404 |
for (int col = 0; col < getHeight(); col++) { |
... | ... | |
412 | 413 |
} |
413 | 414 |
if(pixelValue >= 0) |
414 | 415 |
hist.incrementPxValue(iBand, pixelValue); |
415 |
} |
|
416 |
} |
|
417 |
if (isCanceled()) return null; |
|
418 |
percent = ((iBand*getHeight() + col) * 100) / (getHeight() * getBandCount()); |
|
416 | 419 |
} |
417 | 420 |
} |
421 |
percent = 100; |
|
418 | 422 |
return hist; |
419 | 423 |
} |
420 | 424 |
|
Also available in: Unified diff