|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.media.jai.OperationDescriptorImpl javax.media.jai.operator.PeriodicShiftDescriptor
An OperationDescriptor
describing the "PeriodicShift"
operation.
The destination image of the "PeriodicShift" operation is the infinite periodic extension of the source image with horizontal and vertical periods equal to the image width and height, respectively, shifted by a specified amount along each axis and clipped to the bounds of the source image. Thus for each band b the destination image sample at location (x,y) is defined by:
if(x < width - shiftX) { if(y < height - shiftY) { dst[x][y][b] = src[x + shiftX][y + shiftY][b]; } else { dst[x][y][b] = src[x + shiftX][y - height + shiftY][b]; } } else { if(y < height - shiftY) { dst[x][y][b] = src[x - width + shiftX][y + shiftY][b]; } else { dst[x][y][b] = src[x - width + shiftX][y - height + shiftY][b]; } }where shiftX and
shiftY
denote the translation factors
along the X and Y axes, respectively.
Name | Value |
---|---|
GlobalName | PeriodicShift |
LocalName | PeriodicShift |
Vendor | com.sun.media.jai |
Description | Computes the periodic translation of an image. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/PeriodicShiftDescriptor.html |
Version | 1.0 |
arg0Desc | The displacement in the X direction. |
arg1Desc | The displacement in the Y direction. |
Name | Class Type | Default Value |
---|---|---|
shiftX | java.lang.Integer | sourceWidth/2 |
shiftY | java.lang.Integer | sourceHeight/2 |
OperationDescriptor
,
Serialized FormField Summary |
Fields inherited from class javax.media.jai.OperationDescriptorImpl |
sourceNames |
Fields inherited from interface javax.media.jai.OperationDescriptor |
NO_PARAMETER_DEFAULT |
Constructor Summary | |
PeriodicShiftDescriptor()
Constructor. |
Method Summary | |
static RenderedOp |
create(RenderedImage source0,
Integer shiftX,
Integer shiftY,
RenderingHints hints)
Computes the periodic translation of an image. |
static RenderableOp |
createRenderable(RenderableImage source0,
Integer shiftX,
Integer shiftY,
RenderingHints hints)
Computes the periodic translation of an image. |
boolean |
validateArguments(String modeName,
ParameterBlock args,
StringBuffer msg)
Validates the input parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PeriodicShiftDescriptor()
Method Detail |
public boolean validateArguments(String modeName, ParameterBlock args, StringBuffer msg)
In addition to the standard checks performed by the superclass method, this method checks that "shiftX" and "shiftY" are between 0 and the source image width and height, respectively.
validateArguments
in interface OperationDescriptor
validateArguments
in class OperationDescriptorImpl
modeName
- the operation mode nameargs
- Input arguments, including source(s) and/or parameter(s).msg
- A string that may contain error messages.OperationDescriptorImpl.validateSources(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
,
OperationDescriptorImpl.validateParameters(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
public static RenderedOp create(RenderedImage source0, Integer shiftX, Integer shiftY, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source0
- RenderedImage
source 0.shiftX
- The displacement in the X direction.
May be null
.shiftY
- The displacement in the Y direction.
May be null
.hints
- The RenderingHints
to use.
May be null
.
RenderedOp
destination.
IllegalArgumentException
- if source0
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
public static RenderableOp createRenderable(RenderableImage source0, Integer shiftX, Integer shiftY, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.createRenderable(String,ParameterBlock,RenderingHints)
.
source0
- RenderableImage
source 0.shiftX
- The displacement in the X direction.
May be null
.shiftY
- The displacement in the Y direction.
May be null
.hints
- The RenderingHints
to use.
May be null
.
RenderableOp
destination.
IllegalArgumentException
- if source0
is null
.JAI
,
ParameterBlockJAI
,
RenderableOp
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |