Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageConverter: fix dimensions of the last tile #711

Merged
merged 2 commits into from Oct 2, 2013

Conversation

melissalinkert
Copy link
Member

Suggested by Kristian Kjaergaard on the ome-users mailing list:

http://lists.openmicroscopy.org.uk/pipermail/ome-users/2013-September/003940.html

If the width (or height) of the image is evenly divisible by the tile width (or height), the previous behavior was to set the width (or height) of the last tile to be converted to 0.

Suggested by Kristian Kjaergaard on the ome-users mailing list:

http://lists.openmicroscopy.org.uk/pipermail/ome-users/2013-September/003940.html

If the width (or height) of the image is evenly divisible by the tile
width (or height), the previous behavior was to set the width (or
height) of the last tile to be converted to 0.
@joshmoore
Copy link
Member

@melissalinkert : is this something a unit test could be added for?

@melissalinkert
Copy link
Member Author

Definitely worth adding a unit test during the course of http://trac.openmicroscopy.org.uk/ome/ticket/10517

@joshmoore
Copy link
Member

Comment added to 10517

@qidane
Copy link
Contributor

qidane commented Sep 27, 2013

Still not tested, I am still getting this error:

[andrew@voile tools ((f93cb07...))]$ ./bfconvert ~/Desktop/4097.psd ~/Desktop/4097.ome.tiff
/Users/andrew/Desktop/4097.psd
[Adobe Photoshop] -> /Users/andrew/Desktop/4097.ome.tiff [OME-TIFF]
Exception in thread "main" loci.formats.FormatException: Image plane too large. Only 2GB of data can be extracted at one time. You can workaround the problem by opening the plane in tiles; for further details, see: http://www.openmicroscopy.org/site/support/faq/bio-formats/i-see-an-outofmemory-or-negativearraysize-error-message-when-attempting-to-open-an-svs-or-jpeg-2000-file.-what-does-this-mean
at loci.formats.FormatReader.openBytes(FormatReader.java:774)
at loci.formats.ImageReader.openBytes(ImageReader.java:400)
at loci.formats.tools.ImageConverter.convertTilePlane(ImageConverter.java:575)
at loci.formats.tools.ImageConverter.convertPlane(ImageConverter.java:535)
at loci.formats.tools.ImageConverter.testConvert(ImageConverter.java:481)
at loci.formats.tools.ImageConverter.main(ImageConverter.java:667)
Caused by: java.lang.IllegalArgumentException: Invalid array size: 0 x 85 x 3 x 1
at loci.common.DataTools.safeMultiply32(DataTools.java:883)
at loci.common.DataTools.allocate(DataTools.java:862)
at loci.formats.FormatReader.openBytes(FormatReader.java:771)
... 5 more

@qidane
Copy link
Contributor

qidane commented Sep 27, 2013

OK, I am stupid! When I downloaded the new jar I saved it in the same folder as an old one, and the new one was auto-renamed. I then was testing with the old one again. It works with the right new jar.

@melissalinkert
Copy link
Member Author

Merging Wednesday unless any further objections then. It would be best to have this in 4.4.9, especially since it was mentioned on the mailing list: http://lists.openmicroscopy.org.uk/pipermail/ome-users/2013-September/003954.html

melissalinkert added a commit that referenced this pull request Oct 2, 2013
ImageConverter: fix dimensions of the last tile
@melissalinkert melissalinkert merged commit 6006435 into ome:dev_4_4 Oct 2, 2013
@melissalinkert
Copy link
Member Author

--rebased-to #722

@melissalinkert melissalinkert deleted the from-kristian-kjaergaard branch November 6, 2013 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants