Revision 10941 trunk/libraries/libRaster/src/org/gvsig/raster/dataaccess/cache/RasterCache.java
RasterCache.java | ||
---|---|---|
50 | 50 |
public class RasterCache extends RasterBuffer implements IBuffer { |
51 | 51 |
|
52 | 52 |
private Cache cache = null; |
53 |
private LRUAlgorithm lru = null; |
|
53 |
private LRUAlgorithm lru = null; |
|
54 |
private int percent = 0; |
|
54 | 55 |
|
55 | 56 |
//TODO: FUNCIONALIDAD: Intercambio de bandas para el buffer cacheado |
56 | 57 |
|
... | ... | |
784 | 785 |
* @see org.gvsig.raster.driver.datasetproperties.IHistogramable#getHistogram() |
785 | 786 |
*/ |
786 | 787 |
public Histogram getHistogram() throws HistogramException { |
788 |
percent = 0; |
|
787 | 789 |
if(getDataType() != IBuffer.TYPE_BYTE) |
788 | 790 |
return null; |
789 | 791 |
Histogram hist = new Histogram(getBandCount(), 256); |
... | ... | |
791 | 793 |
for (int col = 0; col < getHeight(); col++) |
792 | 794 |
for (int row = 0; row < getWidth(); row++) |
793 | 795 |
hist.incrementPxValue(iBand, getElemByte(row, col, iBand)); |
796 |
percent = 100; |
|
794 | 797 |
return hist; |
795 | 798 |
} |
796 | 799 |
|
... | ... | |
818 | 821 |
} |
819 | 822 |
return hist; |
820 | 823 |
} |
824 |
|
|
825 |
public int getPercent() { |
|
826 |
return percent; |
|
827 |
} |
|
821 | 828 |
} |
Also available in: Unified diff