@Override public void loadGray(Raster raster) throws IOException {
  int stripHeight=Math.min(STRIP_ROWS,rasterLength);
  int stripWidth=rasterWidth * samplesPerPixel;
  int stripSize=stripWidth * stripHeight * bytesPerSample;
  int numStrips=(int)Math.ceil((double)rasterLength / stripHeight);
  if (stripSize > Integer.MAX_VALUE) {
    throw new IllegalArgumentException("Cannot load PDS file with strip size > " + Integer.MAX_VALUE + ".");
  }
  if ((minimum == null) || (maximum == null)) {
    computeMinMaxFromStrip(dataType,numStrips,stripSize,stripWidth,stripHeight);
  }
  loadFromStrip(dataType,numStrips,stripSize,stripWidth,stripHeight,raster,true);
  minimum=new double[]{0};
  maximum=new double[]{255};
}

@ Override public void loadGray ( Raster raster ) throws IOException { int stripHeight = Math . min ( STRIP_ROWS , rasterLength ) ; int stripWidth = rasterWidth * samplesPerPixel ; int stripSize = stripWidth * stripHeight * bytesPerSample ; int numStrips = ( int ) Math . ceil ( ( double ) rasterLength / stripHeight ) ; if ( stripSize > Integer . MAX_VALUE ) { throw new IllegalArgumentException ( "Cannot load PDS file with strip size > " + Integer . MAX_VALUE + "." ) ; } if ( ( minimum == null ) || ( maximum == null ) ) { computeMinMaxFromStrip ( dataType , numStrips , stripSize , stripWidth , stripHeight ) ; } loadFromStrip ( dataType , numStrips , stripSize , stripWidth , stripHeight , raster , true ) ; minimum = new double [ ] { 0 } ; maximum = new double [ ] { 255 } ; }
load data from file into a raster , converting data to unsigned byte gray scale .
