public final WritableRaster filter(Raster src,WritableRaster dst){
  if (dst == null) {
    dst=createCompatibleDestRaster(src);
  }
 else   if (src == dst) {
    throw new IllegalArgumentException("src image cannot be the " + "same as the dst image");
  }
 else   if (src.getNumBands() != dst.getNumBands()) {
    throw new ImagingOpException("Different number of bands in src " + " and dst Rasters");
  }
  if (ImagingLib.filter(this,src,dst) == null) {
    throw new ImagingOpException("Unable to convolve src image");
  }
  return dst;
}

public final WritableRaster filter ( Raster src , WritableRaster dst ) { if ( dst == null ) { dst = createCompatibleDestRaster ( src ) ; } else if ( src == dst ) { throw new IllegalArgumentException ( "src image cannot be the " + "same as the dst image" ) ; } else if ( src . getNumBands ( ) != dst . getNumBands ( ) ) { throw new ImagingOpException ( "Different number of bands in src " + " and dst Rasters" ) ; } if ( ImagingLib . filter ( this , src , dst ) == null ) { throw new ImagingOpException ( "Unable to convolve src image" ) ; } return dst ; }
performs a convolution on rasters . each band of the source raster will be convolved . the source and destination must have the same number of bands . if the destination raster is null , a new raster will be created . the illegalargumentexception may be thrown if the source is the same as the destination .
