public abstract class AbstractImageProvider extends java.lang.Object implements ImageProvider
ImageProvider
interface.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_THUMBNAIL_SIZE |
Constructor and Description |
---|
AbstractImageProvider() |
Modifier and Type | Method and Description |
---|---|
IcyBufferedImage |
getImage(int z,
int t)
Returns the image located at specified position.
|
IcyBufferedImage |
getImage(int serie,
int z,
int t)
Returns the image located at specified position.
|
IcyBufferedImage |
getImage(int serie,
int resolution,
int z,
int t)
Returns the image located at specified position.
|
IcyBufferedImage |
getImage(int serie,
int resolution,
int z,
int t,
int c)
Returns the image located at specified position.
|
IcyBufferedImage |
getImage(int serie,
int resolution,
java.awt.Rectangle rectangle,
int z,
int t)
Returns the image located at specified position.
|
IcyBufferedImage |
getImageByTile(int serie,
int resolution,
int z,
int t,
int c,
int tileW,
int tileH,
ProgressListener listener)
Returns the image located at specified position using tile by tile reading (if supported by the importer).
|
java.lang.Object |
getPixels(int serie,
int resolution,
java.awt.Rectangle rectangle,
int z,
int t,
int c)
Returns the pixel data located for specified position of the image.
|
int |
getResolutionFactor(int serie,
int wantedSize)
Returns the image resolution that best suit to the size resolution.
|
static int |
getResolutionFactor(int sizeX,
int sizeY,
int wantedSize)
Returns the sub image resolution which best suit to the desired size.
|
IcyBufferedImage |
getThumbnail(int serie)
Returns the image thumbnail for the specified serie of the image.
|
int |
getTileHeight(int serie)
Returns the (optimal) tile height for the specified serie of the image.
|
static java.util.List<java.awt.Rectangle> |
getTileList(int sizeX,
int sizeY,
int tileW,
int tileH)
Get the list of tiles to fill the given XY plan size.
|
int |
getTileWidth(int serie)
Returns the (optimal) tile width for the specified serie of the image.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getImage, getMetaData
public static final int DEFAULT_THUMBNAIL_SIZE
public AbstractImageProvider()
public int getTileWidth(int serie) throws UnsupportedFormatException, java.io.IOException
ImageProvider
0
if tile loading is not supported and -1
if any tile size
can be used.getTileWidth
in interface ImageProvider
serie
- Serie index for multi serie image (use 0 if unsure).UnsupportedFormatException
java.io.IOException
public int getTileHeight(int serie) throws UnsupportedFormatException, java.io.IOException
ImageProvider
0
if tile loading is not supported and -1
if any tile size
can be used.getTileHeight
in interface ImageProvider
serie
- Serie index for multi serie image (use 0 if unsure).UnsupportedFormatException
java.io.IOException
public IcyBufferedImage getThumbnail(int serie) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getThumbnail
in interface ImageProvider
serie
- Serie index for multi serie image (use 0 if unsure).UnsupportedFormatException
java.io.IOException
public java.lang.Object getPixels(int serie, int resolution, java.awt.Rectangle rectangle, int z, int t, int c) throws UnsupportedFormatException, java.io.IOException
ImageProvider
OMEXMLMetadataImpl.getPixelsType(int)
getPixels
in interface ImageProvider
serie
- Serie index for multi serie image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.resolution / (2^resolution)
rectangle
- The 2D region we want to retrieve.null
then the whole image is returned.z
- Z position of the image (slice) we want retrieve data fromt
- T position of the image (frame) we want retrieve data fromc
- C position of the image (channel) we want retrieve (-1 is not accepted here).UnsupportedFormatException
java.io.IOException
public IcyBufferedImage getImage(int serie, int resolution, java.awt.Rectangle rectangle, int z, int t) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getImage
in interface ImageProvider
serie
- Serie index for multi serie image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.resolution / (2^resolution)
rectangle
- The 2D region we want to retrieve.null
then the whole image is returned.z
- Z position of the image (slice) we want retrievet
- T position of the image (frame) we want retrieveUnsupportedFormatException
java.io.IOException
public IcyBufferedImage getImage(int serie, int resolution, int z, int t, int c) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getImage
in interface ImageProvider
serie
- Serie index for multi serie image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.resolution / (2^resolution)
z
- Z position of the image (slice) we want retrievet
- T position of the image (frame) we want retrievec
- C position of the image (channel) we want retrieve (-1 means all channel).UnsupportedFormatException
java.io.IOException
public IcyBufferedImage getImage(int serie, int resolution, int z, int t) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getImage
in interface ImageProvider
serie
- Serie index for multi serie image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.resolution / (2^resolution)
z
- Z position of the image (slice) we want retrievet
- T position of the image (frame) we want retrieveUnsupportedFormatException
java.io.IOException
public IcyBufferedImage getImage(int serie, int z, int t) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getImage
in interface ImageProvider
serie
- Serie index for multi serie image (use 0 if unsure).z
- Z position of the image (slice) we want retrievet
- T position of the image (frame) we want retrieveUnsupportedFormatException
java.io.IOException
public IcyBufferedImage getImage(int z, int t) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getImage
in interface ImageProvider
z
- Z position of the image (slice) we want retrievet
- T position of the image (frame) we want retrieveUnsupportedFormatException
java.io.IOException
public IcyBufferedImage getImageByTile(int serie, int resolution, int z, int t, int c, int tileW, int tileH, ProgressListener listener) throws UnsupportedFormatException, java.io.IOException
serie
- Serie index for multi serie image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.resolution / (2^resolution)
z
- Z position of the image (slice) we want retrievet
- T position of the image (frame) we want retrievec
- C position of the image (channel) we want retrieve.tileW
- width of the tile (better to use a multiple of 2)tileH
- height of the tile (better to use a multiple of 2)listener
- Progression listenerUnsupportedFormatException
java.io.IOException
public static java.util.List<java.awt.Rectangle> getTileList(int sizeX, int sizeY, int tileW, int tileH)
sizeX
- plan sizeXsizeY
- plan sizeYtileW
- tile widthtileH
- tile heightpublic static int getResolutionFactor(int sizeX, int sizeY, int wantedSize)
sizeX
- original image widthsizeY
- original image heightwantedSize
- wanted size (for the maximum dimension)public int getResolutionFactor(int serie, int wantedSize) throws UnsupportedFormatException, java.io.IOException
serie
- Serie index for multi serie image (use 0 if unsure).wantedSize
- wanted size (for the maximum dimension)java.io.IOException
UnsupportedFormatException