Package nom.tam.image
Interface ImageTiler
- All Known Implementing Classes:
CompressedImageTiler
,StandardImageTiler
public interface ImageTiler
Image tiling interface. This interface supports general multi-dimensional tiling. However, FITS tiles are always
2-dimentional, but really images of any dimensions may be covered with 2D tiles.
- Author:
- tmcglynn
-
Method Summary
Modifier and TypeMethodDescriptionReturns the entire image reconstructed from the available tiles.getTile
(int[] start, int[] lengths) Returns a tile from the image of the specified size at the specified location.default Object
getTile
(int[] start, int[] lengths, int[] steps) Returns a sparsely sampled tile from the image of the specified size at the specified location.void
Fills the supplied array or output stream with the data from an image tile of the specified size at the specified location.default void
Fills the supplied array our output stream with the sparsely sampled data from an image tile of the specified size at the specified location.
-
Method Details
-
getCompleteImage
Returns the entire image reconstructed from the available tiles.- Returns:
- the complete reconstructed image from the available tiles, as a Java array. This may be an
array of promitives (such as
float[][]
) for images, or anObject[]
for binary tables. - Throws:
IOException
- if there was an error accessing the tile data from the input.- See Also:
-
getTile
Returns a tile from the image of the specified size at the specified location. An image tile is returned as a one-dimensional array although the image will normally be multidimensional.- Parameters:
start
- the pixels indices where the tile starts in the full image. The array =hould contain a value for each image dimension.lengths
- the tile size in pixels. The array should contain a value for each image dimension. For the supported 2D tiles, the values beyond the first two entries should be set to 1.- Returns:
- a Java array containing data for the requested tile. This will always be a flattened 1D array, even if the image is multidimensional
- Throws:
IOException
- if there was an error accessing the tile data from the input.- See Also:
-
getTile
Returns a sparsely sampled tile from the image of the specified size at the specified location.- Parameters:
start
- the pixels indices where the tile starts in the full image. The array =hould contain a value for each image dimension.lengths
- the tile size in pixels. The array should contain a value for each image dimension. For the supported 2D tiles, the values beyond the first two entries should be set to 1.steps
- the sampling frequency of the original image, in pixels. The array =hould contain a value for each image dimension.- Returns:
- a Java array containing data for the requested tile. This will always be a flattened 1D array, even if the image is multidimensional
- Throws:
IOException
- if there was an error accessing the tile data from the input.- See Also:
-
getTile
Fills the supplied array or output stream with the data from an image tile of the specified size at the specified location.- Parameters:
output
- A one-dimensional output array or stream. Data not within the valid limits of the image will be left unchanged. For an array, the length should be the product of lengths. Optionally provide anArrayDataOutput
to stream out data and not fill memory; useful for web applications.start
- the pixels indices where the tile starts in the full image. The array =hould contain a value for each image dimension.lengths
- the tile size in pixels. The array =hould contain a value for each image dimension. For the supported 2D tiles, the values beyond the first two entries should be set to 1.- Throws:
IOException
- if there was an error writing the tile to the output.- See Also:
-
getTile
Fills the supplied array our output stream with the sparsely sampled data from an image tile of the specified size at the specified location.- Parameters:
output
- A one-dimensional output array or stream. Data not within the valid limits of the image will be left unchanged. For an array, the length should be the product of lengths. Optionally provide anArrayDataOutput
to stream out data and not fill memory; useful for web applications.start
- the pixels indices where the tile starts in the full image. The array =hould contain a value for each image dimension.lengths
- the tile size in pixels. The array =hould contain a value for each image dimension. For the supported 2D tiles, the values beyond the first two entries should be set to 1.steps
- the sampling frequency of the original image, in pixels. The array =hould contain a value for each image dimension.- Throws:
IOException
- if there was an error writing the tile to the output.- See Also:
-