Class Colorizer.Target
Object
Target
- Enclosing interface:
Colorizer
Information about the computed image to colorize.
The most important information is the
SampleModel
, as the inferred color model must be
compatible with the sample model.
A Target
instance may also contain contextual information
such as the SampleDimension
s of the target coverage.- Since:
- 1.4
-
Constructor Summary
ConstructorsConstructorDescriptionTarget
(SampleModel model, RenderedImage template) Creates a new target with the same sample dimensions and visible band as the given image.Target
(SampleModel model, List<SampleDimension> ranges, int visibleBand) Creates a new target with the sample model of the image to colorize. -
Method Summary
Modifier and TypeMethodDescriptionReturns a description of the bands of the image to colorize.Returns the sample model of the computed image to colorize.Returns the band to colorize if the colorization algorithm uses only one band.
-
Constructor Details
-
Target
Creates a new target with the sample model of the image to colorize.- Parameters:
model
- sample model of the computed image to colorize (mandatory).ranges
- description of the bands of the computed image to colorize, ornull
if none.visibleBand
- the band to colorize if the colorization algorithm uses only one band, or -1 if none.
-
Target
Creates a new target with the same sample dimensions and visible band as the given image. This is a convenience constructor for operations producing the same kind of data than an existing image, taken as a template. The list of sample dimensions is fetched from the image property associated to the "org.apache.sis.SampleDimensions" key.- Parameters:
model
- sample model of the computed image to colorize (mandatory).template
- the image from which to get the sample dimensions and visible band, ornull
if none.- Since:
- 1.5
-
-
Method Details
-
getSampleModel
Returns the sample model of the computed image to colorize. The color model created byColorizer.apply(Target)
must be compatible with this sample model.- Returns:
- computed image sample model (never null).
- See Also:
-
getRanges
Returns a description of the bands of the image to colorize. This information may be present if the image operation is invoked by aGridCoverageProcessor
operation, or if the source image contains the "org.apache.sis.SampleDimensions" property Note that in the latter case, the list may contain null elements if this information is missing in some bands.- Returns:
- description of the bands of the image to colorize.
- See Also:
-
getVisibleBand
Returns the band to colorize if the colorization algorithm uses only one band. The value is always positive and less than the number of bands of the sample model. This information is ignored if the colorization uses many bands (e.g.Colorizer.ARGB
).- Returns:
- the band to colorize if the colorization algorithm uses only one band.
- See Also:
-