|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ThumbnailStore
Provides methods for dealing with thumbnails. Provision is provided to retrieve thumbnails using the on-disk cache (provided by ROMIO) or on the fly.
NOTE: The calling order for the service is as follows:
Method Summary | |
---|---|
void |
createThumbnail(Integer sizeX,
Integer sizeY)
Creates a thumbnail for a pixels set using a given set of rendering settings (RenderingDef) in the on-disk cache. |
void |
createThumbnails()
Creates thumbnails for a pixels set using a given set of rendering settings (RenderingDef) in the on-disk cache for every sizeX/sizeY combination already cached. |
void |
createThumbnailsByLongestSideSet(Integer size,
Set<Long> pixelsIds)
Creates thumbnails for a number of pixels sets using a given set of rendering settings (RenderingDef) in the on-disk cache. |
byte[] |
getThumbnail(Integer sizeX,
Integer sizeY)
Retrieves a thumbnail for a pixels set using a given set of rendering settings (RenderingDef). |
byte[] |
getThumbnailByLongestSide(Integer size)
Retrieves a thumbnail for a pixels set using a given set of rendering settings (RenderingDef). |
byte[] |
getThumbnailByLongestSideDirect(Integer size)
Retrieves a thumbnail for a pixels set using a given set of rendering settings (RenderingDef). |
Map<Long,byte[]> |
getThumbnailByLongestSideSet(Integer size,
Set<Long> pixelsIds)
Retrieves a number of thumbnails for pixels sets using given sets of rendering settings (RenderingDef). |
byte[] |
getThumbnailDirect(Integer sizeX,
Integer sizeY)
Retrieves a thumbnail for a pixels set using a given set of rendering settings (RenderingDef). |
byte[] |
getThumbnailForSectionByLongestSideDirect(int theZ,
int theT,
Integer size)
Retrieves a thumbnail for a pixels set using a given set of rendering settings (RenderingDef) for a particular section. |
byte[] |
getThumbnailForSectionDirect(int theZ,
int theT,
Integer sizeX,
Integer sizeY)
Retrieves a thumbnail for a pixels set using a given set of rendering settings (RenderingDef) for a particular section. |
Map<Long,byte[]> |
getThumbnailSet(Integer sizeX,
Integer sizeY,
Set<Long> pixelsIds)
Retrieves a number of thumbnails for pixels sets using given sets of rendering settings (RenderingDef). |
void |
resetDefaults()
Resets the rendering definition for the active pixels set to its default settings. |
boolean |
setPixelsId(long pixelsId)
This method manages the state of the service; it must be invoked before using any other methods. |
void |
setRenderingDefId(long renderingDefId)
This method manages the state of the service; it should be invoked directly after setPixelsId . |
boolean |
thumbnailExists(Integer sizeX,
Integer sizeY)
Checks if a thumbnail of a particular size exists for a pixels set. |
Methods inherited from interface ome.api.StatefulServiceInterface |
---|
activate, close, getCurrentEventContext, passivate |
Method Detail |
---|
boolean setPixelsId(long pixelsId)
ThumbnailStorerelies on the
RenderingEngine, a valid rendering definition must be available for it to work.
pixelsId
- an Pixels
id.
true
if a RenderingDef
exists for the
Pixels
set, otherwise false
ApiUsageException
- if no pixels object exists with the ID pixelsId.void setRenderingDefId(long renderingDefId)
setPixelsId
. If it is not invoked with a valid
rendering definition ID before using the thumbnail accessor methods
execution continues as if renderingDefId were set to
null
.
renderingDefId
- an RenderingDef
id.
null
specifies the user's currently active
rendering settings to be used.
ValidationException
- if no rendering definition exists with the ID
renderingDefId.byte[] getThumbnail(Integer sizeX, Integer sizeY)
#getThumbDirect()
, placed in the on-disk cache and returned.
sizeX
- the X-axis width of the thumbnail. null
specifies the default size of 48.sizeY
- the Y-axis width of the thumbnail. null
specifies the default size of 48.
ApiUsageException
- if:
setPixelsId()
has not yet been calledgetThumbnailDirect()
Map<Long,byte[]> getThumbnailSet(Integer sizeX, Integer sizeY, Set<Long> pixelsIds)
#getThumbDirect()
, placed in the on-disk cache and
returned. Unlike the other thumbnail retrieval methods, this method
may be called without first calling #setPixelsId()
.
sizeX
- the X-axis width of the thumbnail. null
specifies the default size of 48.sizeY
- the Y-axis width of the thumbnail. null
specifies the default size of 48.pixelsIds
- the Pixels sets to retrieve thumbnails for.
Map
whose keys are pixels ids and values are JPEG
thumbnail byte buffers or null
if an exception was thrown
while attempting to retrieve the thumbnail for that particular Pixels
set.getThumbnail()
Map<Long,byte[]> getThumbnailByLongestSideSet(Integer size, Set<Long> pixelsIds)
getThumbnailByLongestSideDirect(java.lang.Integer)
. The longest
side of the image will be used to calculate the size for the smaller
side in order to keep the aspect ratio of the original image. Unlike the
other thumbnail retrieval methods, this method may be called
without first calling #setPixelsId()
.
size
- the size of the longest side of the thumbnail requested.
null
specifies the default size of 48.pixelsIds
- the Pixels sets to retrieve thumbnails for.
Map
whose keys are pixels ids and values are JPEG
thumbnail byte buffers or null
if an exception was thrown
while attempting to retrieve the thumbnail for that particular Pixels
set.getThumbnailSet()
byte[] getThumbnailByLongestSide(Integer size)
#getThumbDirect()
, placed in the on-disk cache and returned. The
longest side of the image will be used to calculate the size for the
smaller side in order to keep the aspect ratio of the original image.
size
- the size of the longest side of the thumbnail requested.
null
specifies the default size of 48.
ApiUsageException
- if:
setPixelsId()
has not yet been calledgetThumbnail()
byte[] getThumbnailDirect(Integer sizeX, Integer sizeY)
sizeX
- the X-axis width of the thumbnail. null
specifies the default size of 48.sizeY
- the Y-axis width of the thumbnail. null
specifies the default size of 48.
ApiUsageException
- if:
setPixelsId()
has not yet been calledgetThumbnail()
byte[] getThumbnailForSectionDirect(int theZ, int theT, Integer sizeX, Integer sizeY)
theZ
- the optical section (offset across the Z-axis) to use.theT
- the timepoint (offset across the T-axis) to use.sizeX
- the X-axis width of the thumbnail. null
specifies the default size of 48.sizeY
- the Y-axis width of the thumbnail. null
specifies the default size of 48.
ApiUsageException
- if:
setPixelsId()
has not yet been calledgetThumbnail()
byte[] getThumbnailByLongestSideDirect(Integer size)
size
- the size of the longest side of the thumbnail requested.
null
specifies the default size of 48.
ApiUsageException
- if:
setPixelsId()
has not yet been calledgetThumbnailDirect()
byte[] getThumbnailForSectionByLongestSideDirect(int theZ, int theT, Integer size)
theZ
- the optical section (offset across the Z-axis) to use.theT
- the timepoint (offset across the T-axis) to use.size
- the size of the longest side of the thumbnail requested.
null
specifies the default size of 48.
ApiUsageException
- if:
setPixelsId()
has not yet been calledgetThumbnailDirect()
void createThumbnail(Integer sizeX, Integer sizeY)
sizeX
- the X-axis width of the thumbnail. null
specifies the default size of 48.sizeY
- the Y-axis width of the thumbnail. null
specifies the default size of 48.
ApiUsageException
- if:
setPixelsId()
has not yet been calledgetThumb()
,
getThumbDirect()
void createThumbnailsByLongestSideSet(Integer size, Set<Long> pixelsIds)
#setPixelsId()
. This method will not
reset or modify rendering settings in any way. If rendering settings for
a pixels set are not present, thumbnail creation for that pixels set
will not be performed.
size
- the size of the longest side of the thumbnail requested.
null
specifies the default size of 48.pixelsIds
- the Pixels sets to retrieve thumbnails for.
ApiUsageException
- if:
createThumbnail()
,
createThumbnails()
void createThumbnails()
getThumb()
,
getThumbDirect()
boolean thumbnailExists(Integer sizeX, Integer sizeY)
sizeX
- the X-axis width of the thumbnail. null
specifies use the default size of 48.sizeY
- the Y-axis width of the thumbnail. null
specifies user the default size of 48.
ApiUsageException
- if:
setPixelsId()
has not yet been calledgetThumb()
,
getThumbDirect()
void resetDefaults()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: Beta-4.1.1-r5927-b91
Copyright © 2009 The University of Dundee. All Rights Reserved.