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 | Description |
|---|---|---|
private Integer |
outHeight |
|
private Integer |
outWidth |
| Constructor | Description |
|---|---|
ScaleReplication() |
| Modifier and Type | Method | 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, setOutputImageclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgressprivate 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 imageIllegalArgumentException - if any of the arguments is smaller than 1