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

Simplify static creation methods #350

Open
minnerbe opened this issue Oct 17, 2023 · 0 comments
Open

Simplify static creation methods #350

minnerbe opened this issue Oct 17, 2023 · 0 comments

Comments

@minnerbe
Copy link
Contributor

minnerbe commented Oct 17, 2023

These are some notes from discussing #349 with @tpietzsch regarding simplifying the existing image-creation API:

  • Move static creation methods to their respective interfaces as static methods, as done, e.g., in java.util.List.of() (introduced in Java 9).
  • Deprecate and ultimately delete static utility classes with a trailing 's' (ArrayImgs, Intervals, ...).
  • Consider renaming some of the methods (e.g., ArrayImg.of(double[], long...) instead of ArrayImg.doubles(double[], long...)).
  • Consider placing some of the static creation methods in the highest level interfaces (e.g., Img instead of ArrayImg) to spare first-time users some implementation details (see also Add convenience methods for creating images from arrays #349).

Let me know if I can help with anything in this regard.

@minnerbe minnerbe changed the title Consolidate static creation methods Simplify static creation methods Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant