I promised myself a while back that I wouldn't write any more #ImageJ Macro code. When I made this promise I forgot about all the scripts that we have in use. “Oh, this one just needs a few tweaks and then it can be used in another project." And here I am again in ijm hell!

#AdventuresInCode #LifeOfPI

@steveroyle All good reasons for rewriting in clojure or jython ... both let you use the code from other scripts, and offer a more sensible, general purpose programming style. With clojure you get native java speed as a bonus.
@albertcardona I should definitely do this for all the things we use a lot.
@steveroyle @albertcardona are there any resources you would recommend for learning Python, or more specifically, learning how you would go about converting existing ImageJ image analysis macros to Python? There seems to be a real shift towards Python in this area and I don’t want to get “left behind”!
@MAFesenko @albertcardona Albert’s website has a bunch of jython resources/examples. It’s a great place to start. https://albert.rierol.net/jython_imagej_examples.html
Albert Cardona - Jython for ImageJ by example

Albert Cardona's science, programming and graphics web page.

@steveroyle @MAFesenko It's all python 2.7 though. There is a version of ImageJ that runs on and from python but the bridge never felt easy. At least 2.7 is better than macros, even if modern python libraries aren't available: ends up being like scripting Fiji's Java libraries, and that suffices for a lot of image processing tasks.
https://syn.mrc-lmb.cam.ac.uk/acardona/fiji-tutorial/
Fiji Programming Tutorial

@albertcardona ah that was the page I was looking for… @MAFesenko
@albertcardona @steveroyle Yess, this is exactly what I was looking for! 👌🙏
@steveroyle @albertcardona This looks great, thank you! 🙏👩‍💻
@MAFesenko @albertcardona Laura might run her Napari class again soon. Would be worth attending if you can.

@steveroyle @MAFesenko

See also:

scikit-learn tutorials:
https://scikit-learn.org/stable/index.html

scikit-image tutorials:
https://scikit-image.org/

PyTorch tutorials:
https://pytorch.org/tutorials/

And to complete this I'd suggest reading about how neural networks and deep learning work with Michael Nielsen's tutorial:
http://neuralnetworksanddeeplearning.com

scikit-learn: machine learning in Python — scikit-learn 1.8.0 documentation

@albertcardona @steveroyle Thanks a lot, all the resources you sent look really useful!
@steveroyle I'm surprised at the strength of my reaction to this comment, as while i recognise the flaws in IJM, I am very fond of it.
@dn_mason Sorry for the triggering comment! In many ways I am fond of it too. I pride myself on figuring out the convoluted ways to do things that would be trivial in other languages. It’s got plenty of plus points, not least that it is great for beginners i.e. most wet-lab people, to automate simple stuff.
@steveroyle @dn_mason the hours/days I spent figuring out how to get Fiji to store some values in a temporary Results table and then substract them from values logged in a final Results table in one of the first macros I wrote will stay in my memory for a while! Steve and @simonecoppola will probably remember that too 😅 It was self-inflicted, I just didn’t know this would be much easier to do in R at the time 🤦‍♀️🤡 The macro recorder feature is *too good* though👌
@MAFesenko @steveroyle @dn_mason @simonecoppola Fiji's macro recorder has been able to record in other languages for some years now :)