Skip to content

Improve Connectivity's relationship with Datasets and ImagePlus#418

Merged
mdoube merged 3 commits into
masterfrom
417-connectivity-dataset
Jun 22, 2026
Merged

Improve Connectivity's relationship with Datasets and ImagePlus#418
mdoube merged 3 commits into
masterfrom
417-connectivity-dataset

Conversation

@mdoube

@mdoube mdoube commented Jun 22, 2026

Copy link
Copy Markdown
Member

Connectivity relies on fast access to the primitive byte[] arrays backing an ImageStack. Wrapped Dataset images are slow to access.

Provide a fast path for clients that can provide native ImagePlus as a @Parameter and for those that have to provide a Dataset do a conversion to ImagePlus backed by in-memory primitive arrays.

mdoube added 2 commits June 19, 2026 18:09
Accessing pixels in Dataset - derived ImagePlus can be really slow if
the Dataset wasn't very ImagePlus like to begin with.

Connectivity exposes this due to its pixel array technique of getting
references to the stack slices' arrays.
Add back an ImagePlus input parameter so that clients that need to
can provide an ImagePlus rather than pointlessly wrapping and
unwrapping Datasets.

Native ImagePlus is necessary for Connectivity's performance.

It can convert a Dataset if provided with one but prefers ImagePlus
if provided with both.
@mdoube mdoube linked an issue Jun 22, 2026 that may be closed by this pull request
@mdoube mdoube merged commit f87a93b into master Jun 22, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

Connectivity is very slow when running from a Dataset

1 participant