Modify to use the rendered view as opposed to the original image
adyprat opened this issue · 1 comments
Hi,
Thank you so much for this extension!
I'm looking for some pointers to figure out how to change the bufferedImage in line 149 below, so this is compatible with multi-channel images that aren't RGB to begin with or single channel tif (like ome.tif, etc):
Is there a way to use the RenderedImageServer in QuPath directly? I tried:
bufferedImage = qupath.getViewer().getImageDisplay().getImageData().getServer().readRegion(downsample, x1, y1, x2 - x1, y2 - y1);
but that did not seem to work.
Best,
Ady
Hi @adyprat , thank you for your question.
It can be done as shown here. It's already implemented in v0.2.0.
qupath-extension-sam/src/main/java/org/elephant/sam/SAMExtension.java
Lines 151 to 155 in 221fafc
Please try the latest version and if it works, please close this issue, thanks!