final RasterSlice slice = new RasterSlice();
slice.source=source;
// get metadata and check if this is an overview or not
final TIFFImageMetadata metadata = (TIFFImageMetadata) reader.getImageMetadata(index);
final TIFFIFD IFD = metadata.getRootIFD();
//
// Overviews or full resolution?
//
boolean fullResolution=true;
// boolean multipage=false;
final int newSubfileType;
TIFFField tifField=null;
if((tifField=IFD.getTIFFField(254))!=null)
newSubfileType=tifField.getAsInt(0);
else
newSubfileType=0;// default is single independent image
fullResolution=(newSubfileType&0x1)!=1?true:false;
// multipage=((newSubfileType>>1)&0x2)!=1?true:false;