Skip to content

Conversation

@Rylern
Copy link
Contributor

@Rylern Rylern commented Oct 31, 2025

Add an ImageServer that get pixel values from one or more RandomAccessible.

See the README for more information on how to use it.

@Rylern Rylern requested a review from petebankhead October 31, 2025 13:54
Copy link
Member

@petebankhead petebankhead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great and the performance is pretty good considering the potential overhead.

I tried it with the following script:

import qupath.ext.imglib2.imageserver.*
import qupath.ext.imglib2.ImgCreator
import net.imglib2.view.Views

var server = getCurrentServer()

var imgCreator = ImgCreator.builder(server).build()

var imgs = []
for (int i = 0; i < server.nResolutions(); i++) {
    imgs << imgCreator.createForLevel(i)
    // Alternative (slower, but shows a difference)
//    imgs << Views.rotate(imgCreator.createForLevel(i), 0, 1)
}


var server2 = new ImgLib2ImageServer([], server.getMetadata())

var path = buildPathInProject("example.ome.tif")
writeImage(server2, path)

I requested some smallish changes - the performance-related ones may not be worth it, since my timing experiments were inconclusive.

@Rylern
Copy link
Contributor Author

Rylern commented Nov 12, 2025

The comments were addressed.

@Rylern Rylern merged commit c907e95 into main Nov 12, 2025
1 check passed
@Rylern Rylern deleted the imglib2-image-server branch November 12, 2025 13:26
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.

3 participants