protected final void computeMinMaxFromStrip(DataType dataType,int n,int size){
  minimum=new double[samplesPerPixel];
  maximum=new double[samplesPerPixel];
  Arrays.fill(minimum,Double.MAX_VALUE);
  Arrays.fill(maximum,-Double.MAX_VALUE);
  ByteBuffer bbuf=ByteBuffer.allocateDirect(size);
  bbuf.order(byteOrder);
  for (int i=0; i < n; ++i) {
    bbuf.rewind();
    long as=readStrip(i,bbuf,size);
    if (as == -1) {
      throw new IllegalStateException(getTIFFError());
    }
    bbuf.rewind();
    computeMinMax(bbuf);
    Thread.yield();
  }
}

protected final void computeMinMaxFromStrip ( DataType dataType , int n , int size ) { minimum = new double [ samplesPerPixel ] ; maximum = new double [ samplesPerPixel ] ; Arrays . fill ( minimum , Double . MAX_VALUE ) ; Arrays . fill ( maximum , - Double . MAX_VALUE ) ; ByteBuffer bbuf = ByteBuffer . allocateDirect ( size ) ; bbuf . order ( byteOrder ) ; for ( int i = 0 ; i < n ; ++ i ) { bbuf . rewind ( ) ; long as = readStrip ( i , bbuf , size ) ; if ( as == - 1 ) { throw new IllegalStateException ( getTIFFError ( ) ) ; } bbuf . rewind ( ) ; computeMinMax ( bbuf ) ; Thread . yield ( ) ; } }
compute the minimum and maximum of an entire file .
