Load/Unload WSI files in QuPath via scripting

Hi all,
I want to batch process some .vsi files in QuPath.

Is there a way to load single .vsi files per file path into a project and unload it after processing. Such as:

Load 1.vsi
Process (already defined for one image in the QuPath project)
Unload
Load 2.vsi
Process
Unload
...

Or is there a better way to do batch processing of a list of files?

Any hint is welcome.

Generally you create the project and add all of the images you want to process into the project. If you want to do something more dynamic, you may need to look into scripts you can run from the CLI, I have not done so much with that recently.

Having many images in a project is generally not a problem, is there some reason you are working around that?

I am guessing based on some of the previous posts, you might be wanting to load one folder worth of images, merge and export them, then load another folder, or something like that?

1 Like

Come to think of it, in case you are experienced with Python, there is also this:

1 Like

Thanks a lot @Research_Associate

I found a solution based on your hint.

1 Like