iipmooviewer nonexistant tiles requested

Help
2011-05-03
2013-10-14
  • grimfromghent

    grimfromghent - 2011-05-03

    For some reason the iipmooviewer requests wrong tiles, as shown by the
    logfiles of the iipserver (tile -1, tile -2, etc).
    This does not happen always, only at a certain scale.

    For example, if the minimum resolution is bigger than the containing window,
    everything works fine. I use the viewer within an iframe, so everything is
    fine there.

    But as soon as I show the zoomer is inside a window that is bigger than the
    minimum resolution of the image, it starts requesting nonexistant tiles. And
    if I resize the window to become smaller, everything is fine agsource
    forgeain.

    Does this have something to do with the rounding error you spoke about in this
    thread:
    http://sourceforge.net/projects/iipimage/forums/forum/299494/topic/3567259?me
    ssage=8106905

    thanks in advance

    P.S. I added part of the logfile below

    CVT maximum viewport size set to 3000
    Full Request is FIF=/data/datadir/2011/2/24/0/23/15/346-C-00001_2004_0001_AC.t
    if&cnt=1&sds=0,90&jtl=2,-5
    : Command / Argument is FIF :
    /data/datadir/2011/2/24/0/23/15/346-C-00001_2004_0001_AC.tif
    FIF handler reached
    FIF :: URL decoding/filtering:
    /data/datadir/2011/2/24/0/23/15/346-C-00001_2004_0001_AC.tif =>
    /data/datadir/2011/2/24/0/23/15/346-C-00001_2004_0001_AC.tif
    FIF :: Image cache hit. Number of elements: 1
    FIF :: TIFF image requested
    FIF :: Created image
    FIF :: Image dimensions are 919 x 638
    FIF :: Image timestamp: Thu, 24 Mar 2011 11:49:53 GMT
    FIF :: Total command time 242 microseconds
    : Command / Argument is cnt : 1
    CNT handler reached
    CNT :: requested contrast adjustment is 1
    : Command / Argument is sds : 0,90
    SDS handler reached
    SDS :: set to 0, 90
    : Command / Argument is jtl : 2,-5
    JTL handler reached
    TileManager :: Cache Miss for resolution: 2, tile: -5
    TileManager :: Cache Size: 0 tiles, 0 MB
    Asked for non-existant tile: 4294967291

    Total Request Time: 428 microseconds
    image closed and deleted
    Server count is 343

    CVT maximum viewport size set to 3000
    Full Request is FIF=/data/datadir/2011/2/24/0/23/15/346-C-00001_2004_0001_AC.t
    if&cnt=1&sds=0,90&jtl=2,-3
    : Command / Argument is FIF :
    /data/datadir/2011/2/24/0/23/15/346-C-00001_2004_0001_AC.tif
    FIF handler reached
    FIF :: URL decoding/filtering:
    /data/datadir/2011/2/24/0/23/15/346-C-00001_2004_0001_AC.tif =>
    /data/datadir/2011/2/24/0/23/15/346-C-00001_2004_0001_AC.tif
    FIF :: Image cache hit. Number of elements: 1
    FIF :: TIFF image requested
    FIF :: Created image
    FIF :: Image dimensions are 919 x 638
    FIF :: Image timestamp: Thu, 24 Mar 2011 11:49:53 GMT
    FIF :: Total command time 254 microseconds
    : Command / Argument is cnt : 1
    CNT handler reached
    CNT :: requested contrast adjustment is 1
    : Command / Argument is sds : 0,90
    SDS handler reached
    SDS :: set to 0, 90
    : Command / Argument is jtl : 2,-3
    JTL handler reached
    TileManager :: Cache Miss for resolution: 2, tile: -3
    TileManager :: Cache Size: 0 tiles, 0 MB
    Asked for non-existant tile: 4294967293

     
  • grimfromghent

    grimfromghent - 2011-05-04

    I tried some tests in Firebug by writing to the console:
    (taken from the function "loadGrid")

    rgn_x: -176
    rgn_y: -0.5
    rgn_w: 1271
    rgn_h: -0.5
    startx: -1
    starty: -1
    endx: 2
    endy: 2
    xtiles: 4
    ytiles: 3

    and then one tile from the loop:
    ntiles:-1
    x: -1
    y: -1

    So I suspect something happens in the calculation of the region, not of the
    tiles. Or am I missing something?

    In case it you might need more information, here is the tiffinfo of the file
    in question:

    TIFF Directory at offset 0x1ccfde (1888222)
    Image Width: 919 Image Length: 638
    Tile Width: 256 Tile Length: 256
    Resolution: 300, 300 pixels/inch
    Bits/Sample: 8
    Compression Scheme: AdobeDeflate
    Photometric Interpretation: RGB color
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 3
    Planar Configuration: single image plane
    ICC Profile: <present>, 560 bytes
    TIFF Directory at offset 0x2758e0 (2578656)
    Image Width: 459 Image Length: 319
    Tile Width: 256 Tile Length: 256
    Resolution: 300, 300 pixels/inch
    Bits/Sample: 8
    Compression Scheme: AdobeDeflate
    Photometric Interpretation: RGB color
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 3
    Planar Configuration: single image plane
    ICC Profile: <present>, 560 bytes
    TIFF Directory at offset 0x28cf76 (2674550)
    Image Width: 229 Image Length: 159
    Tile Width: 256 Tile Length: 256
    Resolution: 300, 300 pixels/inch
    Bits/Sample: 8
    Compression Scheme: AdobeDeflate
    Photometric Interpretation: RGB color
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 3
    Planar Configuration: single image plane
    ICC Profile: <present>, 560 bytes

     
  • grimfromghent

    grimfromghent - 2011-05-04

    OK, I tried something that worked.
    I discovered that it did not have anything to do with the calculation of the
    region, for the negative values are indeed taken into account in the function
    loadGrid (left en top every tile is calculated that way!)

    My changes in function "loadGrid":
    After..

    $('target').setStyles({
            left: 0,
            top: 0
        });
    

    add..

    this.rgn_x = (this.rgn_x > 0)? this.rgn_x:0;
    this.rgn_y = (this.rgn_y > 0)? this.rgn_y:0
    

    ;
    (or somewhere in the beginning of "loadGrid")

    That solves the problem of invalid tiles. But some tiles will simple not load.
    In my case there was one black hole (missing tile), but the other tiles where
    fine.

    Second change from:

    var map = new Array((endx-startx)*(endx-startx));
    

    To:

    var map = new Array((endx-startx)*(endy-starty));
    

    Check the difference ;-)

    And the black hole disappears ;-)

    I'm not sure if that solves everything. Is there a case I'm missing?

    BTW. great work, IIP! It's small, fast and works without crashing!

     
  • Ruven

    Ruven - 2011-05-09

    This problem is fixed in the forth-coming iipmooviewer version 2. You can play
    around with the latest development code here: http://merovingio.c2rmf.cnrs.fr
    /iipimage/iipmooviewer-2.0/

     
  • grimfromghent

    grimfromghent - 2011-06-01

    Thanks for the reply!

    Are there some dependencies I have to take in account in order to make the
    latest version work? I download those three javascript-files, and changed the
    links in <javascript> to point to them:
    - javascript/mootools-core-1.3.2-full-nocompat-yc.js
    - javascript/mootools-more-1.3.2.1.js
    - javascript/iipmooviewer-2.0.js

    the nonexistant tiles are no longer there, but now the order in which they're
    placed is totally wrong. Tiles that
    should be at the top, are placed all the way down and otherwise. The image in
    its whole is not centered, but at the left,
    and the logo appears in the left bottom, just beneath the image. The
    resolution is correct.

    strange, the example seemed to work fine!

    thanks in advance

     
  • Ruven

    Ruven - 2011-06-01

    Are there some dependencies I have to take in account in order to make the
    latest version work? I download those three javascript-files, and changed the
    links in <javascript> to point to them:
    - javascript/mootools-core-1.3.2-full-nocompat-yc.js
    - javascript/mootools-more-1.3.2.1.js
    - javascript/iipmooviewer-2.0.js

    It should work with these files. Do you have an example online I can take a
    look at?

     
  • grimfromghent

    grimfromghent - 2011-06-03

    ok, it's alright, I forgot to change the css-file too

    thanks for the quick follow up!

     
  • grimfromghent

    grimfromghent - 2011-06-06

    OK, I think I found the reason for this problem to reoccur (even in the latest
    version).

    Check this tiffinfo:
    TIFF Directory at offset 0x3cc556 (3982678)
    Image Width: 1254 Image Length: 1032
    Tile Width: 256 Tile Length: 256
    Resolution: 300, 300 pixels/inch
    Bits/Sample: 8
    Compression Scheme: AdobeDeflate
    Photometric Interpretation: RGB color
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 3
    Planar Configuration: single image plane
    ICC Profile: <present>, 560 bytes
    TIFF Directory at offset 0x54532e (5526318)
    Image Width: 627 Image Length: 516
    Tile Width: 256 Tile Length: 256
    Resolution: 300, 300 pixels/inch
    Bits/Sample: 8
    Compression Scheme: AdobeDeflate
    Photometric Interpretation: RGB color
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 3
    Planar Configuration: single image plane
    ICC Profile: <present>, 560 bytes
    TIFF Directory at offset 0x5e71ce (6189518)
    Image Width: 313 Image Length: 258
    Tile Width: 256 Tile Length: 256

    Resolution: 300, 300 pixels/inch
    Bits/Sample: 8
    Compression Scheme: AdobeDeflate
    Photometric Interpretation: RGB color
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 3
    Planar Configuration: single image plane
    ICC Profile: <present>, 560 bytes
    TIFF Directory at offset 0x5f415a (6242650)
    Image Width: 156 Image Length: 129
    Tile Width: 256 Tile Length: 256
    Resolution: 300, 300 pixels/inch
    Bits/Sample: 8
    Compression Scheme: AdobeDeflate
    Photometric Interpretation: RGB color
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 3
    Planar Configuration: single image plane
    ICC Profile: <present>, 560 bytes

    Logically, one would say: at resolution 1, you can fetch 4 tiles (256x256)
    ceil(313/256) = 2
    ceil(258/256) = 2
    BUT, when trying to fetch tiles from the second row, it fails.
    It seems like that 2 pixels of height for a tile is too low to create.
    This time the log file doesn't even mention the nonexistant tiles ;-)

    see: http://ec2-50-17-222-182.compute-1.amazonaws.com/test/

    P.S. Go directly to resolution 1 to check (other resolutions work fine at
    chance). Check the
    two orphaned images below (depends on the browser how non-images are shown).

     
  • grimfromghent

    grimfromghent - 2011-06-06

    mm ok, the logfile mention that these tiles are edge tiles...
    Does this have something to do with the fact that edge tiles are cropped ?(ht
    tp://iipimage.sourceforge.net/docs/iipsrv/classTileManager.html)

     
  • grimfromghent

    grimfromghent - 2011-06-06

    in case you would like to know: it works in conjunction with memcached. In my
    experience,
    memcached often gives corrupted data (the image data is binary, has no
    starting FIF),
    especially when regular read and writes happen after each other on the same
    key.

     
  • grimfromghent

    grimfromghent - 2011-06-07

    Verbosity level set to 6
    Running in FCGI mode

    Setting maximum image cache size to 10MB
    Setting filesystem prefix to ''
    Setting default JPEG quality to 100
    Setting maximum CVT size to 300
    Setting 3D file sequence name pattern to 'pyr'
    Setting up JPEG2000 support via Kakadu SDK
    Loaded watermark image '/home/ec2-user/PeepShow/watermark/logo-out.tiff':
    setting probability to 1 and opacity to 0.1
    Memcached support enabled. Connected to servers: 'localhost:11211' with
    timeout 86400

    Initialisation Complete.
    <----------------------------------->

    CVT maximum viewport size set to 300
    Full Request is FIF=/data/datadir/2011/2/22/9/56/3/246-B-00025_2004_0001_AC.ti
    f&CNT=1&SDS=0,90&JTL=1,3
    : Command / Argument is FIF :
    /data/datadir/2011/2/22/9/56/3/246-B-00025_2004_0001_AC.tif
    FIF handler reached
    FIF :: URL decoding/filtering:
    /data/datadir/2011/2/22/9/56/3/246-B-00025_2004_0001_AC.tif =>
    /data/datadir/2011/2/22/9/56/3/246-B-00025_2004_0001_AC.tif
    FIF :: Image cache initialisation
    FIF :: TIFF image requested
    FIF :: Created image
    FIF :: Image dimensions are 1254 x 1032
    FIF :: Image timestamp: Tue, 22 Mar 2011 22:16:08 GMT
    FIF :: Total command time 392 microseconds
    : Command / Argument is CNT : 1
    CNT handler reached
    CNT :: requested contrast adjustment is 1
    : Command / Argument is SDS : 0,90
    SDS handler reached
    SDS :: set to 0, 90
    : Command / Argument is JTL : 1,3
    JTL handler reached
    TileManager :: Cache Miss for resolution: 1, tile: 3
    TileManager :: Cache Size: 0 tiles, 0 MB
    TileManager :: Watermark applied: 61 microseconds
    TileManager :: Edge tile: Base size: 256x256: This tile: 57x2
    TileManager :: JPEG Compression Time: 138 microseconds
    TileManager :: Tile cache insertion time: 22 microseconds
    TileManager :: Total Tile Access Time: 2562 microseconds
    JTL :: Tile size: 57 x 2
    JTL :: Channels per sample: 3
    JTL :: Bits per channel: 8
    JTL :: Compressed tile size is 262
    JTL :: Total command time 2770 microseconds
    Memcached :: stored 409 bytes in 1335 microseconds
    Total Request Time: 6142 microseconds
    image closed and deleted
    Server count is 1

     
  • Ruven

    Ruven - 2011-06-07

    OK, looks like some corruption to the tile, probably because it is very small.
    Do you think you could send me your tif image to test?

     
  • grimfromghent

    grimfromghent - 2011-06-07

    Of course. Is your email capable of receiving 5MB? If so, where can I send it
    to?

     
  • wlowies

    wlowies - 2013-08-12

    Any luck on this? I experienced the same problem.

    Tile size: 14 x 18
    243 bytes

     
  • grimfromghent

    grimfromghent - 2013-08-13

    Could you post which code or version you're using. I'm using an older version right now for a while, which I fixed here and then. But probably newer versions already changed a lot, so these things no longer apply.

     
  • Ruven

    Ruven - 2013-08-14

    Could you please send me this image to test.

     
  • wlowies

    wlowies - 2013-08-15

    Here's the image in JPEG2000 format

     
    Attachments
  • wlowies

    wlowies - 2013-08-15

    Also in tiled-tiff format. Result is the same, also missing a tile.

     
    Attachments
  • Ruven

    Ruven - 2013-08-23

    This is effectively a small edge tile. But this now works correctly in the latest development version of iipsrv. Try to upgrade - the current version should be stable enough for you.

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks