Git Product home page Git Product logo

Comments (9)

tlambert03 avatar tlambert03 commented on August 24, 2024 1

merged a better fix in #92, and it will be in v0.4.2 which is building now

from nd2.

tlambert03 avatar tlambert03 commented on August 24, 2024

thanks for the issue and the data @jboulanger. I think you're running into the same thing as #88 ... which was just fixed in #90

I'm not sure why nd2 sometimes has internally inconsistent metadata (where the widthPx is sometimes not a clean multiple of widthBytes * bytesPerPixel)... but your dataset appears to be one of them.

On the main branch, with #90 merged, nd2.imread appears to work fine for your file:

Screen Shot 2022-09-09 at 10 38 51 AM

I'll cut a new release soon

from nd2.

jboulanger avatar jboulanger commented on August 24, 2024

thanks

from nd2.

tlambert03 avatar tlambert03 commented on August 24, 2024

releasing now... will take 30-60 mins to be available on pip.
Closing this "optimistically" ... but feel free to reopen if the new version doesn't fix your issue

from nd2.

jboulanger avatar jboulanger commented on August 24, 2024

Just tested again on the image, the original image (tif or loaded with bioformat) had a width of 4801 but the one opened with the new version has an extra column at the end (width=4802).

from nd2.

tlambert03 avatar tlambert03 commented on August 24, 2024

Yeah, I can add something to crop that I suppose. I think that at this point, it becomes a bit of a matter of choice with how to deal with the fact that the image metadata itself says that the data on disk is 4802 pixels. Let me try to learn a bit more from LIM (the company that created the nd2 format) about these relatively rare cases where the metadata is internally inconsistent, to see how they would "officially" have it be interpreted (rather than just mimicking bioformats choice, which may also just be one person's decision). thanks for letting me know!

from nd2.

jboulanger avatar jboulanger commented on August 24, 2024

If it helps deciding: the TIFF file was exported directly from NIS Elements where is the image is also 4801 x 4801.

from nd2.

tlambert03 avatar tlambert03 commented on August 24, 2024

Yeah thanks, and the nis viewer also opens it at 4801

from nd2.

jboulanger avatar jboulanger commented on August 24, 2024

Amazing!

from nd2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.