astromatic / Leaflet.TileLayer.IIP

Add IIP layering support to the Leaflet library
Other
14 stars 7 forks source link

Won't work without SMinSampleValue/SMaxSampleValue #1

Open acartas opened 9 years ago

acartas commented 9 years ago

I've been trying to get this to run with a file that does not have these values, no luck. I'm not sure what would be valid values to put in for the minMaxValues option either. Appreciate any information!

ageblade commented 9 years ago

What version of IIP are you using ?

acartas commented 9 years ago

Version 0.9.9. I tried this with my own .tif, as well as the IIP sample image (http://merovingio.c2rmf.cnrs.fr/iipimage/PalaisDuLouvre.tif). Both returned an invalid response.

I had to remove "&obj=min-max-sample-values" from the request url in order to get a valid response (and some other minor changes to make that work so that only options.minMaxValues is used)

I did sort of figure out the minMaxValues parameter. For my grayscale, 8-level image, I created my layer with minMaxValues=[[340,341]] or as [[0,1]], didn't make any difference as far as I could tell. I don't know what those values are for, so maybe it's something I didn't notice.

ruven commented 9 years ago

The minmax values are only available in the dev or 1.0 versions of iipsrv and for an 8bit image, they should normally be set to 0,255. Basically they allow you to extract a photometric slice of the input data, which is useful for floating point or high bit depth images.

ageblade commented 9 years ago

I recommend you to use my fork of this repo. I adjusted everything to support IIP 0.9.9 and fixed some issues.

acartas commented 9 years ago

@ageblade It's perfect! Would you submit pull request so it can be added to main repository? I almost tried to recreate the same fixes you made. Might need a version number if it's incompatible with leaflet1.0.

ebertin commented 9 years ago

Hi gents, just to let you know that I have commited an updated version of the code on the "multichannel" branch, which may fix some of your issues and has additional features. It is also fully compatible with Leaflet-1.0. Please have a look at it. I can merge it with the master if it is OK with you.

denics commented 8 years ago

Hi @ebertin , I started writing my leaflet plugin, when I found your job googling. Thanks a lot! I'm testing your version against leaflet 1.0 and so far so good. I will tell you more tomorrow when I'll test with a bigger corpus of images.

ebertin commented 8 years ago

Thanks @denics! Please note that the stand-alone version of Leaflet.TileLayer.IIP trails the one in VisiOmatic. I wish I can find the time to update the former.