-
Notifications
You must be signed in to change notification settings - Fork 1
Imglib2 image server #13
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
Conversation
petebankhead
left a comment
There was a problem hiding this 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.
src/main/java/qupath/ext/imglib2/imageserver/ImgLib2ServerBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/qupath/ext/imglib2/imageserver/ImgLib2ImageServer.java
Outdated
Show resolved
Hide resolved
src/main/java/qupath/ext/imglib2/imageserver/ImgLib2ImageServer.java
Outdated
Show resolved
Hide resolved
src/main/java/qupath/ext/imglib2/imageserver/ImgLib2ImageServer.java
Outdated
Show resolved
Hide resolved
src/main/java/qupath/ext/imglib2/imageserver/ImgLib2ImageServer.java
Outdated
Show resolved
Hide resolved
src/main/java/qupath/ext/imglib2/imageserver/ImgLib2ImageServer.java
Outdated
Show resolved
Hide resolved
src/main/java/qupath/ext/imglib2/imageserver/ImgLib2ImageServer.java
Outdated
Show resolved
Hide resolved
|
The comments were addressed. |
Add an
ImageServerthat get pixel values from one or moreRandomAccessible.See the
READMEfor more information on how to use it.