Package java.awt.image

Examples of java.awt.image.DataBufferUShort


  @Override
  protected DataBufferUShort createDataBuffer( final ShortArray data )
  {
    final short[] sourceArray = data.getCurrentStorageArray();
    return new DataBufferUShort( sourceArray, sourceArray.length );
  }
View Full Code Here


                }
                break;

            case DataBuffer.TYPE_USHORT:
                {
                    DataBufferUShort dataBuffer = (DataBufferUShort) source.getDataBuffer();
                    short[] data = dataBuffer.getData();
                    int ignore = (int) this.ignore;
                    getMinMaxUShort(data, ignore, x0, y0, x1, y1, w, stats);
                }
                break;

            case DataBuffer.TYPE_INT:
                {
                    DataBufferInt dataBuffer = (DataBufferInt) source.getDataBuffer();
                    int[] data = dataBuffer.getData();
                    int ignore = (int) this.ignore;
                    getMinMaxInt(data, ignore, x0, y0, x1, y1, w, stats);
                }
                break;
View Full Code Here

                }
                break;

            case DataBuffer.TYPE_USHORT:
                {
                    DataBufferUShort dataBuffer = (DataBufferUShort) source.getDataBuffer();
                    short[] data = dataBuffer.getData();
                    int ignore = (int) this.ignore;
                    int median = (int) this.median;
                    getCutLevelsUShort(data, ignore, median, x0, y0, x1, y1, w, stats);
                }
                break;

            case DataBuffer.TYPE_INT:
                {
                    DataBufferInt dataBuffer = (DataBufferInt) source.getDataBuffer();
                    int[] data = dataBuffer.getData();
                    int ignore = (int) this.ignore;
                    int median = (int) this.median;
                    getCutLevelsInt(data, ignore, median, x0, y0, x1, y1, w, stats);
                }
                break;
View Full Code Here

                System.arraycopy(srcDBT.getData(b), offsets[b],
                                 retDBT.getData(b), offsets[b], len);
                break;
            }
            case DataBuffer.TYPE_USHORT: {
                DataBufferUShort srcDBT = (DataBufferUShort)srcDB;
                DataBufferUShort retDBT = (DataBufferUShort)retDB;
                System.arraycopy(srcDBT.getData(b), offsets[b],
                                 retDBT.getData(b), offsets[b], len);
                break;
            }
            }
        }
View Full Code Here

                                                 scanlineStride,
                                                 bands,
                                                 bandOffsets[bands],
                                                 origin);
        } else {
            dataBuffer = new DataBufferUShort(height*scanlineStride);
            ras = Raster.createInterleavedRaster(dataBuffer,
                                                 width, height,
                                                 scanlineStride,
                                                 bands,
                                                 bandOffsets[bands],
View Full Code Here

            dataBuffer =
                new DataBufferShort((short[][])dataArray, size, offsets);
            break;
        case DataBuffer.TYPE_USHORT:
            dataBuffer =
                new DataBufferUShort((short[][])dataArray, size, offsets);
            break;
        case DataBuffer.TYPE_INT:
            dataBuffer =
                new DataBufferInt((int[][])dataArray, size, offsets);
            break;
View Full Code Here

            dataBuffer =
                new DataBufferShort((short[][])dataArray, size, offsets);
            break;
        case DataBuffer.TYPE_USHORT:
            dataBuffer =
                new DataBufferUShort((short[][])dataArray, size, offsets);
            break;
        case DataBuffer.TYPE_INT:
            dataBuffer =
                new DataBufferInt((int[][])dataArray, size, offsets);
            break;
View Full Code Here

                           Raster dest,
                           Rectangle destRect,
                           int incr1, int incr2, int s_x, int s_y) {
        MultiPixelPackedSampleModel sourceSM =
            (MultiPixelPackedSampleModel)source.getSampleModel();
        DataBufferUShort sourceDB =
            (DataBufferUShort)source.getDataBuffer();
        int sourceTransX = source.getSampleModelTranslateX();
        int sourceTransY = source.getSampleModelTranslateY();
        int sourceDataBitOffset = sourceSM.getDataBitOffset();
        int sourceScanlineStride = sourceSM.getScanlineStride();

        MultiPixelPackedSampleModel destSM =
            (MultiPixelPackedSampleModel)dest.getSampleModel();
        DataBufferUShort destDB =
            (DataBufferUShort)dest.getDataBuffer();
        int destMinX = dest.getMinX();
        int destMinY = dest.getMinY();
        int destTransX = dest.getSampleModelTranslateX();
        int destTransY = dest.getSampleModelTranslateY();
        int destDataBitOffset = destSM.getDataBitOffset();
        int destScanlineStride = destSM.getScanlineStride();

        short[] sourceData = sourceDB.getData();
        int sourceDBOffset = sourceDB.getOffset();

        short[] destData = destDB.getData();
        int destDBOffset = destDB.getOffset();

        int dx = destRect.x;
        int dy = destRect.y;
        int dwidth = destRect.width;
        int dheight = destRect.height;
View Full Code Here

    int destTransX = dest.getSampleModelTranslateX();
    int destTransY = dest.getSampleModelTranslateY();
    int destDataBitOffset = destSM.getDataBitOffset();
    int destScanlineStride = destSM.getScanlineStride();
   
    DataBufferUShort sourceDB = (DataBufferUShort) source.getDataBuffer();
    short[] sourceData = sourceDB.getData();
    int sourceDBOffset = sourceDB.getOffset();
   
    DataBufferUShort destDB = (DataBufferUShort) dest.getDataBuffer();
    short[] destData = destDB.getData();
    int destDBOffset = destDB.getOffset();
   
    int[] sshortnum = new int[dwidth];
    int[] sshift = new int[dwidth];
   
    for (int i = 0; i < dwidth; i++)
View Full Code Here

                                      dataOffset,
                                      dbb.getData());
                break;

            case DataBuffer.TYPE_USHORT:
                DataBufferUShort dbus =
                    (DataBufferUShort)raster.getDataBuffer();
                mlimages = new mediaLibImage[1];
                mlimages[0] =
                    new mediaLibImage(Constants.MLIB_USHORT,
                                      numBands,
                                      rect.width,
                                      rect.height,
                                      scanlineStride,
                                      dataOffset,
                                      dbus.getData());
                break;
            case DataBuffer.TYPE_SHORT:
                DataBufferShort dbs = (DataBufferShort)raster.getDataBuffer();
                mlimages = new mediaLibImage[1];
                mlimages[0] =
View Full Code Here

TOP

Related Classes of java.awt.image.DataBufferUShort

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.