Pete Bankhead Profile picture
Dec 3 31 tweets 13 min read
QuPath v0.4.0 is now available!

Download it at qupath.github.io

#opensource #bioimageanalysis #digitalpathology #java #javafx QuPath homepage
There are so many new things that it'll take some days to describe even just the main ones.

For now, I'll start by mentioning a few of the user interface improvements.

QuPath v0.4.0 is more welcoming than previous versions... and a bit more stylish.
In fact, you can even style it in your own unique way if you really want to, thanks to #javafx & css (ideally in a nicer way than in my screenshots).

qupath.readthedocs.io/en/0.4/docs/re… ImageImage
Confusing things have been (I hope) reduced.

Lots of options & dialogs have been revised & updated to be more intuitive & user-friendly.
Measurement tables now include images, annotations can have descriptions, and it's possible to undock the tabs on the left so you can see more things at once.
If multidimensional images are your thing, you should find annotating across z-stacks & timepoints to be easier - thanks to new commands to copy annotations between slices.

As before, you can use arrow keys to navigate between slices.
Transferring annotations between images is also much easier, since objects support copy & paste.

In fact, this uses text (GeoJSON) so you can even copy between software.

If you need to fix the alignment, interactively adjust one annotation & apply the transform to all of them
(I've run out of gifs & time, so I'll add more tomorrow)
Time for some more things in v0.4.0...

The script editor is a bit prettier and lot more helpful.

For starters, there’s a ‘Run’ button, 'File > Recent scripts...' menu, logged messages are in color, and a timer shows how long a script has been running. Image
Press Ctrl/Cmd+Space to get completions for built-in (static) methods.

It’s not full autocomplete, but it helps with common things.
For less common things, or if you just want more info, the javadocs are now on hand.

These should describe every public method in QuPath that you might want to use in a script.

You can also find them at qupath.github.io/javadoc/docs/
There’s also basic syntax highlighting for more kinds of interesting files, not just Groovy scripts.

You can even work with JSON, YAML… even Markdown.
Bonus hack: I don’t *really* recommend it, but if you download Jython-standalone from jython.org/download you can drag it onto QuPath and start scripting with Jython instead of Groovy.

(Note this is limited to Python 2.x syntax & won’t give access to things like NumPy etc.) Image
But scripting improvements aren’t limited to the editor.

A couple more changes should make Groovy scripting *much* more powerful, although it might take a little bit of time to prove that…
One is that objects now have IDs.

This means that if you want to combine QuPath with R/Python/MATLAB/sth else (e.g. to do some fancy clustering), there’s a way to relate everything back to the original image - without needing to grapple with coordinates/centroids/other hacks.
The other is that objects have been upgraded to make accessing & updating measurements & classifications much more intuitive.

Combined with extra Groovy tricks, this can make powerful scripts much shorter & more readable – especially for complex/multiplex images.
There are more details of the changes & thinking behind them at github.com/qupath/qupath/…
But if you don’t like scripting, the good news is that some things that used to require scripting now don’t.

For example, the new ‘Signed distance to annotations 2D’ command calculates distances to annotation boundaries, both from inside & out. Signed distance transform i...
Or you can make anything a Tissue Microarray with ‘TMA > Specify TMA grid’.

It’s no longer necessary to rely exclusively on the dearraying algorithm, or hack-y script.
Beyond all that, there’s an experimental Apple silicon build for users of recent Macs.

There are a few caveats/limitations described at qupath.readthedocs.io/en/0.4/docs/in…

But if you’re ok with those, I’ve found things like cell detection run much faster than using the Intel build (~30%)
And lastly for today, there’s now support for DICOM whole slide images.

That one is all thanks to everyone involved in updating the @bioformats plugin - QuPath just uses the latest version & benefits from that

More to come tomorrow...
Got delayed, back now with more new things in v0.4.0...

QuPath has been used quite a lot by AI folks because it has some pretty nice annotation tools, as well as the ability to export in lots of customized ways.

But one big thing that was missing was the ability to run deep learning models from within QuPath.

It's been *technically* possible for quite a while (scripts make most things possible), but prohibitively awkward.

v0.4.0 brings QuPath a lot closer to supporting deep learning routinely, with the help of @deepjavalibrary

It's still early - the focus has been on the unglamorous make-it-possible stuff - but I think it can already be pretty useful.

For example, here's a pre-trained object detection model from DJL's PyTorch model zoo running through QuPath. Results are converted to QuPath-friendly annotations & classifications.

What used to be horribly complicated in QuPath, now just takes a few lines of code in a script Image
Here's another example using object detection and semantic segmentation models.

Running through QuPath means it's easy to restrict the segmentation to just part of the image, further refine the ROIs, adjust the input resolution, or export the results. ImageImage
And here's a style transfer model, with the output added as a QuPath overlay.

Of course you can use your own models as well - it just needs to be in a DJL-friendly form.

Full code & explanations are at qupath.readthedocs.io/en/0.4/docs/de…
But what if you want some more bioimage-related models - ideally ones you don't have to train yourself?

The Bioimage Model Zoo people have been working on that.

QuPath v0.4.0 has initial support for a subset of models from the model zoo at bioimage.io

It's still early & not everything works as well as it should, but it's already possible to convert a few segmentation models into QuPath pixel classifiers
Once a deep learning model gets wrapped up into a pixel classifier, it behaves like any pixel classifier in QuPath - supporting measurements, creating objects, applying classifications etc.

There is more info at qupath.readthedocs.io/en/0.4/docs/de…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Pete Bankhead

Pete Bankhead Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @petebankhead

Apr 20
If you want to learn about #bioimageanalysis I've written a free & open textbook that tries to help:
bioimagebook.github.io

Thanks to the wonder of @ExecutableBooks & other modern magic it's not quite like a normal book... (thread)

@OpenEdEdinburgh @NEUBIAS_COST @BioimagingNA
First, the book tries to cover the main concepts, independently of any software, in a practical way.

This includes common pitfalls & problems, like data clipping, that can doom analysis from the start (2/n)
It also includes tricky stuff important for a lot of microscopy image analysis, like noise distributions & the signal-to-noise ratio... (3/n)
Read 15 tweets
Feb 5, 2021
A small number of people know the real background story to @QuPath, but most don't.

I didn't plan to ever tell it publicly, until a Google Alert today caught my eye.

A thread about open science & academia 👇 (1/n)
The short version is that I single-handedly wrote the software as a postdoc but was blocked from releasing it open-source for years, while the environment in which I was working became increasingly toxic.

I handed in my notice as a last-ditch attempt to see it released. (2/n)
This worked - but meant I was out of academia, and my old group were free to take the credit.

Which they did.

It was strange to see people suddenly become huge fans of open science, speaking like they were my biggest supporters rather than the reason I left. (3/n)
Read 10 tweets
Aug 20, 2020
@QuPath #tweetorial 3!

This will build on the last one & take us into cell detection, measurement & classification... with some extra visualization tricks along the way.

There will be some new things from v0.2 too. 1/26

Let's jump in with a familiar example: calculating the % of cells positive for Ki67 (i.e. brown).

To do this:
* Annotate an area of interest
* Run 'Positive cell detection'

QuPath detects the cells & provides the result, often in a matter of seconds. 2/26
In practice, you might want/need to tweak the settings to get better results.

There's a whole YouTube tutorial about that youtube.com/playlist?list=… )

There's also a publication independently comparing QuPath & other software for Ki67 doi.org/10.1038/s41374… 3/26
Read 26 tweets
Aug 19, 2020
I say 'almost all', because I need to mention the command list early: with 'Ctrl + L' you get a searchable list of everything in the menus.

Having told you that, I can now ignore the menus & focus on shortcuts - safe in the knowledge you can find things if you need them. 2/20
(If you *really* like the command list, you can turn it into a command bar and give it a special place at the top of the viewer... but I probably wouldn't unless I broke my 'L' key.) 3/20
Read 21 tweets
Aug 18, 2020
Time for a quick introduction to @QuPath in tweetorial form.

First up: a little background on how QuPath differs from other great #opensource tools for #bioimageanalysis like @FijiSc & @CellProfiler - and how to get started viewing images. 1/12

qupath.github.io
QuPath's most obvious distinguishing feature is that it handles whole slide images. These are ultra-large 2D images, often up to 50 GB in size.

Whole slide images are everywhere in #digitalpathology & increasingly common in research. 2/12
A single whole slide image can be more than 200k x 100k pixels in size & contain a huge amount of information that matters to researchers & clinicians.

The trouble is trying to wring that information out of billions of pixels. 3/12
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(