Imagej vs igor vs python

I’m at a crossroad now and I would like to ask for advice people with larger experience in programming and image analysis. I want to do 2 things: (1) Write a program (script/plugin) for image analysis and (2) learn programming in that process.

I started learning python and so far I’m feeling overwhelmed. I don’t understand anything from what I’ve read or watched. Coding in python is incredibly unintuitive to me. Also the vast number of distributions to choose from doesn’t help… Granted I don’t have any programming background, but I did write a lot in Igor during my phd (it’s a program mainly for graphics charts that has programmable environments c/c++). I learnt that rather quickly, understood the structure of the code and could write with ease. With python it’s a nightmare. I just don’ get it. Lack of graphical interface for images makes it a pain to operate on images. In comparison imagej and igor has a robust interface that makes it easier fot both programmer and user. In python I need to write everything by hand, even simple stuff like drawing a straight line on the image to show the intensity plot. In both imagej and igor that is either built in or relatively easy to do.

I would like to write a code for image analysis in python, since it’s the defacto programming language now and it might come in handy in the future, but it’s the second or third time I’ve tried it and absolutely hate it.

Other option is to work in imagej. Imagej is free, versatile and ubiquitous in image analysis circles. It’ designed for image analysis. The graphical interface, already built in image analysis tools and the ability to operate on manually selected ROI is incredibly user friendly. But the problem is I don’t know which language I should focus on. Imagej supports numerous language and that in itself is a bit confusing. Which one is the default languare for imagej? From what I can tell for newcomers ij1 macro is recommended, but limited.

If all fails I think I will return to igor since I know that program, but I’m afraid it won’t give me any tool that I could use in other projects and/or jobs. Drawback is that Igor is kind of a niche software, but has a lot of tools for image analysis.

Should I power through python? Learn java (or other language) to write for imagej? Go back to igor? If I write something and learn one language ideally I would like to be able to use that language in the future.

I should finish my work by the end of 2022, so I have 1,5 year to learn and code. Code itself won’t be complex or large I just want to streamline a couple of thing for analysis.

thank you in advance for help and advice.

1 Like

it’s an interesting topic, I think a good option is:

  1. learn Jython scripting for Fiji/imagej
  2. start to analyse data with python things (pandas, numpy, matplotlib, seaborn, sklearn, etc etc)
    (using jython gives you a first look into python scripting)
  3. if you will enjoy a lot programming maybe jump into Java (using jython gives you a first look into object-oriented programming and APIs)
1 Like

It really depends on your domain and your priorities, but here are my few cents!

The ImageJ/FIJI environment has a wide array of tools making it a good choice for image analysis problems. The macro language is good for beginners and you can achieve a fair bit in this. You could solve most of your problems using the macro language and maybe that is enough for you. It’s when you want access to the API that you need to start looking at scripting languages. I’m a beginner at using Groovy, but it seems to strike a nice balance for me.

I’ve used Igor and done some coding in it, it wasn’t intuitive for me and took me a while. I’ve forgotten it already!! But, it is an extremely powerful piece of software and if many people in your domain use it, it’s worth sticking to it. In my case, I was the only one using it, and teaching others to use Igor was not easy.

It’s probably coz you are used to using Igor and its syntax, but Python is supposed to be an intuitive language, hence its popularity + the extensive set of libraries/packages helps. It’s versatile and there is a very popular image viewer in Python, napari:

Its made image visualisation and analysis significantly easier. The massive scientific ecosystem in Python means you can do a lot of post-processing of the extracted data in Python as well. Learning Python will help with your employability prospects as well in a wide range of domains.

  • How have you approached learning Python? If you are having trouble, definitely go to a software carpentry workshop or any instructor-led workshop. It helps if there are people to ask and talk to rather than only using online tutorials.

  • Do you have a specific image analysis problem yet?

  • What sort of domain or field are you in?

I feel like you are used to having a GUI and moving to a ‘command line’ or text-only approach is the barrier. Using Jupyter notebooks for Python helped me a lot with this. It’s great for beginners and experts alike.

I use a combination of FIJI macro and Python mostly. In FIJI, image visualization, exploring the image and understanding my dataset, trying different image processing plugins and tools are very easy; its just point and click. I can record the steps using the macro recorder and use it for writing macros and in some cases, groovy scripts… After extracting the data, I do the number crunching and visualization using Python, Excel or another software called, Orange. You’ll like it as it has a nice GUI. Another option is KNIME, which is like Orange but on lots of steroids… :rofl:

Hope it helps

Cheers
Pradeep

6 Likes

Forget Igor. It’s weird and niche and one of those languages that messes you up once you are used to it. It indeed is an observation I have had that people who learned Igor have a hard time learning anything else.

I agree with the above: see if the ImageJ macros work for you. If you need more, focus on Python. You find it unintuitive because you just started. Work hard at it and give it a chance and it will make much more sense. If you continue to hate it and are in a uni with a MATLAB site licence then you could try that. In a lot of ways it’s easier to learn than Python. The main downside is that it moves more slowly as a language and lacks some of the nice fast plotting routines Python has. A few things, like machine learning, is more up to date in Python. MATLAB code you release is technically still open source, even though users need MATLAB to run it.

Whatever you do, try to stick to one thing for a while. At least for a year. Don’t go jumping from language to language early on.

2 Likes