public MetadataTableArrayElemLeaf(String name, String unit, String description, ProductData data, int elemIndex) { super(name, data.getType(), data, unit, description); this.data = data; this.elemIndex = elemIndex; }
private int getAttributeType(MetadataAttribute attribute) { return ProductData.getType(attribute.getData().getTypeString()); }
public int getNewBandsDataType() { return ProductData.getType(_paramDataType.getValueAsText()); }
public ProductData getData() { Object dataElemArray = getDataElemArray(data, elemIndex); return ProductData.createInstance(data.getType(), dataElemArray); }
int bandDestWidth = readArea.width; int bandDestHeight = readArea.height; ProductData bandBuffer = createProductData(destBuffer.getType(), bandDestWidth * bandDestHeight); reader.readBandRasterData(cell.band, bandDestOffsetX, bandDestOffsetY, bandDestWidth, bandDestHeight, bandBuffer, pm); MemoryCacheImageOutputStream writeStream = null;
final boolean oneOf2 = destBand.getUnit().equals(Unit.REAL) || !destBand.getName().startsWith("q"); final int samplesPerGroup = imageFile.getSamplesPerDataGroup(); final int elemSize = (samplesPerGroup * ProductData.getElemSize(destBuffer.getType()));
throws IOException { final int sourceMaxY = sourceOffsetY + sourceHeight - 1; final int x = sourceOffsetX * ProductData.getElemSize(destBuffer.getType()); final long xpos = startPosImageRecords + imageHeaderLength + x;
throws IOException { final int sourceMaxY = sourceOffsetY + sourceHeight - 1; final int x = sourceOffsetX * ProductData.getElemSize(destBuffer.getType()); final long xpos = startPosImageRecords + imageHeaderLength + x;
throws IOException { final int sourceMaxY = sourceOffsetY + sourceHeight - 1; final int x = sourceOffsetX * ProductData.getElemSize(destBuffer.getType()); final long xpos = startPosImageRecords + imageHeaderLength + x;
throws IOException { final int sourceMaxY = sourceOffsetY + sourceHeight - 1; final int x = sourceOffsetX * ProductData.getElemSize(destBuffer.getType()); final long xpos = startPosImageRecords + imageHeaderLength + x;
final int sampleOffset = imageID + bandSampleOffset; if(destBuffer.getType() == ProductData.TYPE_FLOAT32) { if (flipToSARGeometry && isAntennaPointingRight) { // flip the image left to right final float[] dArray = new float[dataBuffer.getSize()];
final int sampleOffset = imageID + bandSampleOffset; if(destBuffer.getType() == ProductData.TYPE_FLOAT32) { if (flipToSARGeometry && isAntennaPointingRight) { // flip the image left to right final float[] dArray = new float[dataBuffer.getSize()];
private static Object getDataElemArray(ProductData data, int index) { switch (data.getType()) { case TYPE_INT8: return new byte[]{(byte)data.getElemIntAt(index)}; case TYPE_INT16: return new short[]{(short)data.getElemIntAt(index)}; case TYPE_INT32: return new int[]{data.getElemIntAt(index)}; case TYPE_UINT8: return new byte[]{(byte)data.getElemUIntAt(index)}; case TYPE_UINT16: return new short[]{(short)data.getElemUIntAt(index)}; case TYPE_UINT32: return new int[]{(int)data.getElemUIntAt(index)}; case TYPE_INT64: return new long[]{data.getElemLongAt(index)}; case TYPE_FLOAT32: return new float[]{data.getElemFloatAt(index)}; case TYPE_FLOAT64: return new double[]{data.getElemDoubleAt(index)}; default: return null; } } }
ProductData lineData = ProductData.createInstance(destBuffer.getType(), sourceWidth * numBands);
switch (destBuffer.getType()) { case ProductData.TYPE_UINT8: case ProductData.TYPE_INT8:
ProductData lineData = ProductData.createInstance(destBuffer.getType(), sourceWidth);
ProductData lineData = ProductData.createInstance(destBuffer.getType(), sourceWidth * numBands);
ProductData lineData = ProductData.createInstance(destBuffer.getType(), sourceWidth * numBands);