Skip to content

Simplify static creation methods #350

@minnerbe

Description

@minnerbe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions