OpenZoom and IIPImage
I've seen a few examples showing that OpenZoom can run on images served by IIPImage, but I haven't found any docs describing the process. As a base, I'd like to get the "MultiScaleImageExample" flex component working with our IIPImage server, but I'm not sure what I need to do to get that to work.
For example should I set the source equal to:
http://merovingio.c2rmf.cnrs.fr/fcgi-...
which returns:
IIP-server:3.65
Max-size:4080 3072
Resolution-number:5
Tile-size:256 256
or do I need to get IIPImage to return an xml file similar to the ones used in the examples?
Any help would be much appreciated.
Thanks!
-Clint
For example should I set the source equal to:
http://merovingio.c2rmf.cnrs.fr/fcgi-...
which returns:
IIP-server:3.65
Max-size:4080 3072
Resolution-number:5
Tile-size:256 256
or do I need to get IIPImage to return an xml file similar to the ones used in the examples?
Any help would be much appreciated.
Thanks!
-Clint
2
people have this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
The best answers from the company
-
Ruven,
Thanks for joining this discussion. I'm also very interested in making your IIPImage project work well with the OpenZoom project. I had some time this weekend and implemented a basic IIPImageDescriptor which was very easy thanks to your explanations and the link to the protocol documentation.
Check out the new IIPImageDescriptor:
http://github.com/openzoom/sdk/blob/m...
I haven't implemented the automatic loading of the descriptor from the metadata URL yet but you can test it as follows:
var imagePath:String = "http://merovingio.c2rmf.cnrs.fr/fcgi-bin/iipsrv.fcgi?FIF=/home/eros/iipimage/cop31/cop31_pyr_000_090.tif"
image.source = new IIPImageDescriptor(imagePath, 7738, 11146)
Let me know if I missed something or how we should prioritize next steps.
Cheers,
Daniel
I’m excited
The company says
this answers the question
-
Clint,
Even though it seems that the IIPImage server supports the Zoomify file format out of the box, it would be a great contribution & exercise to implement a specific IIPImageDescriptor. It would work basically the same as the DeepZoomImageDescriptor or ZoomifyDescriptor except that the image pyramid properties would come from the metadata you describe instead of an XML.
If you provide me with more information, e.g. how to fetch tiles (URLs) and what specification the IIPImage pyramid has, I could help you out on this.
Cheers,
Daniel
The company says
this answers the question
-
Inappropriate?Here's an example:
http://www.oldmapsonline.org/publish/...
It seems the IIP server maskerades itself as Zoomify files, eg the XML file:
http://www.oldmapsonline.org/fcgi-bin...
and the first jpeg tile:
http://www.oldmapsonline.org/fcgi-bin...
etc
I'm not exactly sure, but it looks like this is something the standard OpenZoom Nano viewer could handle. If not, you could always use their version of the viewer:
http://www.oldmapsonline.org/publish/... -
Inappropriate?Here's the zoomify xml file from your server:
http://merovingio.c2rmf.cnrs.fr/fcgi-...
and the first tile:
http://merovingio.c2rmf.cnrs.fr/fcgi-...
So from that, you should be good to go... -
Inappropriate?Clint,
Even though it seems that the IIPImage server supports the Zoomify file format out of the box, it would be a great contribution & exercise to implement a specific IIPImageDescriptor. It would work basically the same as the DeepZoomImageDescriptor or ZoomifyDescriptor except that the image pyramid properties would come from the metadata you describe instead of an XML.
If you provide me with more information, e.g. how to fetch tiles (URLs) and what specification the IIPImage pyramid has, I could help you out on this.
Cheers,
Daniel
The company says
this answers the question
-
Inappropriate?Daniel,
We're using vips "im_vips2tiff" and "deflate,tile:256x256,pyramid" options to generate the Tiled Pyramidal TIFF images.
The tile requests look like this: (2 being the zoom layer, 0-11 being the specific tiles)
http://merovingio.c2rmf.cnrs.fr/fcgi-...
http://merovingio.c2rmf.cnrs.fr/fcgi-...
...
http://merovingio.c2rmf.cnrs.fr/fcgi-...
A specific IIPImageDescriptor is a great idea and I really appreciate your help with this.
Thanks!!!
Clint
I’m excited
-
Inappropriate?Hi all,
I'm the maintainer of the IIPImage project. Yes, the server already supports the Zoomify protocol, but it would be great to add native support for the IIP protocol to openzoom as this would enable access to a lot of extra features.
Here's an example using openzoom via Zoomify tiles: http://merovingio.c2rmf.cnrs.fr/iipim...
Tile requests in the IIP protocol are of the form:
FIF=/home/eros/iipimage/Tuberculous.tif&JTL=2,0
where JTL="resolution number,tile number". The tile numbers are not X-Y as in Zoomify, but a sequential from the top left.
Before this, you need to get some image metadata and there are a number of commands to get a series of different kinds of metadata. The most important are the number of available resolutions (Resolution-number), the tile size (Tile-size) and the max image size (Max-size). So a request for the max size would be: FIF=/home/eros/iipimage/Tuberculous.tif?obj=Max-size
You can combine commands by appending them, for example: obj=Max-size&obj=Tile-size. There's also a convenience command Basic-info which gives you back a series of things.
There's more info and the official protocol documentation (the protocol was originally created by the internet imaging consortium involving HP,Kodak etc) here: http://iipimage.sourceforge.net/docum...
There are other kinds of commands for server-side image processing etc, but to get a basic version going you will only need the JTL command and the 3 metadata commands above.
We already have a flash and flex client (as well as javascript and java), so you can take a look at the source to see how the commands are used. OpenZoom looks very nice indeed, so we are thinking of basing our future flash / flex clients on this.
Cheers,
Ruven -
Inappropriate?Ruven,
Thanks for joining this discussion. I'm also very interested in making your IIPImage project work well with the OpenZoom project. I had some time this weekend and implemented a basic IIPImageDescriptor which was very easy thanks to your explanations and the link to the protocol documentation.
Check out the new IIPImageDescriptor:
http://github.com/openzoom/sdk/blob/m...
I haven't implemented the automatic loading of the descriptor from the metadata URL yet but you can test it as follows:
var imagePath:String = "http://merovingio.c2rmf.cnrs.fr/fcgi-bin/iipsrv.fcgi?FIF=/home/eros/iipimage/cop31/cop31_pyr_000_090.tif"
image.source = new IIPImageDescriptor(imagePath, 7738, 11146)
Let me know if I missed something or how we should prioritize next steps.
Cheers,
Daniel
I’m excited
The company says
this answers the question
-
Inappropriate?That's great :-)
The tile sizes are not necessarily 256x256, so there is the Tile-size command also to add for the image metadata. Otherwise what you have is all you need for basic image zooming. There is also other optional metadata such as the resolution etc you could get.
In fact there is also a command to get a whole bunch of tiles in one single request. Which is potentially very bandwidth efficient. The TIL command allows you to select a rectangle of tiles to download. You then need to split the data returned into individual tiles, which can be explicitly cached by the viewer itself.
Then, you have the more advanced features such as getting 16bit images, CIELAB color space, or multispectral images etc. But these, of course, are not necessary for normal zooming usage.
Cheers,
Ruven
I’m excited
-
Inappropriate?Hi Daniel
I tried using IIPImageDescriptor following below mentioned steps:
1. Used openzoom:MultiScaleImage instead of mx:Image in my Flex component.
2. Created an object of IIPImageDescriptor and set in MultiScaleImage source as follows:
image.source = new IIPImageDescriptor(imagePath, 1200, 1200)
3. It gets compiled successfully in Flex Builder 3 and runs perfectly.
4. Next step is to put the final swf into a jsp so that the image can be changed dynamically through javascript.
5. In Command Prompt, I go to "C:\Program Files\Adobe\Flex Builder 3" and execute following to set path variables:
FlexFrameworkCmdPrompt.bat "C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0" "C:\Program Files\Adobe\Flex Builder 3\jre"
6. Changed directory to the location of mxml file and compiled it by executing the following command:
mxmlc -include-libraries+=openzoom.swc -use-network=false Zoom.mxml
Note: I added openzoom.swc at the level of Zoom.mxml temporarily to make it work.
7. It gets compiled successfully.
8. The component gets loaded in jsp properly but the image is not displayed. Also, on clicking some links in my page, the info gets correctly transferred to the component that I tested by adding some Alert.show. It looks like MultiScaleImage is not getting loaded.
9. I even copied Flex Builder specific Zoom.swf to my jsp location but the issue was still there.
Also, I found http://community.openzoom.org/openzoo... that talks about a bug in MultiScaleImage. I think it also suggests to use DeepZoomContainer instead.
Question: The image gets loaded when run from Flex Viewer. But it does not run when added in jsp. Is it because of the issue mentioned in "trouble_with_multiscale_image"? Do we need to use DeepZoomContainer instead? If yes, do we need to have new IIPImageDescriptor for DeepZoomContainer?
Thanks & Regards
Amit
I’m confused
-
Inappropriate?Amit,
First of all, no, you certainly do not want to use DeepZoomContainer. It's not even finished yet.
Second, without having a more in-depth look, your problem sounds like a Flash security sandbox problem. Therefore: Are you loading the image from the very same domain as the JSP page & SWF? Have you tried hooking up a remote debugger, e.g. http://blogs.4point.com/armaghan.chau..., to see what's going on?
Let me know if you have more information.
Cheers,
Daniel
P.S. Which version of the OpenZoom SDK are you using?
-
Inappropriate?Thanks for the quick reply.
I am using openzoom-sdk-0.4.2.1 with Flex SDK 3.2.0.
You are correct. I am getting following Security Sandbox exception:
SecurityError: Error #2123: Security sandbox violation: Loader.content: file:///C|/Zoom/bin%2Ddebug/Zoom.swf cannot access http:///fcgi-bin/iipsrv.fcgi?FIF=<< Physical path of pyramidal tif file on IIPImage Server >>&jtl=0,0. No policy files granted access.
at flash.display::Loader/get content()
at DisplayObjectRequest/request_completeHandler()[C:\OpenZoom\openzoom-sdk-0.4.2.1\openzoom\src\org\openzoom\flash\net\DisplayObjectRequest.as:158]
I saw another topic on this issue http://community.openzoom.org/openzoo..., but did not get any solution. I tried all options mentioned (including -use-network=true) but it did not work.
The image is appearing perfectly through Flex Builder. I copied complete project folder to some other location.
Tried opening the swf in Adobe Flash Player but got above mentioned exception. When tried opening it in IE, the whole swf did not load but a broken image type appeared.
I have jsp and swf on my local but the image is coming from an image server that hosts IIPImage Server. This server is in my domain. Also, it is not a case with jsp, the swf is not even opening in Adobe Flash Player or IE whereas it is opening through Flex Builder.
When I use tiff url of some other server like "http://merovingio.c2rmf.cnrs.fr/fcgi-..., it works. But if I try to access the image from image server (hosting IIPImage) in my domain, it does not work. It seems to be some security setting issue for my image server.
Please help. -
Inappropriate?Hi all,
I'm Ruven collegue and I find your openzoom really exciting!
I already did a try to do a flex version (http://denics.free.fr/index.php/2007/...) of the powerful Ruven's javascript viewer but with your SDK things are getting more interesting.
Thanks for the great work,
Denis
I’m really excited!
-
Inappropriate?I found the solution.
MultiScaleImage uses LoaderContext indirectly to load the image from another server.
Searched on google and found that there is a change in adobe policy. For Flash files to access some resource from another server, it needs to get permission from there. For that, a policy file needs to be added to the remote Server.
Added this policy xml file to II Server and set this file path in flex code to tell it the location of policy file.
It worked.
Daniel, thanks for your time. Hope it will help somebody in future.
I’m happy
-
Inappropriate?Amit,
Exactly! Coincidentally, the merovingio server has an open crossdomain.xml policy file:
http://merovingio.c2rmf.cnrs.fr/cross...
Cheers,
Daniel
-
Inappropriate?Not really coincidentally... I needed to run the demo from my website ;)
-
Inappropriate?Denis,
Coincidentally as in thatswhyitworkedforhimthereandnowhereelse.
–Daniel
I’m kidding
-
Inappropriate?hehehehe...sorry my fault :D
-
Inappropriate?Hi Daniel
The rectangular images are not appearing properly aligned now. The vertical rectangular image appears on right side whereas horizontal at the bottom. I want to align the image to display in the center. I found
http://community.openzoom.org/openzoo.... But, when I tried to put MultiScaleImage inside MultiScaleContainer, the image stopped appearing.
Is IIPImageDescriptor not compatible with MultiScaleContainer?
Please help.
Thanks & Regards
Amit
I’m confused
-
This reply was removed on 02/05/10.
see the change log -
Inappropriate?Amit,
Can you please link to an example with source code to illustrate the issue?
Thanks,
Daniel -
Inappropriate?Hi Daniel,
I've added some simple parsing to your IIPImageDescriptor class to automatically get this from the server:
/**
* Create descriptor from basic info returned by IIP server.
* The response is of the form:
* Max-size:4080 3072
* Resolution-number:5
* etc...
* We only need the image size and tile size for now
*/
public static function fromBasicInfo(metadata:String, image:String, server:String=DEFAULT_SERVER):IIPImageDescriptor
{
var matches:Array = new Array()
// Max-size response
var width:uint
var height:uint
matches = metadata.match(/.*(Max-size:)([0-9\.]+) ([0-9\.]+)/)
if(matches==null) return null
if(matches.length>=4){
width = Number(matches[2])
height = Number(matches[3])
}
else return null
// Tile-size reponse
var tileWidth:uint = DEFAULT_TILE_WIDTH
var tileHeight:uint = DEFAULT_TILE_HEIGHT
matches = metadata.match(/.*(Tile-size:)([0-9\.]+) ([0-9\.]+)/)
if(matches==null) return null
if(matches.length>=4){
tileWidth = Number(matches[2])
tileHeight = Number(matches[3]);
}
else return null
var source:String = server + "?FIF=" + image
return new IIPImageDescriptor(source,
width,
height,
tileWidth,
tileHeight)
}
I notice that none of the other descriptor formats make URL connections for XML or otherwise. Only the result of the URL load is passed in, so I've also added a static function to get the appropriate metadata URL for an image given the server location and image name:
/**
* Return the IIP URL for making the image metadata request
*/
public static function getMetaDataURL(image:String, server:String=DEFAULT_SERVER):String
{
var url:String = server + "?FIF=" + image + "&obj=IIP,1.0&obj=Max-size&obj=Tile-size&obj=Resolution-number"
return url
}
Then there are some extra defaults to add in the class:
private static const DEFAULT_TILE_WIDTH:uint = 256
private static const DEFAULT_TILE_HEIGHT:uint = 256
private static const DEFAULT_SERVER:String = "/fcgi-bin/iipsrv.fcgi"
So, to use all this, you just need to load the metadata using a standard urlLoader object, then create the MultiScaleImage and assign the source like this:
image.source = IIPImageDescriptor.fromBasicInfo( metadataLoader.data, image_path, server )
I'm not sure this can be easily integrated into your ImagePyramidDescriptorFactory class, however.
Cheers,
Ruven
I’m excited
-
Ruven,
This is fantastic! I'd be happy to include your work in the OpenZoom SDK. To protect both of us, I'd need you to sign a Contributor's License Agreement (CLA). Let me know if you're interested and I'll send you the form.
Example: www.sun.com/software/opensource/sca.pdf
Cheers,
Daniel -
Daniel,
OK, yes, send me the agreement.
Ruven -
This works like a charm and helps me a lot because I don't need to pass the sizes through other means anymore.
Thanks,
AncientRemains -
Inappropriate?Hi Daniel,
I have a zoom button in my flex component that zooms in the image.
On clicking the zoom button to zoom the image loaded in the flex component, image get zoomed in but remain blurred and never get clear but doing the same with the mouse on the flex component or again hitting the zoom button clears the image.
On click of zoom button I am calling the following function:
public function zoomBy(value:Number):void {
nv = image.viewport;
nv.zoomBy(value);
}
Where nv is NormalizedViewPort and image is a MultiScaleImage.
Can you please provide some input on this issue?
Best Regards,
Arun Bhardwaj
I’m frustrated
-
Could you please post this into a separate topic and provide a link to a running sample as well as the full source code?
Thanks, Daniel
Loading Profile...




EMPLOYEE