Coder Social home page Coder Social logo

Comments (7)

ctrueden avatar ctrueden commented on July 21, 2024

See also imagej/ImageJ#60

from imagej-ops.

dietzc avatar dietzc commented on July 21, 2024

In general: The low-level operations really shouldn't work on Img/ImgPlus/... they should work on IterableInterval/RandomAccessibleInterval. The higher-level ops (e.g. Commands) should then be composed of several low-level ops and may base on Img/ImgPlus/Labeling.

from imagej-ops.

ctrueden avatar ctrueden commented on July 21, 2024

@dietzc: In some cases, yeah. But an Img is an IterableInterval as well as a RandomAccessibleInterval so of course you can pass an Img to any op with an input typed by those interfaces. This is good. The problem documented by this ticket is that ImageJ2's Dataset is actually not an Img or an ImgPlus nor even an IterableInterval. I mean, conceptually it isβ€”it just doesn't implement those interfaces. Rather, it has an ImgPlus which it wraps (i.e., composition rather than inheritance). But OPS relies on types using the inheritance pattern. For that reason (as well as lots of other reasons), it makes sense for Dataset to implement the relevant interfaces here so it can be passed to an op without a clunky dataset.getImgPlus() or dataset.getImgPlus().getImg() unwrapping step.

from imagej-ops.

dietzc avatar dietzc commented on July 21, 2024

@ctrueden: correct. this way it makes sense (let dataset implement XY). wouldn't make sense to have dedicated ops for dataset.

from imagej-ops.

dscho avatar dscho commented on July 21, 2024

Yes, thanks for clarifying @ctrueden! @dietzc I only wanted to document the problem rather than the solution so that we know what to test after fixing it.

from imagej-ops.

ctrueden avatar ctrueden commented on July 21, 2024

This issue will be largely addressed by imagej/imagej-common#46.

from imagej-ops.

ctrueden avatar ctrueden commented on July 21, 2024

Closing, since it will be taken care of by the data model update of imagej/imagej-common#46.

from imagej-ops.

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.