[ome-devel] Thumbnails

Chris Allan callan at blackcat.ca
Tue Aug 26 13:54:12 BST 2008


On 26 Aug 2008, at 08:20, Matthias Dunda wrote:

> Hi all,

Hi Matthias.

>
> I finally generated thumbnails for a Dataset:
>
>         List<Image> imgs = OmeroTools.getImagesForDataset(conn, 178);
>
>                 for ( Image i : imgs){
>                         Pixels p = i.getDefaultPixels();
>                         System.out.println("Generated thumb for pix  
> id "+p.getId());
>                         ThumbnailStore tstore =  
> conn.getServiceFactory().createThumbnailService();
>                         tstore.setPixelsId(p.getId());
>                         tstore.createThumbnail(160,120);
>                 }
>
> This worked, /OMERO/Thumbnails got populated, database entries  
> exist...
>
> I was finally hoping, that this would speed up loading the pics in  
> the Browser but it doesn't.
>
> So first question: what are thumbnails generally good for? where do  
> they come into play?

In a purely OMERO client scope, not much. Insight does not use cached  
thumbnails in Beta2.3, however they are used in Beta3.0. They will  
come into play once you upgrade and/or if you have other clients who  
want to use cached thumbnails.

> Second question: is there a way to speed up the loading in the  
> browser view?

Not without upgrading Insight's thumbnail display code to Beta3.0 and  
upgrading your server to Beta3.0 thumbnail rendering code.

>
> Third question: what is an appropriate size for the thumbs?

Insight currently retrieves 96x96 thumbnails and scales them  
internally to produce the view you see on screen. The larger  
thumbnail size is retrieved so that various visualization features  
(such as thumbnail zooming) do not require a remote call. Also,  
Insight uses the getThumbnailByLongestSide style method calls which  
produce thumbnails whose dimensions adhere to the original aspect  
ratio of the image-- if I have a 100x50 image and I ask for a  
thumbnail whose longest side is 50, I'll receive a 50x25 thumbnail.

>
> Last question (remaining from my last post): what is the method  
> createThumbnails() good for? So far it did nothing for me.

As above, it's only good for clients who either use the cached  
thumbnail methods or to prepare your server for Beta3.0 it does not  
affect Insight Beta2.3.

>
> Cheers
> Matthias

Ciao.

-Chris


More information about the ome-devel mailing list