本文整理了Java中javax.media.jai.iterator.RandomIter
类的一些代码示例,展示了RandomIter
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RandomIter
类的具体详情如下:
包路径:javax.media.jai.iterator.RandomIter
类名称:RandomIter
暂无
代码示例来源:origin: geotools/geotools
public int getSample(int x, int y, int b) {
return delegate.getSample(x, y, b);
}
代码示例来源:origin: geotools/geotools
double value = iter.getSampleDouble(x, y, 0);
if (!Double.isNaN(value)) {
int value = iter.getSample(x, y, 0);
代码示例来源:origin: geotools/geotools
public void done() {
delegate.done();
op.dispose();
}
}
代码示例来源:origin: geotools/geotools
for (int r = 0; r < height; r++) {
for (int c = 0; c < width; c++) {
it1.getPixel(c, r, components);
px1.init(components);
it2.getPixel(c, r, components);
px2.init(components);
it1.done();
it2.done();
代码示例来源:origin: org.geoserver.community/gs-netcdf-out
case SHORT:
case INT:
sample = data.getSample(x, y, 0);
validSample = !Double.isNaN(noDataValue) && !isNaN(sample, noDataValue);
if (unitConverter != null && validSample) {
break;
case FLOAT:
float sampleFloat = data.getSampleFloat(x, y, 0);
validSample = !Double.isNaN(noDataValue) && !isNaN(sampleFloat, noDataValue);
if (unitConverter != null && validSample) {
double sampleDouble = data.getSampleDouble(x, y, 0);
validSample = !Double.isNaN(noDataValue) && !isNaN(sampleDouble, noDataValue);
if (unitConverter != null && !Double.isNaN(noDataValue) && !isNaN(sampleDouble, noDataValue)) {
代码示例来源:origin: geotools/geotools
for (int i = 0; i < kwidth; i++) {
samples[j][i] =
iter.getSample(xint + i, yint + j, b) & 0xFF;
for (int i = 0; i < kwidth; i++) {
samples[j][i] =
t[iter.getSample(xint + i, yint + j, 0) & 0xFF]
& 0xFF;
iter.done();
代码示例来源:origin: geotools/geotools
public double getSampleDouble(int x, int y, int b) {
return delegate.getSampleDouble(x, y, b);
}
代码示例来源:origin: geotools/geotools
for (int j = 0; j < kheight; j++) {
for (int i = 0; i < kwidth; i++) {
samples[j][i] = iter.getSampleDouble(xint + i, yint + j, b);
iter.done();
代码示例来源:origin: it.geosolutions.jaiext.warp/jt-warp
data[b][pixelOffset + bandOffsets[b]] = iter.getSampleFloat(sx, sy, b);
if (!(roiBounds.contains(sx, sy) && roiIter.getSample(sx, sy, 0) > 0)) {
data[b][pixelOffset + bandOffsets[b]] = iter.getSampleFloat(sx, sy,
b);
inputValue = iter.getSampleFloat(sx, sy, b);
if (noDataRange.contains(inputValue)) {
data[b][pixelOffset + bandOffsets[b]] = (float)backgroundValues[b];
if (!(roiBounds.contains(sx, sy) && roiIter.getSample(sx, sy, 0) > 0)) {
inputValue = iter.getSampleFloat(sx, sy, b);
if (noDataRange.contains(inputValue)) {
data[b][pixelOffset + bandOffsets[b]] = (float)backgroundValues[b];
iter.done();
代码示例来源:origin: locationtech/geowave
data[b][pixelOffset + bandOffsets[b]] = iter.getSampleDouble(sx, sy, b);
if (!(roiBounds.contains(sx, sy) && roiIter.getSample(sx, sy, 0) > 0)) {
data[b][pixelOffset + bandOffsets[b]] = iter.getSampleDouble(sx, sy, b);
inputValue = iter.getSampleDouble(sx, sy, b);
if (noDataRange.contains(inputValue)) {
data[b][pixelOffset + bandOffsets[b]] = backgroundValues[b];
if (!(roiBounds.contains(sx, sy) && roiIter.getSample(sx, sy, 0) > 0)) {
inputValue = iter.getSampleDouble(sx, sy, b);
if (noDataRange.contains(inputValue)) {
data[b][pixelOffset + bandOffsets[b]] = backgroundValues[b];
iter.done();
代码示例来源:origin: geosolutions-it/jai-ext
/** Method for testing the selected input RandomIter on an Integral image */
public void testRandomIterInt(RenderedImage img, int[] valueArray, boolean cachedTiles,
boolean arrayCalculation) {
RandomIter iter = RandomIterFactory.create(img, null, cachedTiles, arrayCalculation);
int[] array = new int[3];
// Store of the image data calculated
for (int i = 0; i < indexArray.length; i++) {
int x = indexArray[i][0];
int y = indexArray[i][1];
int valueExpected = iter.getSample(x, y, 0);
assertEquals(valueExpected, valueArray[i]);
int valueExpectedArray = iter.getPixel(x, y, array)[0];
assertEquals(valueExpectedArray, valueArray[i]);
}
}
代码示例来源:origin: geotools/geotools
public double[] getPixel(int x, int y, double[] dArray) {
return delegate.getPixel(x, y, dArray);
}
代码示例来源:origin: geosolutions-it/jai-ext
/** Method for testing the selected input RandomIter on a Double image */
public void testRandomIterDouble(RenderedImage img, double[] valueArray, boolean cachedTiles,
boolean arrayCalculation) {
RandomIter iter = RandomIterFactory.create(img, null, cachedTiles, arrayCalculation);
double[] array = new double[3];
// Store of the image data calculated
for (int i = 0; i < indexArray.length; i++) {
int x = indexArray[i][0];
int y = indexArray[i][1];
double valueExpected = iter.getSampleDouble(x, y, 0);
assertEquals(valueExpected, valueArray[i], DELTA);
double valueExpectedArray = iter.getPixel(x, y, array)[0];
assertEquals(valueExpectedArray, valueArray[i], DELTA);
}
}
代码示例来源:origin: geotools/geotools
public float getSampleFloat(int x, int y, int b) {
return delegate.getSampleFloat(x, y, b);
}
代码示例来源:origin: geotools/geotools
for (int j = 0; j < kheight; j++) {
for (int i = 0; i < kwidth; i++) {
samples[j][i] = iter.getSampleFloat(xint + i, yint + j, b);
iter.done();
代码示例来源:origin: geosolutions-it/jai-ext
/** Method for testing the selected input RandomIter on a Float image */
public void testRandomIterFloat(RenderedImage img, float[] valueArray, boolean cachedTiles,
boolean arrayCalculation) {
RandomIter iter = RandomIterFactory.create(img, null, cachedTiles, arrayCalculation);
float[] array = new float[3];
// Store of the image data calculated
for (int i = 0; i < indexArray.length; i++) {
int x = indexArray[i][0];
int y = indexArray[i][1];
float valueExpected = iter.getSampleFloat(x, y, 0);
assertEquals(valueExpected, valueArray[i], DELTA);
float valueExpectedArray = iter.getPixel(x, y, array)[0];
assertEquals(valueExpectedArray, valueArray[i], DELTA);
}
}
代码示例来源:origin: geosolutions-it/jai-ext
int y = indexArray[i][1];
valueArrayByte[i] = iterByte.getSample(x, y, 0);
valueArrayShort[i] = iterShort.getSample(x, y, 0);
valueArrayInt[i] = iterInt.getSample(x, y, 0);
valueArrayByteIMGFloat[i] = iterByteIMGFloat.getSampleFloat(x, y, 0);
valueArrayShortIMGFloat[i] = iterShortIMGFloat.getSampleFloat(x, y, 0);
valueArrayIntIMGFloat[i] = iterIntIMGFloat.getSampleFloat(x, y, 0);
valueArrayByteIMGDouble[i] = iterByteIMGDouble.getSampleDouble(x, y, 0);
valueArrayShortIMGDouble[i] = iterShortIMGDouble.getSampleDouble(x, y, 0);
valueArrayIntIMGDouble[i] = iterIntIMGDouble.getSampleDouble(x, y, 0);
代码示例来源:origin: geotools/geotools
for (int j = 0; j < kheight; j++) {
for (int i = 0; i < kwidth; i++) {
samples[j][i] = iter.getSample(xint + i, yint + j, b);
iter.done();
代码示例来源:origin: geotools/geotools
for (int i = 0; i < dataWindowRows; i++) {
for (int j = 0; j < dataWindowCols; j++) {
double value = iterator.getSampleDouble(j, i, 0);
代码示例来源:origin: Geomatys/geotoolkit
assert minScanI>=0 && minScanI<=distances.length : minScanI;
for (int x=minX; x<maxX; x++) {
final double current = iter.getSampleDouble(x, y, band);
if (!Double.isNaN(current)) {
for (int sy=minScanY; sy<maxScanY; sy++) {
for (int sx=minScanX; sx<maxScanX; sx++) {
final double scan = iter.getSampleDouble(sx, sy, band);
if (!Double.isNaN(scan)) {
final double d = distances[index];
iter.done();
内容来源于网络,如有侵权,请联系作者删除!