)
)
{
throw new WrongParameterException("Unsupported input image type: " + in.getClass().getName());
}
PixelImage out = getOutputImage();
if (out == null)
{
setOutputImage(new MemoryGray16Image(in.getWidth(), in.getHeight()));
}
else
{
if (!(out instanceof Gray16Image))
{
throw new WrongParameterException("Specified output image type must be of class Gray16Image; got " + in.getClass().getName());
}
if (in.getWidth() != out.getWidth())
{
throw new WrongParameterException("Specified output image must have same width as input image.");
}
if (in.getHeight() != out.getHeight())
{
throw new WrongParameterException("Specified output image must have same height as input image.");
}
}
}