Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to ThumbnailLoader and ThumbnailService #5827

Merged
merged 14 commits into from
Sep 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion components/blitz/resources/omero/api/ThumbnailStore.ice
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ module omero {
* in the on-disk cache it will be returned directly,
* otherwise it will be created as in
* {@link #getThumbnailDirect}, placed in the on-disk
* cache and returned.
* cache and returned. If the thumbnail is missing, a clock will
* be returned to signify that the thumbnail is yet to be generated.
*
* @param sizeX the X-axis width of the thumbnail.
* <code>null</code> specifies the default size
Expand All @@ -112,6 +113,35 @@ module omero {
*/
idempotent Ice::ByteSeq getThumbnail(omero::RInt sizeX, omero::RInt sizeY) throws ServerError;

/**
* Retrieves a thumbnail for a pixels set using a given set of
* rendering settings (RenderingDef). If the thumbnail exists
* in the on-disk cache it will be returned directly,
* otherwise it will be created as in
* {@link #getThumbnailDirect}, placed in the on-disk
* cache and returned. If the thumbnail is still to be generated, an empty array will
* be returned.
*
* @param sizeX the X-axis width of the thumbnail.
* <code>null</code> specifies the default size
* of 48.
* @param sizeY the Y-axis width of the thumbnail.
* <code>null</code> specifies the default size
* of 48.
* @throws ApiUsageException
* if:
* <ul>
* <li><code>sizeX</code> > pixels.sizeX</li>
* <li><code>sizeX</code> is negative</li>
* <li><code>sizeY</code> > pixels.sizeY</li>
* <li><code>sizeY</code> is negative</li>
* <li>{@link #setPixelsId} has not yet been called</li>
* </ul>
* @return a JPEG thumbnail byte buffer
* @see #getThumbnailDirect
*/
idempotent Ice::ByteSeq getThumbnailWithoutDefault(omero::RInt sizeX, omero::RInt sizeY) throws ServerError;

/**
* Retrieves a number of thumbnails for pixels sets using
* given sets of rendering settings (RenderingDef). If the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import omero.api.AMD_ThumbnailStore_createThumbnailsByLongestSideSet;
import omero.api.AMD_ThumbnailStore_getRenderingDefId;
import omero.api.AMD_ThumbnailStore_getThumbnail;
import omero.api.AMD_ThumbnailStore_getThumbnailWithoutDefault;
import omero.api.AMD_ThumbnailStore_getThumbnailByLongestSide;
import omero.api.AMD_ThumbnailStore_getThumbnailByLongestSideDirect;
import omero.api.AMD_ThumbnailStore_getThumbnailByLongestSideSet;
Expand Down Expand Up @@ -126,6 +127,12 @@ public void getThumbnail_async(AMD_ThumbnailStore_getThumbnail __cb,

}

public void getThumbnailWithoutDefault_async(AMD_ThumbnailStore_getThumbnailWithoutDefault __cb,
RInt sizeX, RInt sizeY, Current __current) throws ServerError {
callInvokerOnRawArgs(__cb, __current, sizeX, sizeY);

}

public void resetDefaults_async(AMD_ThumbnailStore_resetDefaults __cb,
Current __current) throws ServerError {
callInvokerOnRawArgs(__cb, __current);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ public long getRenderingDefId() {
return -1;
}

@Override
public byte[] getThumbnailWithoutDefault(Integer arg0, Integer arg1) {
return null;
}

}

//
Expand Down
29 changes: 29 additions & 0 deletions components/common/src/ome/api/ThumbnailStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,35 @@ public interface ThumbnailStore extends StatefulServiceInterface {
* @see #getThumbnailDirect(Integer, Integer)
*/
public byte[] getThumbnail(Integer sizeX, Integer sizeY);

/**
* Retrieves a thumbnail for a pixels set using a given set of
* rendering settings (RenderingDef). If the thumbnail exists
* in the on-disk cache it will be returned directly,
* otherwise it will be created as in
* {@link #getThumbnailDirect}, placed in the on-disk
* cache and returned. If the thumbnail is still to be generated, an empty array will
* be returned.
*
* @param sizeX the X-axis width of the thumbnail.
* <code>null</code> specifies the default size
* of 48.
* @param sizeY the Y-axis width of the thumbnail.
* <code>null</code> specifies the default size
* of 48.
* @throws ApiUsageException
* if:
* <ul>
* <li><code>sizeX</code> > pixels.sizeX</li>
* <li><code>sizeX</code> is negative</li>
* <li><code>sizeY</code> > pixels.sizeY</li>
* <li><code>sizeY</code> is negative</li>
* <li>{@link #setPixelsId} has not yet been called</li>
* </ul>
* @return a JPEG thumbnail byte buffer
* @see #getThumbnailDirect
*/
public byte[] getThumbnailWithoutDefault(Integer sizeX, Integer sizeY);

/**
* Retrieves a number of thumbnails for pixels sets using given sets of
Expand Down
Loading