Package com.luciad.imaging.operator
Class ALcdImageOperatorChain.Builder
java.lang.Object
com.luciad.imaging.operator.ALcdImageOperatorChain.Builder
- Enclosing class:
ALcdImageOperatorChain
Builder for creating ALcdImageOperatorChain
instances. This builder can create simple linear chains by supplying a sequence
of operators and their input parameters. See
ALcdImageOperatorChain
for a code snippet
illustrating the use of this builder.-
Method Summary
Modifier and TypeMethodDescriptionadd
(ALcdBasicImage aImage2) Calls binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation) with the given image and the ADD operation.bandMerge
(ALcdBasicImage aSecondImage) Corresponds to TLcdBandMergeOp.bandMerge(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.ALcdBasicImage), but the first input image is passed in via the operator chain.bandSelect
(int[] aBands) Corresponds to TLcdBandSelectOp.bandSelect(com.luciad.imaging.ALcdImage, int[]), but the input image is passed in via the operator chain.binaryOp
(ALcdBasicImage aImage2, TLcdBinaryOp.Operation aOperation) Corresponds to TLcdBinaryOp.binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation), but the first input image is passed in via the operator chain.build()
Creates a new operator chain combining all operators and their parameters as previously set using this builder.colorConvert
(ColorModel aColorModel) Corresponds to TLcdColorConvertOp.colorConvert(com.luciad.imaging.ALcdImage, java.awt.image.ColorModel), but the input image is passed in via the operator chain.colorLookup
(ALcdColorLookupTable aTable) Corresponds to TLcdColorLookupOp.colorLookup(com.luciad.imaging.ALcdImage, com.luciad.imaging.operator.util.ALcdColorLookupTable), but the input image is passed in via the operator chain.composite
(ALcdBasicImage aSecondImage) Corresponds to TLcdCompositeOp.composite(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.ALcdBasicImage), but the first input image is passed in via the operator chain.convolve
(double[] aKernel, int aKernelWidth, int aKernelHeight) Corresponds to TLcdConvolveOp.convolve(com.luciad.imaging.ALcdImage, double[], int, int), but the input image is passed in via the operator chain.crop
(int aCropX, int aCropY, int aCropWidth, int aCropHeight) Corresponds to TLcdCropOp.crop(com.luciad.imaging.ALcdBasicImage, int, int, int, int), but the input image is passed in via the operator chain.curves
(ILcdPoint[][] aCurves, TLcdCurvesOp.CurveType aCurveType) Corresponds to TLcdCurvesOp.curves(com.luciad.imaging.ALcdImage, com.luciad.shape.ILcdPoint[][], com.luciad.imaging.operator.TLcdCurvesOp.CurveType), but the input image is passed in via the operator chain.divide
(ALcdBasicImage aImage2) Calls binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation) with the given image and the DIVIDE operation.expand
(int aExpandX, int aExpandY, int aExpandWidth, int aExpandHeight) Corresponds to TLcdExpandOp.expand(com.luciad.imaging.ALcdImage, int, int, int, int), but the input image is passed in via the operator chain.histogram
(int aBinCount) Corresponds to TLcdHistogramOp.histogram(com.luciad.imaging.ALcdBasicImage, int), but the input image is passed in via the operator chain.indexLookup
(TLcdLookupTable aLUT) Corresponds to TLcdIndexLookupOp.indexLookup(com.luciad.imaging.ALcdImage, com.luciad.imaging.operator.util.TLcdLookupTable), but the input image is passed in via the operator chain.indexLookup
(TLcdLookupTable aLUT, double[] aNaNColor) Corresponds to TLcdIndexLookupOp.indexLookup(com.luciad.imaging.ALcdImage, com.luciad.imaging.operator.util.TLcdLookupTable, double[]) but the input image is passed in via the operator chain.max
(ALcdBasicImage aImage2) Calls binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation) with the given image and the MAX operation.median
(int aWidth, int aHeight) Corresponds to TLcdMedianOp.median(com.luciad.imaging.ALcdImage, int, int), but the input image is passed in via the operator chain.min
(ALcdBasicImage aImage2) Calls binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation) with the given image and the MIN operation.multiply
(ALcdBasicImage aImage2) Calls binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation) with the given image and the MULTIPLY operation.operator
(ALcdImageOperator aOperator, ILcdDataObject aParameters) Appends an operator to the chain.pixelReplace
(double[] aSource, double[] aDestination, double aTolerance) Corresponds to TLcdPixelReplaceOp.pixelReplace(com.luciad.imaging.ALcdImage, double[], double[], double), but the input image is passed in via the operator chain.pixelRescale
(double[] aScales, double[] aOffsets) Corresponds to TLcdPixelRescaleOp.pixelRescale(com.luciad.imaging.ALcdImage, double[], double[]), but the input image is passed in via the operator chain.pixelTransform
(double[] aMatrix, double[] aOffsets) Corresponds to TLcdPixelTransformOp.pixelTransform(com.luciad.imaging.ALcdImage, double[], double[]), but the input image is passed in via the operator chain.resize
(double aScaleX, double aScaleY) Corresponds to TLcdResizeOp.resize(com.luciad.imaging.ALcdImage, double, double), but the input image is passed in via the operator chain.semantics
(ALcdBandSemantics[] aBandSemantics) Corresponds to TLcdSemanticsOp.semantics(com.luciad.imaging.ALcdImage, com.luciad.imaging.ALcdBandSemantics[]), but the input image is passed in via the operator chain.semantics
(ALcdBandSemantics[] aBandSemantics, double[] aScales, double[] aOffsets) Corresponds to TLcdSemanticsOp.semantics(com.luciad.imaging.ALcdImage, com.luciad.imaging.ALcdBandSemantics[], double[], double[]), but the input image is passed in via the operator chain.semantics
(List<ALcdBandSemantics> aBandSemantics) Corresponds to TLcdSemanticsOp.semantics(com.luciad.imaging.ALcdImage, java.util.List), but the input image is passed in via the operator chain.semantics
(List<ALcdBandSemantics> aBandSemantics, double[] aScales, double[] aOffsets) Corresponds to TLcdSemanticsOp.semantics(com.luciad.imaging.ALcdImage, java.util.List, double[], double[]), but the input image is passed in via the operator chain.subtract
(ALcdBasicImage aImage2) Calls binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation) with the given image and the SUBTRACT operation.swipe
(ALcdBasicImage aSecondImage, int aSwipeX) Corresponds to TLcdSwipeOp.swipe(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.ALcdBasicImage, int), but the first input image is passed in via the operator chain.
-
Method Details
-
operator
public ALcdImageOperatorChain.Builder operator(ALcdImageOperator aOperator, ILcdDataObject aParameters) Appends an operator to the chain. The supplied data object must be compatible with the operator's parameter data type. It must contain all values required by the operator, except the input image, which will be supplied externally via the chain's apply() method.- Parameters:
aOperator
- the operator to be appendedaParameters
- the parameters of the operator- Returns:
- this builder
-
bandMerge
Corresponds to TLcdBandMergeOp.bandMerge(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.ALcdBasicImage), but the first input image is passed in via the operator chain.- Parameters:
aSecondImage
- the image to be band-merged with the operator chain's input- Returns:
- this builder
-
bandSelect
Corresponds to TLcdBandSelectOp.bandSelect(com.luciad.imaging.ALcdImage, int[]), but the input image is passed in via the operator chain.- Parameters:
aBands
- band indices to be selected from the operator chain's input- Returns:
- this builder
-
binaryOp
public ALcdImageOperatorChain.Builder binaryOp(ALcdBasicImage aImage2, TLcdBinaryOp.Operation aOperation) Corresponds to TLcdBinaryOp.binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation), but the first input image is passed in via the operator chain.- Parameters:
aImage2
- the image to be combined with the operator chain's inputaOperation
- the operation to be used for combining the images- Returns:
- this builder
-
add
Calls binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation) with the given image and the ADD operation.- Parameters:
aImage2
- the image to be combined with the operator chain's input- Returns:
- this builder
-
subtract
Calls binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation) with the given image and the SUBTRACT operation.- Parameters:
aImage2
- the image to be combined with the operator chain's input- Returns:
- this builder
-
multiply
Calls binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation) with the given image and the MULTIPLY operation.- Parameters:
aImage2
- the image to be combined with the operator chain's input- Returns:
- this builder
-
divide
Calls binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation) with the given image and the DIVIDE operation.- Parameters:
aImage2
- the image to be combined with the operator chain's input- Returns:
- this builder
-
min
Calls binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation) with the given image and the MIN operation.- Parameters:
aImage2
- the image to be combined with the operator chain's input- Returns:
- this builder
-
max
Calls binaryOp(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.operator.TLcdBinaryOp.Operation) with the given image and the MAX operation.- Parameters:
aImage2
- the image to be combined with the operator chain's input- Returns:
- this builder
-
colorConvert
Corresponds to TLcdColorConvertOp.colorConvert(com.luciad.imaging.ALcdImage, java.awt.image.ColorModel), but the input image is passed in via the operator chain.- Parameters:
aColorModel
- color model to which to convert the operator chain's input- Returns:
- this builder
-
colorLookup
Corresponds to TLcdColorLookupOp.colorLookup(com.luciad.imaging.ALcdImage, com.luciad.imaging.operator.util.ALcdColorLookupTable), but the input image is passed in via the operator chain.- Parameters:
aTable
- the color lookup table to be applied to the operator chain's input- Returns:
- this builder
-
composite
Corresponds to TLcdCompositeOp.composite(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.ALcdBasicImage), but the first input image is passed in via the operator chain.- Parameters:
aSecondImage
- the image to be composited with the operator chain's input- Returns:
- this builder
-
convolve
public ALcdImageOperatorChain.Builder convolve(double[] aKernel, int aKernelWidth, int aKernelHeight) Corresponds to TLcdConvolveOp.convolve(com.luciad.imaging.ALcdImage, double[], int, int), but the input image is passed in via the operator chain.- Parameters:
aKernel
- the convolution kernel, in row-major orderaKernelWidth
- the width of the kernelaKernelHeight
- the height of the kernel- Returns:
- this builder
-
median
Corresponds to TLcdMedianOp.median(com.luciad.imaging.ALcdImage, int, int), but the input image is passed in via the operator chain.- Parameters:
aWidth
- the width of the median filteraHeight
- the height of the median filter- Returns:
- this builder
-
crop
Corresponds to TLcdCropOp.crop(com.luciad.imaging.ALcdBasicImage, int, int, int, int), but the input image is passed in via the operator chain.- Parameters:
aCropX
- x coordinate of the cropped regionaCropY
- y coordinate of the cropped regionaCropWidth
- width of the cropped regionaCropHeight
- height of the cropped region- Returns:
- this builder
-
curves
public ALcdImageOperatorChain.Builder curves(ILcdPoint[][] aCurves, TLcdCurvesOp.CurveType aCurveType) Corresponds to TLcdCurvesOp.curves(com.luciad.imaging.ALcdImage, com.luciad.shape.ILcdPoint[][], com.luciad.imaging.operator.TLcdCurvesOp.CurveType), but the input image is passed in via the operator chain.- Parameters:
aCurves
- the control points for each defined curveaCurveType
- the type of curve used to interpolate between the control points- Returns:
- this builder
-
expand
public ALcdImageOperatorChain.Builder expand(int aExpandX, int aExpandY, int aExpandWidth, int aExpandHeight) Corresponds to TLcdExpandOp.expand(com.luciad.imaging.ALcdImage, int, int, int, int), but the input image is passed in via the operator chain.- Parameters:
aExpandX
- x coordinate of the expanded regionaExpandY
- y coordinate of the expanded regionaExpandWidth
- width of the expanded regionaExpandHeight
- height of the expanded region- Returns:
- this builder
-
histogram
Corresponds to TLcdHistogramOp.histogram(com.luciad.imaging.ALcdBasicImage, int), but the input image is passed in via the operator chain.- Parameters:
aBinCount
- the number of bins of the resulting histogram- Returns:
- this builder
-
indexLookup
Corresponds to TLcdIndexLookupOp.indexLookup(com.luciad.imaging.ALcdImage, com.luciad.imaging.operator.util.TLcdLookupTable), but the input image is passed in via the operator chain.- Parameters:
aLUT
- the lookup table to be applied to the operator chain's input- Returns:
- this builder
-
indexLookup
Corresponds to TLcdIndexLookupOp.indexLookup(com.luciad.imaging.ALcdImage, com.luciad.imaging.operator.util.TLcdLookupTable, double[]) but the input image is passed in via the operator chain.- Parameters:
aLUT
- the lookup table to be applied to the operator chain's inputaNaNColor
- the color to be used for input pixels which contain the "no data" value- Returns:
- this builder
-
pixelRescale
Corresponds to TLcdPixelRescaleOp.pixelRescale(com.luciad.imaging.ALcdImage, double[], double[]), but the input image is passed in via the operator chain.- Parameters:
aScales
- the scales to applied to each of the image's color bandsaOffsets
- the offsets to be applied to each of the image's color bands- Returns:
- this builder
-
pixelReplace
public ALcdImageOperatorChain.Builder pixelReplace(double[] aSource, double[] aDestination, double aTolerance) Corresponds to TLcdPixelReplaceOp.pixelReplace(com.luciad.imaging.ALcdImage, double[], double[], double), but the input image is passed in via the operator chain.- Parameters:
aSource
- the color to be replacedaDestination
- the color by which the source color is to be replacedaTolerance
- the tolerance with which to match the source color in the input image- Returns:
- this builder
- Since:
- 2024.0
-
pixelTransform
Corresponds to TLcdPixelTransformOp.pixelTransform(com.luciad.imaging.ALcdImage, double[], double[]), but the input image is passed in via the operator chain.- Parameters:
aMatrix
- the matrix to be applied to each of the images pixelsaOffsets
- the offsets to be added- Returns:
- this builder
-
resize
Corresponds to TLcdResizeOp.resize(com.luciad.imaging.ALcdImage, double, double), but the input image is passed in via the operator chain.- Parameters:
aScaleX
- the scale factor in the x directionaScaleY
- the scale factor in the y direction- Returns:
- this builder
-
semantics
Corresponds to TLcdSemanticsOp.semantics(com.luciad.imaging.ALcdImage, com.luciad.imaging.ALcdBandSemantics[]), but the input image is passed in via the operator chain.- Parameters:
aBandSemantics
- semantics to be assigned to the operator chain's input- Returns:
- this builder
-
semantics
public ALcdImageOperatorChain.Builder semantics(ALcdBandSemantics[] aBandSemantics, double[] aScales, double[] aOffsets) Corresponds to TLcdSemanticsOp.semantics(com.luciad.imaging.ALcdImage, com.luciad.imaging.ALcdBandSemantics[], double[], double[]), but the input image is passed in via the operator chain.- Parameters:
aBandSemantics
- semantics to be assigned to the operator chain's inputaScales
- scale factors to be applied to each of the input image's bandsaOffsets
- offsets to be applied to each of the input image's bands- Returns:
- this builder
-
semantics
Corresponds to TLcdSemanticsOp.semantics(com.luciad.imaging.ALcdImage, java.util.List), but the input image is passed in via the operator chain.- Parameters:
aBandSemantics
- semantics to be assigned to the operator chain's input- Returns:
- this builder
-
semantics
public ALcdImageOperatorChain.Builder semantics(List<ALcdBandSemantics> aBandSemantics, double[] aScales, double[] aOffsets) Corresponds to TLcdSemanticsOp.semantics(com.luciad.imaging.ALcdImage, java.util.List, double[], double[]), but the input image is passed in via the operator chain.- Parameters:
aBandSemantics
- semantics to be assigned to the operator chain's inputaScales
- scale factors to be applied to each of the input image's bandsaOffsets
- offsets to be applied to each of the input image's bands- Returns:
- this builder
-
swipe
Corresponds to TLcdSwipeOp.swipe(com.luciad.imaging.ALcdBasicImage, com.luciad.imaging.ALcdBasicImage, int), but the first input image is passed in via the operator chain.- Parameters:
aSecondImage
- the second image to be processedaSwipeX
- x coordinate of the swipe line- Returns:
- this builder
-
build
Creates a new operator chain combining all operators and their parameters as previously set using this builder.- Returns:
- the operator chain produced by this builder
-