Object
ImageRequest
A request for a two-dimensional view of a grid coverage. Those requests can be used for
reading or
rendering and image in a background thread.
- Since:
- 1.1
- See Also:
-
Constructor Summary
ConstructorDescriptionImageRequest
(GridCoverage source, GridExtent slice) Creates a new request for loading an image from the specified coverage.ImageRequest
(GridCoverageResource source, GridGeometry domain, int... range) Creates a new request for loading an image from the specified resource. -
Method Summary
Modifier and TypeMethodDescriptionfinal Optional
<GridCoverage> Returns the coverage specified at construction time, or an empty value if none.final Optional
<GridGeometry> Returns the desired grid extent and resolution, or an empty value for reading the full domain.final Optional
<int[]> Returns the 0-based indices of sample dimensions to read, or an empty value for reading them all.final Optional
<GridCoverageResource> Returns the resource specified at construction time, or an empty value if none.final Optional
<GridExtent> Returns the subspace of the grid coverage extent to render.
-
Constructor Details
-
ImageRequest
Creates a new request for loading an image from the specified resource. Ifdomain
andrange
arguments are null, then the full coverage will be loaded. For loading a smaller amount of data, sub-domain or sub-range can be specified as documented in the read method javadoc.- Parameters:
source
- source of the image to load.domain
- desired grid extent and resolution, ornull
for reading the whole domain.range
- 0-based indices of sample dimensions to read, ornull
or an empty sequence for reading them all.- See Also:
-
ImageRequest
Creates a new request for loading an image from the specified coverage. If thesliceExtent
argument is null, then the full coverage will be rendered in the first two dimensions having a size greater than 1 cell. For rendering a smaller amount of data, or for rendering data along other dimensions, a slice extent can be specified as documented in the render method javadoc.- Parameters:
source
- source of the image to load.slice
- a subspace of the grid coverage extent to render, ornull
for the whole extent.- See Also:
-
-
Method Details
-
getResource
Returns the resource specified at construction time, or an empty value if none.- Returns:
- the resource to read.
-
getCoverage
Returns the coverage specified at construction time, or an empty value if none.- Returns:
- the coverage to render.
-
getDomain
Returns the desired grid extent and resolution, or an empty value for reading the full domain. This is thedomain
argument specified to the following constructor:
This argument will be forwarded verbatim to the following method (see its javadoc for more explanation):ImageRequest(GridCoverageResource, GridGeometry, int[])
This property is always empty if this image request has been created with theGridCoverageResource.read(GridGeometry, int...)
ImageRequest(GridCoverage, GridExtent)
constructor, since no read operation will happen in such case.- Returns:
- the desired grid extent and resolution of the coverage.
-
getRange
Returns the 0-based indices of sample dimensions to read, or an empty value for reading them all. This is therange
argument specified to the following constructor:
This argument will be forwarded verbatim to the following method (see its javadoc for more explanation):ImageRequest(GridCoverageResource, GridGeometry, int[])
This property is always empty if this image request has been created with theGridCoverageResource.read(GridGeometry, int...)
ImageRequest(GridCoverage, GridExtent)
constructor, since no read operation will happen in such case.- Returns:
- the 0-based indices of sample dimensions to read.
-
getSliceExtent
Returns the subspace of the grid coverage extent to render. This is thesliceExtent
argument specified to the following constructor:
This argument will be forwarded verbatim to the following method (see its javadoc for more explanation):ImageRequest(GridCoverage, GridExtent)
If non-empty, then all dimensions except two should have a size of 1 cell.GridCoverage.render(GridExtent)
- Returns:
- subspace of the grid coverage extent to render.
- See Also:
-