Qupath 0.2.0 M10 Random musings

Figured I would start a general thread to post things I noticed, especially if not bugs. The first is some of the text not dealing well with Dark mode.
Show details. Also Filter channels by name in the Brightness and contrast dialog.
It would also be nice if the cursor wasn’t black in dark mode when typing (Script editor).

For the OME-TIFF export, it isn’t clear to me what “default” is if nothing else has been selected.

It might be too soon, but I think it would be nice to start including hyperlinks to the pertinent ReadTheDocs sections for as many functions as possible. I think people will use them more if it is easy. Similar to the Help menu actions, but built into the dialogs; one example of that here:

It would definitely be nice to have Object classifier class balancing for training prior to 0.2.0, less sure about the other features.
For now the detection classifier still exists, so that’s not an immediate issue.

I noticed Add intensity features is listed as deprecated, but I haven’t figured out what it has been replaced with.

More as I have time to dip back in. Really need to test the command line stuff.

It would be nice to have “select all” and “select none” options for the Export measurements dialog when controlling “columns to include.” It may be that the user wants to exclude only DAPI detection measurements, or something like that, which could require a loooot of clicking.

Would it make sense to default the resulting file location to the project folder instead of the C drive?

Right-click on the combo-box and the options are already there. I’m aware there can be display issues the context menu, but it should still work.

Not sure if @melvingelbard will have time to look at any of these musings, but I’m afraid I can only make the time for major bugs. It has been an intense few months to get it to this point, and it looks like I’ll remain swamped by more urgent tasks for the foreseeable future.

If you identify the code to fix any of the display issues you mention yourself, let us know and we can integrate the changes.

The naming of the OME-TIFF options was changed by me a few days ago as a quick way to get the compression options working consistently on the command line; this may be fixed later.

1 Like

Ah, I see! I hadn’t been clicking on the combo box itself. And yes, you guys have put in a lot of major changes! Looking good.

Unrelated, but the positive pixel count seems to be a lot faster these days, which takes a bit of the pressure off needing the Simple thresholder color deconvolution.

In the project directory, it would be nice if there was a text file with the name of the image (within each of the data folders called 1,2,3 etc). I know you can find a specific folder by right clicking in the Project tab, but it would be nice when doing stuff external to the project to be able to identify particular subfolders.

The OME-TIFF writer being able to write out DAB grayscale images would be amazing, though I’ve bugged you about that before :slight_smile:

This is probably pushing it, but is there any chance we could have a “+” option for the simple thresholder to add multiple thresholds. One of the nice functions of the Positive pixel detection was the ability to exclude whitespace using the tissue threshold. Alternatively, I suppose you can run the simple thresholder within annotations that already exclude whitespace, so not really a big deal.

StarDist inclusion looks great!

Create your own:

def sb = new StringBuilder()
getProject().getImageList().each {
    sb << it.getImageName() + '\t' + it.getID() << System.lineSeparator()
println sb

That should be possible in a couple of lines of a script, at least with the new ImageOps. But since they didn’t exist last week it will take some time to come to turns with what they enable :slight_smile:

Yeah, the second of those is the intended way.

1 Like

Is this something that is stable enough to dig into now, or should I wait for the stable release if the ImageOps are likely to change?

I’ll look into this. I was a little nervous about targeting the right folders, but if getID() returns the folder number and not the image number (if images were removed from the project), that should be pretty straightforward.

1 Like

Actually, ignore the ImageOps thing, that way is too slow/memory-hungry for a whole image. This should work:

import qupath.lib.images.servers.TransformedServerBuilder
import static qupath.lib.gui.scripting.QPEx.*

def path = buildFilePath(PROJECT_BASE_DIR, "stain2.ome.tif")

def imageData = getCurrentImageData()
def stains = imageData.getColorDeconvolutionStains()
def server = new TransformedServerBuilder(imageData.getServer())
    .deconvolveStains(stains, 2)

writeImage(server, path)
1 Like