mbedward / jaitools

Raster image processing for Java developers
17 stars 15 forks source link

Problem using RandomIter with DiskMemImage 1.0-M1 #12

Closed mbedward closed 11 years ago

mbedward commented 11 years ago

Original author: michael.bedward@gmail.com (June 15, 2011 11:38:56)

Report by email from Daniele:

I have used the DiskMemImage several times and it is very useful but I have a problem. I use it with a RandomIter and usually it work well but now it report this problem:

09-Nov-2009 10:46:53 jaitools.tiledimage.DiskMemImage releaseWritableTile WARNING: Attempting to release a tile that was not checked-out 09-Nov-2009 10:46:53 jaitools.tiledimage.DiskMemImage releaseWritableTile WARNING: Attempting to release a tile that was not checked-out 09-Nov-2009 10:46:53 jaitools.tiledimage.DiskMemImage getWritableTile WARNING: Attempting to get tile 1,0 for writing while it is already checked-out

The code is: multitcaRandomIter = RandomIterFactory.createWritable(multitcaImage, null);

and then a loop:

                        ipos = i + dir[k][0];
                        jpos = j + dir[k][1];
                        double thisMultiTca = multiticaRandomIter
                                .getSampleDouble(jpos, ipos, 0);
                        double previusMultiTca= multitcaRandomIter.getSampleDouble(j, i, 0);
                        multitcaRandomIter.setSample(jpos, ipos, 0, thisMultiTca+
                                +previusMultiTca);

Original issue: http://code.google.com/p/jaitools/issues/detail?id=12

mbedward commented 11 years ago

From michael.bedward@gmail.com on June 15, 2011 11:38:57 Fix for this prolem committed to trunk (r1003). Changed the way that DiskMemImage tracks tile writers to be more in accord with JAI's TiledImage class. Now allows multiple simultaneous writers per tile.