Re: [djatoka-devel] zoom and integrate viewer in application?
Status: Beta
Brought to you by:
rchute
From: Ryan M. C. <rc...@la...> - 2009-05-26 17:03:10
|
Arne, >> The viewer or any other client implementation can live independently >> for the server webapp. The provided instructions and viewers are >> reference implementations intended to show working interaction between >> the client and server. The are no inherent djatoka restrictions on >> where you can place the client. The only restrictions are those of >> the security model restrictions for the client implementation; i.e., >> cross-domain scripting limitations. > > that should go into the installation howto, too, imho. True, added it to the viewer installation page. >>> second question: >>> is it possible to tweak the viewers javascript to make the zooming steps >>> smaller? >>> one requirement is fully adjustable zoom which in practice means small >>> zoom steps, atm my test picture resizes in 4 steps which is not enough. >>> i guess, it depends at least partially on the number of levels used when >>> creating the jp2 file, but surely the server can generate itermediate >>> formats? >> No. Most, if not all multi-scale image formats, work with multiples >> of two. You would need to handle the in-between zoom levels in memory. > > > "in memory" meaning what? > if i understand correctly, every zoom step corresponds a precreated > image in that pyramid like image, say with 4 levels i get 4 levels of zoom. > (+) always sends nothing but "one step bigger" and (-) "one step > smaller", but no actual zoom level There are no pre-created images. During compression the application specifies how many times a wavelet decomposition should be applied. These decomposition wavelet transforms (DWT) store the information necessary to extract an image 2x the current level. The decomposition process starts at the maximum resolution and cuts the image in half for each level. So if an image is 6144 x 4096 and you specify 4 levels, you would have: Level 4: 6144 x 4096 Level 3: 3072 x 2048 Level 2: 1536 x 1024 Level 1: 768 x 512 If you specify 8 levels, you would get: Level 8: 6144 x 4096 Level 7: 3072 x 2048 Level 6: 1536 x 1024 Level 5: 768 x 512 Level 4: 384 x 256 Level 3: 192 x 128 Level 2: 96 x 64 Level 1: 48 x 32 Each level is exactly half the resolution of the previous level. The DWTs contain the necessary information to construct the next level. -- djatoka resolution logic -- djatoka normalizes the requested resolutions by determining the number of times the max resolution can be cut in half until the longest side is less than 96 pixels. So even though a metadata request may report 10 levels (i.e., image was compressed with 10 dwt levels), if the resolution is 6144 x 4096, djatoka will only use the top 7 levels: 6144 - Size 6 3072 - Size 5 1536 - Size 4 768 - Size 3 384 - Size 2 192 - Size 1 96 - Size 0 48 - Not Used 24 - Not Used 12 - Not Used Without this normalization, a client wouldn't be able to request svc.level=0 and know that is was going to receive an image ~96 pixels that it can use as a thumbnail view. This provides a consistent interface for clients to build multi-scale image applications. Most of this is in the wiki under: http://apps.sourceforge.net/mediawiki/djatoka/index.php?title=Version_1.0_Reporting_Wrong_Levels > so, to create intermediate sizes i have to modify djatoka's code > somehow? there's nothing that does that already and only needs enabling? > where would one start to implement such a modification (class/method)? The server and the images do not have the ability to provide the functionality you request. My original suggestion to perform the intermediate resolutions in-memory would entail your client downloading the fullview of the next highest JPEG2000 level, performing the arbitrary resolution using scaling logic in the client. When someone requests when the arbitrary resolution is equal to or greater than the resolution of the next highest JPEG2000 level, then you go download that and follow the same usage pattern. > btw: does there a documentation exist explaining the options of the > compress utility? > i tried to create an image with 10 levels but still the viewer only > offered 4 steps. You can find compression and extraction parameters at: http://apps.sourceforge.net/mediawiki/djatoka/index.php?title=Djatoka_Applications Regarding installation, I'll add some notes describing the individual elements defined in the env.sh script and necessary for integration with alternate application servers and development environments. Thanks, Ryan |