public class ScaleReplication extends ImageToImageOperation
Resample provides better quality, but is slower and works with
intensity-based image data types only.
ScaleReplication scale = new ScaleReplication(); scale.setInputImage(image); // something implementing IntegerImage scale.setSize(image.getWidth() * 2, image.getHeight() * 2); scale.process(); PixelImage scaledImage = scale.getOutputImage();
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Integer |
outHeight |
private java.lang.Integer |
outWidth |
| Constructor and Description |
|---|
ScaleReplication() |
| Modifier and Type | Method and Description |
|---|---|
void |
process()
This method does the actual work of the operation.
|
private void |
process(IntegerImage in,
IntegerImage out) |
void |
setSize(int width,
int height)
Specify the resolution to be used for the image to be created.
|
canInputAndOutputBeEqual, ensureImagesHaveSameResolution, ensureInputImageIsAvailable, ensureOutputImageResolution, getInputImage, getOutputImage, setCanInputAndOutputBeEqual, setInputImage, setOutputImageaddProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgressprivate java.lang.Integer outWidth
private java.lang.Integer outHeight
private void process(IntegerImage in, IntegerImage out)
public void process()
throws MissingParameterException,
WrongParameterException
Operationprocess in class OperationMissingParameterException - if any mandatory parameter was not given to the operationWrongParameterException - if at least one of the input parameters was
not initialized appropriately (values out of the valid interval, etc.)public void setSize(int width,
int height)
width - horizontal resolution of the new imageheight - vertical resolution of the new imagejava.lang.IllegalArgumentException - if any of the arguments is smaller than 1