paquo icon indicating copy to clipboard operation
paquo copied to clipboard

Getting Current Qupath Program

Open HistoCleanQUB opened this issue 3 years ago • 4 comments

Hi,

Really excellent work with this, just a quick question. Is there an easy way to get the file path of the QuPath Program directory that is being used in the paquo environment??

Hope this makes sense, Many thanks

HistoCleanQUB avatar May 26 '22 14:05 HistoCleanQUB

Hi @HistoCleanQUB,

This is currently not provided by a public interface. We could make this information easily available. Can I ask what's your specific use case?

As of now, you can get that information by doing:

>>> from paquo.jpype_backend import find_qupath
>>> from paquo._config import to_kwargs, settings
>>> find_qupath(**to_kwargs(settings))
(PosixPath('/Applications/QuPath.app/Contents/app'),
 PosixPath('/Applications/QuPath.app/Contents/runtime/Contents/Home'), 
 PosixPath('/Applications/QuPath.app/Contents/runtime/Contents/Home/lib/libjli.dylib'),
 ['-XX:MaxRAMPercentage=50', '-Djava.library.path=/Applications/QuPath.app/Contents/app'])

You would usually configure your .paquo.toml to determine which QuPath you want to use.

Cheers, Andreas

ap-- avatar May 26 '22 16:05 ap--

A simple way to determine which version you a running is to execute:

paquo --qupath-version

in your commandline. (This of course doesn't let you differentiate in case you have the same version installed multiple times.

ap-- avatar May 30 '22 07:05 ap--

That's fantastic thank you! I'm using paquo to run some deep learning models in pytoch then feed annotations back to QuPath. Just wondering if Ihad multiple versions of QuPath in the one search directory from the .toml file would there be a way to change to a specific version.

Many thanks

HistoCleanQUB avatar May 30 '22 12:05 HistoCleanQUB

Glad I could help ❤️

In case you want to configure a specific version, you can set:

qupath_dir = "/path/to/your/Qupath"

in your .paquo.toml file. If qupath_dir is set, the search will be skipped.

Cheers, Andreas 😃

ap-- avatar Jun 02 '22 00:06 ap--