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, setOutputImage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgress
private void process(IntegerImage in, IntegerImage out)
public void process() throws MissingParameterException, WrongParameterException
Operation
process
in class Operation
MissingParameterException
- 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