Revision 13932 trunk/libraries/libRaster/src/org/gvsig/raster/buffer/RasterBuffer.java
RasterBuffer.java | ||
---|---|---|
398 | 398 |
for (int i = 0; i < getBandCount(); i++) |
399 | 399 |
for (int r = 0; r < getHeight(); r++) { |
400 | 400 |
for (int c = 0; c < getWidth(); c++) { |
401 |
value = (double) (getElemByte(r, c, i) & 0xff);
|
|
401 |
value = (double) (getElemByte(r, c, i)); |
|
402 | 402 |
if (value > max) max = value; |
403 | 403 |
if (value < min) min = value; |
404 | 404 |
} |
... | ... | |
483 | 483 |
switch(getDataType()) { |
484 | 484 |
case IBuffer.TYPE_BYTE: |
485 | 485 |
for (int col = 0; col < getWidth(); col++) |
486 |
hist.incrementPxValue(iBand, (double)(getElemByte(row, col, iBand) & 0xff));
|
|
486 |
hist.incrementPxValue(iBand, (double)(getElemByte(row, col, iBand))); |
|
487 | 487 |
break; |
488 | 488 |
case IBuffer.TYPE_SHORT: |
489 | 489 |
for (int col = 0; col < getWidth(); col++) |
490 |
hist.incrementPxValue(iBand, (double)(getElemShort(row, col, iBand) & 0xffff));
|
|
490 |
hist.incrementPxValue(iBand, (double)(getElemShort(row, col, iBand))); |
|
491 | 491 |
break; |
492 | 492 |
case IBuffer.TYPE_INT: |
493 | 493 |
for (int col = 0; col < getWidth(); col++) |
494 |
hist.incrementPxValue(iBand, (double)(getElemInt(row, col, iBand) & 0xffffffff));
|
|
494 |
hist.incrementPxValue(iBand, (double)(getElemInt(row, col, iBand))); |
|
495 | 495 |
break; |
496 | 496 |
case IBuffer.TYPE_FLOAT: |
497 | 497 |
for (int col = 0; col < getWidth(); col++) |
Also available in: Unified diff