Beginner in CLIJ-- implementation for an existing macro

I have written a bunch of macros at this point for image analysis and know a few languages but I am by no means a programmer.
I have this macro I wrote that batch processes a bunch of images and utilizes StarDist to phenotype cells within an image based on an intensity threshold in individual ROIs. I have been recommended to adapt this macro to a CLIJ based process to try to make it faster, and not require babysitting, as right now we have to hit “Ok” every time the StarDist window appears. From what I’m reading on the CLIJ page I’m guessing I would have to adapt the macro into a Java plugin? I don’t know if it makes a difference but my images need to be imported through BioFormats.
Major questions:

  • Is this the platform I should even be using?

  • How? Java? Python? (It’s been a hot minute since I’ve used either language)

  • Can StarDist be used as a CLIJ plugin?

Hi @K_N_V_B,

Yes, absolutely! Side note: I’m the main author of #clij. :wink:

If you are confident with ImageJ Macro, I would stay with Macro. #clij actually aims ImageJ Macro users. You can also use Java and Jyhon.You find examples in various languages on github.

No. But StarDist runs on the GPU as well if you configure it correctly. #clij can be used to replace filters/methods such as Gaussian Blur, Projections and Thresholding. CLIJ2 is also upcoming bringing even more operations.

Have a look at the CLIJ website to learn more about what you can do with it. Install it and try running some operations while having the macro recorder open. You will see it feels like macro programming, just the syntax looks a bit different. And it’s faster :wink:

Let me know if you need support in using #clij. I’m happy to help you getting started.

Cheers,
Robert

1 Like

Thank you for such a quick response!

Most of my initial processing is reformatting an 8 channel image opened through BioFormats to a 7 channel color image, segmenting cell nuclei using StarDist, then using the generated ROIs and some equations and intensity measurements to determine cell phenotypes. So I’ll probably use CLIJ2 with the ROI and table capabilities! :slight_smile:
Thank you much,
K

1 Like

Hi @K_N_V_B,

I’m one of the StarDist authors and just replied to another user regarding StarDist automation.

Best,
Uwe

Hi @K_N_V_B ,

we just released a new version of StarDist for ImageJ, which is macro-recordable and that can also be called from a macro. The syntax is a bit weird though, so it’s best to record with the parameters that you need, and then go from there.

Hope that works for you.

Best,
Uwe

2 Likes