Mac OS XDownloadImageJ bundled with Java 8(may need to work around Path Randomization). Instructions. With M1 (ARM) Macs, downloadImageJ bundled with Zulu OpenJDK 13.0.6.LinuxDownload ImageJ bundled with Java 8.Instructions.WindowsDownloadImageJ bundled with 64-bit Java 8.Instructions.DocumentationTiago Ferreira's comprehensive ImageJ User Guideis available as an 8MB PDF document and as a ZIP archive.The onlineJavaDoc API documentation is also available as aZIP archive.Source CodeThe ImageJ Java source consists of 160,000 linesof code in 380 files (LineCounter macro).It is availableonline andas zip archives.Example Images31 downloadable sample images and stacks are available in ImageJ's File>Open Samples submenu. These images, and more, are also available as a 8.2MB zip archive.You can also browse the ImageJ download directory atimagej.net/ij/download/.Newer ImageJ distributions are available at to the Release Notesfor a list of new features and bug fixes. top home docs download plugins resources list links
Just to clarify again. There is a fundamental difference between ImageJ v1.x and ImageJ2/Fiji, as the latter is a complete rewrite of the former. That legacy layer to which @imagejan refers was to preserve backwards compatibility so that old-style plugins/macros can still run.
Fiji is just ImageJ2 (plus the legacy layer for ImageJv1.x-compatibility) - it is simply a distribution of ImageJ that comes with a bunch of plugins bundled - ready for you to use out-of-the-box. In general, we recommend downloading/using Fiji.
Why would anyone keep updating ImageJ1 (in fact it appears to be updated more frequently than Fiji, at the very least with stable public releases, Fijis latest one is almost TWO FRICKING YEARS OLD!)? Why not have ONE piece of software that includes everything someone might need? Is there anything in ImageJ1 that is not in ImageJ2? Or vince versa? If so, what is the excuse for the other piece of software not to include that new feature?
Also, most of the plugins in Fiji were written for bio-sciences and have limited usefulness outside that field. I work with materials technology, so I prefer to develop my workflow in ImageJ 1.x, and rather move the few plugins I need from Fiji over to my ImageJ 1.x based installation. Nearly everything that works in Fiji will also work in ImageJ 1.x if you use Java 8 and include the dependency libraries. That goes the other way too; nearly everything you develop for ImageJ 1.x will also work in Fiji. So there is really not any need to choose any fixed path; just use the solution that fits your workflow best, and you can change it later. Both platforms are very flexible.
Regarding updates, if you download a couple of years old Fiji installation you can just use the built-in updater for the plugins you need, also for the ImageJ 1.x layer. So it really does not matter much how old the core installation is, as it can be updated online.
I meant for writing your own custom plugins using code examples found elsewere, or recompiling existing code. Yes installing existing plugins is easy in Fiji. But often they do not fit your need exactly, you must then change the code and recompile. That is super-easy in ImageJ 1.
there is little hope for another approach than rewriting the macro in Java. The Recoder may help however. It can record macros and Java code as well as code for other scripting languages. My personal impression is that there is little difference in effort between the scripting languages (not the macro language) and Java.
But let me first ask: why do you think you have to convert your macro? Are you missing some functionality? If it is just for unit testing, version management, and/or continuous integration, you can simply include all your scripts in a single jar file, as illustrated by this project:
Example project demonstrating how to package ImageJ scripts into a single jar file - GitHub - imagej/example-script-collection: Example project demonstrating how to package ImageJ scripts into a si...
I started adding Jython scripts to my ImageJ plugins project EFTEMj. I deploy the scripts as 2 jar files. The first file (EFTEMj-pyScripts_.jar) contains the scripts that are discovered by the newly added SJC discovery mechanism. By using the directory structure scripts/Plugins/EFTEMj/ The scripts are listed in the menu Plugins>EFTEMj. ImageJ adds a menu separator to split the scripts from the Java plugins.
A second jar file (EFETEMj-pyLib.jar) contains self written modules that are used by my scripts in EFTEMj-pyScripts_.jar. I found out that the folder jars/Lib is part of the jython classpat in ImageJ. That is why I place EFETEMj-pyLib.jar at this folder. Jython will look inside jar files to discover modules. The jar file contains a module called EFTEMj_pyLibs. In my scripts I can import files from this module by using e.g. from EFTEMj_pyLibs import CorrectDrift as drift.
More generally, that Jython page is pretty gargantuan, and could benefit from some trimming. If you see any other places that could be trimmed and/or streamlined, please feel free to go to town on it.
@imagejan
I was not able to find any compiled jython files ($py.class).
Updating the jar file works fine: Extracting a file from the jar, adding a IJ.log(...) and putting it back results in the log message to show up, when importing the modified file.
This is great!
@m-entrup thanks for testing it right away. This is great.
@imagejan thanks for noticing it. I know it has always been a limitation of BAR libs, but at the time, it was really the best way to implement them in my hands, at least. I opened a new issue to migrate everything to the new system.
Hi all,
late reply. I faced the same issue of imported modules not being refreshed. However when I clear the modules then I have a java null pointer exception. There are many other modules in sys.modules, so I wonder if fully clearing is too stringent,
If I understood well the other posts, wrapping the script into a JAR could be a solution. I would need some more precision though :
I have first one main script that request the user to choose a method/strategy.
According to the choice of strategy, I import the corresponding module, that pops-up a user input window to configure the chosen strategy. So this imported module is modified every time it is imported in the main script.
My question is if I should wrapped the main script and the submodules in the same JAR or if I should wrapp them separatly (or even the mainscript in one JAR and the submodules in one other JAR).
Thanks
So here is the main script. The idea is that it is requesting the user for an image-processing strategy, then watching a folder for new images, and calling the Run() method from the submodule that correspond to the image-processing strategy chosen.
Initially I though of having another function Config() in the submodules in addition to the Run(), so that I would call Config() once in the main script. But since the submodules are fully executed once when being imported, I though it would not be necessary. And it works indeed if I delete the compiled class file.
I also successfully compiled my Jython scripts into a .jar thanks to GitHub - m-entrup/imagej-jython-package: A minimal envirement to package Jython modules with maven.
However using GitHub - imagej/example-script-collection: Example project demonstrating how to package ImageJ scripts into a single jar file I had the following error message and there was no jar file in the target folder
@LThomas did you remove the Convert_to_Lower_Case.groovy script? That might explain the NullPointerException, as the unit test is testing the functionality of that script.
I added the test just to illustrate how you can use continuous integration even when using scripts and not Java plugins, but you can always remove the src/test directory, or disable tests by running:
I have been experiencing difficulties in running AnalyseSkeleton in the ImageJ Extension of QuPath. I came across some very useful post about polygonal measurement with Skeletonizing/Distance Mapping and has successful experience in Fiji. The images were annotated with QuPath so at a certain level I am using them in conjunction.
Soon I saw some other topics regarding automated (via scripting/macros) measurements and results return to QuPath that involved similar techniques so I attempted to set up a similar macro. However, I was unable to install AnalyzeSkeleton into the QuPath version of ImageJ. I am not sure is the plugin on the Fiji side utilizing ImageJ2. I have visited the imagej.net page and the link to the Image J 1.x seemed to be dead. May I ask that is there any way to workaround this issue? Thank you very much.
The ImageJ wiki is a community-edited knowledge base on topics relating to ImageJ, a public domain program for processing and analyzing scientific images, and its ecosystem of derivatives and variants, including ImageJ2, Fiji, and others.
I have written some experimental code that converts IterableInterval to FloatPointer. This works for my own use cases, but eventually there may be formal converters written in the style of imagej-matlab or imagej-itk. The advantage of formal converters is that script writers can simply request a specific structure in their script, and the imagej framework will automatically convert it. For example see this little script which asks for a SimpleITK structure
Soapbox moment: For anyone adding gpu compute support, always provide a fallback method for when the gpu cannot be detected. For MIST we have a GPU version, a native FFTW version (JNI again), and a plain Java version so that if either gpu or JNI FFTW fails the user can still use the plugin. The drawback is MIST is by far the most difficult of the plugins I have released to manage and distribute.
c80f0f1006