ImageJ2 Python Scripts

I have just started a Wiki page about that :

For now there is only one script but I plan to add more.

Feel free to contribute !


It is a great idea. But how are you going to keep track of changes? Shouldn’t it use GitHub or at least Gist? Would it make sense to have it part of BAR?

I noticed you had a TODO: Use script parameters to choose the projection method.
I think it can be done with a “Java like switch statement” over a list of @String input choice. The full gist is here:

1 Like

Hum you’re right having this versioned would be nice but my first idea was to have an easily accessible set of Python scripts. And the Wiki seems to be the perfect place for it.

What do you propose ?

I agree, and the Github mediawiki extension would make it easy to embed scripts directly from Github. But as @ctrueden stated in this discussion about the Jython scripting page, installing the extension is a bit involved, and I’m sure there are currently other priorities.

Ok so for the meantime let’s keep this page as it is and let’s see later if we can do something more sophisticated.

These scripts are mainly for educational purpose anyway (and also as a reminder for me).

Do not interpret it as criticism. Any effort to ease users on the IJ1 to IJ2 transition is more than welcomed. I just meant that, presumably we don’t code directly on the mediawiki, so if a link to a versioned resource exists, it is always good idea to include it, in case the static contents of the wiki page become outdated. E.g., we did that for the Adding new Ops tutorials, which did not see many edits yet.

Anyway, I just fixed the TODO on the entry script, and added links to the remarkable work of @m-entrup on the Jython_Scripting page to make thinks more cohesive.


Given the high interest from multiple folks in writing such helpful guides, I will prioritize installing that extension today.

I really want to build teams of people to manage key areas of ImageJ, so if anyone is willing to volunteer to lead the organizational effort of the imagej-scripting component, that would be super amazingly helpful. Regardless, I will add all the involved people (@bnorthan @m-entrup @hadim @imagejan) as committers, so you all can review & merge PRs, etc. But having a lead organizer too would be fantastic: someone with a vision for how to structure the Templates menu, and where on the wiki to embed the GitHub scripts. It is not a huge project—it just requires consistency and discipline.


My available time is the size of a lepton, but I’m about to retire BAR libs: They are becoming a relic from the pre-IJ2 world. In its origin, the idea was to use those libs to engage contributors from others in a centralized manner, but that idea never really caught on, so it’s time to shut down the project. I was thinking to transfer some of that effort to the script templates.

I am not really offering to lead anything, but since documentation triggers OCD in me (quoting someone), I could start a wiki page on the image-scripting (or on, if more suitable) with some thoughts.

@oburri, @Kota: You guys should try to be involved: You generally provide smart and informative scripting approaches


FYI, I did install the GitHub extension on the wiki a few days ago, but the syntax highlighting is not yet working. Will work on it more later.


Volunteers still welcome! :wink:

Sounds good, Tiago. Let me know if/how I can help.

Understood. Since our goal is to converge on some organization, maybe start a dedicated forum thread here? Then once we have a plan, I might have time to implement it quickly.

Seconded. @oburri and @Kota: if you want to be added to the imagej-scripting repository as committers, let me know. Happy to do that.


I don’t propose to take the lead neither because of time constraint and because I think it’s the same for everyone, maybe we could lead the repo together. I propose that for each PR the developer ping every person who want to be part of the maintainers and one of them should review the PR in an acceptable time frame (let’s say a week maximum).

What do you think ? (also if someone want to take the lead that is fine for me as well)

For my part I plan to include some IJ2 only Python scripts in it and post the same scripts on the IJ2 only scripts pages (with the help of the github extension). I think it’s important to keep such a page separated from the main IJ Python script pages because the IJ1/IJ2 differences are often unclear for newcomers and such separation can help people to understand what are the differences between IJ1/IJ2. Also I am developing some scripts for personal analysis at the moment and try to use only IJ2 libs.

@ctrueden: Maybe to help the ping notification in PR you could create a “IJ Script Maintainers” group in the ImageJ organisation and include people who want to be part of it (you can include me).

I like the idea of setting a time frame, @hadim! Although I’d say that the first response, as in “I’ll review it and am therefore responsible”, should happen even faster. Imho, I think we are unnecessarily raising the bar for contributions if a developer has to cc a group of people every time he/she commits.

Although I am in strong, strong favor of democratic processes, I do see the advantage of having one lead person that makes first contact if no one else jumps in on issues/PRs.

@ctrueden I’d be happy to contribute.

Thanks, @ctrueden!

That’s not necessary. The committers of that Github repository get notified automatically about every pull request and new comments.

Hi @ctrueden

I will at some point will try PR some IJ2 script so I will then be in the cue for the approval from the management team. Thanks to @tferr for notifying me about this thread!