* @param im the input Gray8Image.
* @throws jjil.core.Error if the input image is not a Gray8Image or not square.
*/
public void push(Image im) throws jjil.core.Error {
if (im.getWidth() != im.getHeight()) {
throw new Error(
Error.PACKAGE.ALGORITHM,
ErrorCodes.IMAGE_NOT_SQUARE,
im.toString(),
null,
null);
}
if (im.getWidth() != this.cxmPsfInv.getWidth() ||
im.getHeight() != this.cxmPsfInv.getHeight()) {
throw new Error(
Error.PACKAGE.ALGORITHM,
ErrorCodes.IMAGE_SIZES_DIFFER,
im.toString(),
this.cxmPsfInv.toString(),
null);
}
if (!(im instanceof Gray8Image)) {
throw new Error(
Error.PACKAGE.ALGORITHM,
ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
im.toString(),
null,
null);