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 series,
int z,
int t)
Returns the image located at specified position.
|
IcyBufferedImage |
getImage(int series,
int resolution,
int z,
int t)
Returns the image located at specified position.
|
IcyBufferedImage |
getImage(int series,
int resolution,
int z,
int t,
int c)
Returns the image located at specified position.
|
IcyBufferedImage |
getImage(int series,
int resolution,
java.awt.Rectangle rectangle,
int z,
int t)
Returns the image located at specified position.
|
ome.xml.meta.OMEXMLMetadata |
getOMEXMLMetaData()
Returns the image metadata in OME format (metadata provides many informations about the image).
|
java.lang.Object |
getPixels(int series,
int resolution,
java.awt.Rectangle rectangle,
int z,
int t,
int c)
Returns the pixel data located for specified position of the image.
|
java.lang.Object |
getPixelsByTile(int series,
int resolution,
java.awt.Rectangle region,
int z,
int t,
int c,
int tileW,
int tileH,
ProgressListener listener)
Returns the pixels located at specified position using tile by tile reading (if supported by the importer).
|
int |
getResolutionFactor(int series,
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 series)
Returns the image thumbnail for the specified series of the image.
|
int |
getTileHeight(int series)
Returns the (optimal) tile height for the specified series of the image.
|
int |
getTileWidth(int series)
Returns the (optimal) tile width for the specified series of the image.
|
boolean |
isResolutionAvailable(int series,
int resolution)
Returns
true if the given sub resolution is available from this series. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getImage, getMetaData
public static final int DEFAULT_THUMBNAIL_SIZE
public AbstractImageProvider()
public ome.xml.meta.OMEXMLMetadata getOMEXMLMetaData() throws UnsupportedFormatException, java.io.IOException
ImageProvider
MetaDataUtil.getNumSeries(OMEXMLMetadata)
MetaDataUtil.getSizeX(OMEXMLMetadata, int)
MetaDataUtil.getSizeY(OMEXMLMetadata, int)
MetaDataUtil.getSizeZ(OMEXMLMetadata, int)
MetaDataUtil.getSizeT(OMEXMLMetadata, int)
MetaDataUtil.getSizeC(OMEXMLMetadata, int)
MetaDataUtil.getDataType(OMEXMLMetadata, int)
MetaDataUtil.getPositionX(OMEXMLMetadata, int, int, int, int, double)
MetaDataUtil.getPositionY(OMEXMLMetadata, int, int, int, int, double)
MetaDataUtil.getPositionZ(OMEXMLMetadata, int, int, int, int, double)
MetaDataUtil.getPositionT(OMEXMLMetadata, int, long)
MetaDataUtil.getPositionTOffset(OMEXMLMetadata, int, int, int, int, double)
getOMEXMLMetaData
in interface ImageProvider
UnsupportedFormatException
java.io.IOException
public int getTileWidth(int series) 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
series
- Series index for multi series image (use 0 if unsure).UnsupportedFormatException
java.io.IOException
public int getTileHeight(int series) 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
series
- Series index for multi series image (use 0 if unsure).UnsupportedFormatException
java.io.IOException
public boolean isResolutionAvailable(int series, int resolution) throws UnsupportedFormatException, java.io.IOException
ImageProvider
true
if the given sub resolution is available from this series.IcyBufferedImageUtil.downscaleBy2(IcyBufferedImage, boolean, int)
method.image.originalResolution / (2^resolution)
true
).isResolutionAvailable
in interface ImageProvider
series
- Series index for multi series image (use 0 if unsure).resolution
- Resolution levelUnsupportedFormatException
java.io.IOException
public IcyBufferedImage getThumbnail(int series) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getThumbnail
in interface ImageProvider
series
- Series index for multi series image (use 0 if unsure).UnsupportedFormatException
java.io.IOException
public java.lang.Object getPixels(int series, 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
series
- Series index for multi series image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.originalResolution / (2^resolution)
rectangle
- The 2D region we want to retrieve (considering the original image resolution).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
ImageProvider.isResolutionAvailable(int, int)
public IcyBufferedImage getImage(int series, int resolution, java.awt.Rectangle rectangle, int z, int t) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getImage
in interface ImageProvider
series
- Series index for multi series image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.originalResolution / (2^resolution)
rectangle
- The 2D region we want to retrieve (considering the original image resolution).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
ImageProvider.isResolutionAvailable(int, int)
public IcyBufferedImage getImage(int series, int resolution, int z, int t, int c) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getImage
in interface ImageProvider
series
- Series index for multi series image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.originalResolution / (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
ImageProvider.isResolutionAvailable(int, int)
public IcyBufferedImage getImage(int series, int resolution, int z, int t) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getImage
in interface ImageProvider
series
- Series index for multi series image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.originalResolution / (2^resolution)
z
- Z position of the image (slice) we want retrievet
- T position of the image (frame) we want retrieveUnsupportedFormatException
java.io.IOException
ImageProvider.isResolutionAvailable(int, int)
public IcyBufferedImage getImage(int series, int z, int t) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getImage
in interface ImageProvider
series
- Series index for multi series 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 java.lang.Object getPixelsByTile(int series, int resolution, java.awt.Rectangle region, int z, int t, int c, int tileW, int tileH, ProgressListener listener) throws UnsupportedFormatException, java.io.IOException
series
- Series index for multi series image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.resolution / (2^resolution)
region
- The 2D region we want to retrieve (considering the original image resolution).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 retrievec
- C position of the image (channel) we want retrieve (-1 not accepted here).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
getPixels(int, int, Rectangle, int, int, int)
public 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 series, int wantedSize) throws UnsupportedFormatException, java.io.IOException
series
- Series index for multi series image (use 0 if unsure).wantedSize
- wanted size (for the maximum dimension)java.io.IOException
UnsupportedFormatException