*/
public Image doJoin(Image imageFirst, Image imageSecond)
throws jjil.core.Error
{
if (!(imageFirst instanceof Gray8Image)) {
throw new Error(
Error.PACKAGE.ALGORITHM,
ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
imageFirst.toString(),
null,
null);
}
if (!(imageSecond instanceof Gray8Image)) {
throw new Error(
Error.PACKAGE.ALGORITHM,
ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
imageSecond.toString(),
null,
null);
}
if (imageFirst.getWidth() != imageSecond.getWidth() ||
imageSecond.getHeight() != imageSecond.getHeight()) {
throw new Error(
Error.PACKAGE.ALGORITHM,
ErrorCodes.IMAGE_SIZES_DIFFER,
imageFirst.toString(),
imageSecond.toString(),
null);