javax.media.jai.operator
Class PeriodicShiftDescriptor
java.lang.Object
|
+--javax.media.jai.OperationDescriptorImpl
|
+--javax.media.jai.operator.PeriodicShiftDescriptor
- All Implemented Interfaces:
- OperationDescriptor, RegistryElementDescriptor, Serializable
- public class PeriodicShiftDescriptor
- extends OperationDescriptorImpl
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.
Resource List
| 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. |
Parameter List
| Name | Class Type |
Default Value |
| shiftX | java.lang.Integer |
sourceWidth/2 |
| shiftY | java.lang.Integer |
sourceHeight/2 |
- See Also:
OperationDescriptor, Serialized Form
| Methods inherited from class javax.media.jai.OperationDescriptorImpl |
arePropertiesSupported,
getDefaultSourceClass,
getDestClass,
getDestClass,
getInvalidRegion,
getName,
getNumParameters,
getNumSources,
getParamClasses,
getParamDefaults,
getParamDefaultValue,
getParameterListDescriptor,
getParamMaxValue,
getParamMinValue,
getParamNames,
getPropertyGenerators,
getPropertyGenerators,
getRenderableDestClass,
getRenderableSourceClasses,
getResourceBundle,
getResources,
getSourceClasses,
getSourceClasses,
getSourceNames,
getSupportedModes,
isImmediate,
isModeSupported,
isRenderableSupported,
isRenderedSupported,
makeDefaultSourceClassList,
validateArguments,
validateParameters,
validateParameters,
validateRenderableArguments,
validateRenderableSources,
validateSources,
validateSources |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
PeriodicShiftDescriptor
public PeriodicShiftDescriptor()
- Constructor.
validateArguments
public boolean validateArguments(String modeName,
ParameterBlock args,
StringBuffer msg)
- Validates the input parameters.
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.
- Overrides:
- validateArguments in class OperationDescriptorImpl
- Tags copied from class: OperationDescriptorImpl
- Parameters:
modeName - the operation mode nameargs - Input arguments, including source(s) and/or parameter(s).msg - A string that may contain error messages.- Throws:
- IllegalArgumentException - if
modeName is null - See Also:
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)