Curtis suggested in one of his answers that I should ask for help if I find a wiki page which does not seam to be uptodate.
After years of abstinence from ImageJ plugin development I have to update some of my own plugins to IJ2. This is not an easy task as information are disseminated widely (at least for someone starting from scratch like me).
Curtis supplied a lot of good information in this thread:
I asume that I am not the only who has problems to get started after reading recent threads like:
Again, all the threads contain helpful information. But one has to read a lot of irrelevant information before finding the really excellent hints. This could be streamlined in my opinion.
Over the years I have learned that a beginner can help to point out problems which experts no longer perceive. Therefore I offer to volunteer to optimize the wiki page by pointing out problems I have on my way to learn the IJ2-Style.
I am no programmer nor a computer scientist, I am a dentist by training and had to learn to program my plugins for pure need because it is hard to get funding for software in dentistry. So while being able to write code, I do not have the knowlegde of current software philosophies (and I have seen quites some of them already in my life since the Pascal “procedures” or the hype around “object orientation”). For me it is hard to dig into xml code of Maven (I never understood why xml is necessary, where a text file would do the job). But I would assume that I am a typical life science representative doing a project with the need of an individual solution for an individual problem like for example any kind of thesis.
As I said: I am willing to help, but I need support from you.
to demonstrate that I am not just complaining but willing to help I upload here a text file where I started to write the new tutorial for the wiki page. The files is a plain text file, I used markdown to format the file currently. It can be easily changed. I document for myself with such text files usually. As I will continue to document I will share the result. The file was written on linux therefore on windows newlines might be missing.
Choose Team > Git > Clone… from the NetBeans menu
For the Repository URL, enter: git://github.com/imagej/imagej
Click Next, check the “master*” branch, then Next again, then Finish
When prompted, click Open Project…
And was confronted with a number of error messages:
Some problems were encountered while processing the POMs:
[ERROR] ‘dependencies.dependency.version’ for net.imagej:imagej-common:jar is missing. @ line 99, column 15
[ERROR] ‘dependencies.dependency.version’ for net.imagej:imagej-ops:jar is missing. @ line 103, column 15
[ERROR] ‘dependencies.dependency.version’ for net.imagej:imagej-updater:jar is missing. @ line 107, column 15
The nice thing was: clicking on resolve automatically fixed this problem. But the build process failed.
The reason was, that I have several Java versions on my system (1.7 and 1.8). I did not use 1.8 prior to ImageJ and Netbeans did not know where to find it even after I had already set openjdk 1.8 to be the system default java compiler.
I could fix this problem by adding in Project Properties > Build > Compile … /usr/lib/jvm/java-1.8.0-openjdk-amd64.
It is now possible to run ImageJ. Nice!!!
However: were are all the java or jar files hidden nowadays?
I thought a git pull request would collect all source files from github in a local directory?
This is indeed an outdated page. The current information should be found on the wiki (where you can also update it yourself if you feel something is missing ). Maybe @ctrueden or @hinerm can remove the outdated content to avoid search engines picking it up?
That’s great, people improving the documentation on the wiki are very welcome!
The forum software replaces links from known sources by previews of the content to help readers of your posts to follow without the need of digging through a lot of related posts. If you feel the forum is doing too much here, please rest assured that it saved me some time and mouse clicks when reading your post.
Your suggestions are very much appreciated. To facilitate discussion, I suggest to edit (or create) a page on the wiki directly, or to discuss the text here in the forum (where you have markdown rendering included).
to be honest, the quality of your work is so outstanding that I am afraid to contribute to the wiki pages directly.
I neither have the experience to work with the wiki nor do I have the overview of the topic or the knowledge of the details.
My documentation is a very personal approach of a beginner to the ImageJ2 context. I was reading a lot during the last two days and learning a lot, too. I summarized the details in the latest version of the file which I enclose here still as a zip-archive as it is already nearly 300 lines long.
I struggled with technical terms, the frustrating complexity of the topic and my limited knowledge at the same time. My summary surely contains mistakes. But I think it should be a good starting point for others new to ImageJ2, too.
Feel free to do what you consider most appropriate with the content. I totally rely on your suggestions.
@ctrueden I vote for developer.imagej.net to blanket redirect to imagej.net and removing any remaining content exclusive to the developer subdomain.
For high value pages, like this Writing ImageJ Plugins, it would probably be worthwhile to set up specific redirects to the corresponding page on the wiki… but I don’t think it’s necessary for all old content.
The front-page content of http://developer.imagej.net/ just looks like an ugly version of http://imagej.net/Welcome at this point. Since it isn’t actually providing access to any content in the developer subdomain, is there any reason not to redirect this front page?
Absolutely no reason—we should have done that months ago. I did so now. But just for the front page, at the moment.
Edit: I recall now that the reason I didn’t do so before is because there was a single menu link, Blog, that does not go to http://imagej.net/. There are some old blog posts which are the last remaining thing to migrate. Anyway, I am working on finally getting rid of developer.imagej.net 100% right now. The timing is apropos since we are looking at migrating all the old Drupal sites to the new web server anyway.
One of the script templates (Templates menu of the Script Editor) if you are developing a script. Note that writing a script has a much lower barrier to entry than Java plugin development.
Tools like Maven and Jenkins make it hard for casual developers to understand the complicated workflow of ImageJ.
Jenkins should not be relevant to this discussion. It is mentioned on the Project management page because we use it to manage core ImageJ components. But it is not necessary for third party plugin development.
As for the “complicated workflow of ImageJ”—could you elaborate on what you mean by that? And how Maven makes it harder to understand? I personally believe Maven has the power to make things much, much easier, even for casual developers—as long as we have a good introductory guide in an easy-to-find place.
For a beginner it is hard to understand the underlying philosophy
Did you see the Philosophy page? If that page, and Architecture, still do not explain the rationale for multiple core components to your satisfaction, then I would like to remedy that by explaining in simpler terms, right away at the beginning of one or both of those pages.
Using this JAR works for local development, but it will cause you various problems later. For example, if you share your source code, you will need to commit this JAR along with your NetBeans project files to your repository, to ensure everyone else uses the same version of ImageJ that you do.
Using Netbeans with Maven
This is a much better approach. You will not have to commit any JAR files to source control. You can pin your code to fixed, known versions of its dependencies that will provide reproducible builds for many years to come.
If you want to learn from the ImageJ sources how to program image analysis algorithms then you will need to clone another github project: https://github.com/imagej/ImageJA.
Those are the ImageJ 1.x sources. I do not recommend studying them to learn about image analysis algorithms. At least: I do not recommend studying only those sources. The ImageJ Ops project is the growing and actively developed repository where we are working on many core image processing and analysis routines.
Does somebody know why the ImageJ sources are contained in the ImageJA project? What for stands the letter “A” at the end of ImageJA ?
See the ImageJA page. The A was originally for “Applet” and to differentiate the project from ImageJ itself. Note that the ImageJ 1.x repository is actually at http://github.com/imagej/imagej1 but it does not use Maven. The ImageJA project, these days, is nothing more than a Mavenized version of ImageJ 1.x with a clean Git history.
the artifactId (NOTE: should contain a ‘_’ character)
Note that the _ is only needed for ImageJ 1.x plugins. If you write an ImageJ2 command (like the ones linked above in simple-commands tutorial) then the underscore is unnecessary.
the groupId (optional)
You should put a groupId. It is misleading to leave it off, because then net.imagej (or sc.fiji if you used pom-fiji as parent) will be inherited. And your project is not a core ImageJ project.
Again, only needed for ImageJ 1.x plugins. For ImageJ2 commands, the information is provided by the @Plugin annotation at the top of the Java class.
Example, which sets the plugins.dir property so that the plugin appears in the menus when launched from an IDE
Setting plugins.dir is only necessary for ImageJ 1.x style plugins. If you write an ImageJ2 command, it should appear in the menus regardless.
The directory structure of a very simple demo project looks like
I see you documented the subdirectories of target. That is probably not necessary, and might confuse readers, since Maven generates that entire folder. It is always the case that you can fully delete the target folder and rebuild, and everything should still be OK. In other words: never commit any files from target to Git!
what is the difference between Ant and Maven? Or: build.xml vs. pom.xml
In addition to the comments in your writeup, I would add: Maven is declarative, whereas Ant is procedural. In Ant, you say “do X, then do Y, then do Z.” Whereas in Maven, you say “my code is here, my resources are there, and please use these plugins.” The advantage of the latter is that Maven provides a standardized build sequence (called the “build lifecycle”) making it compatible with all the major IDEs.
That same central location for declarations—the POM, of course—also provides a place to declare important metadata about the project, such as where the source code lives on the Internet. This lets you write all sorts of tooling to work with the project in interesting ways. For example, all the info boxes on the wiki for core ImageJ and Fiji plugins will soon be auto-generated from those plugin POM files, rather than needing to be maintained by hand. (So: no more manually editing your plugin’s wiki page every time you make a new release!)
What is it all about with this Java 6 and Java 8 stuff?
I want to apologize again for the mess that is Java 6 vs. Java 8. We should be fully transitioned to Java 8 pretty soon (by end of summer, hopefully?) and then some of this complexity will disappear.
Make a redistributable package from a locally customized Fiji
Awesome that this is in your FAQ. The whole FAQ is awesome in general, actually!
thank you very much for your extensive feedback. I integrated all your comments into the tutorial. Most sentences were just copied to an appropriate position. I feel that now you could put this summary on your wiki if you like.
Thanks to all, how helped me understand ImageJ2 better!
I have to admit that the most important information was that the most current source of information was
Since some of the information covers the current state during transition, this writeup will be more vulnerable to outdatedness as the software continues to evolve. As such, I think the best fit is as a News post. So that is what I have done.
@Scrivello Please create an account on the wiki. I would like to create a user page for you, and link to that at the top, instead of linking to your forum user page which is less ideal. Once you have a wiki account, you can also edit that news post to your liking, if you want to make any more changes.
Lastly, I would like to comment on your usage of the term “your wiki”: it is critical for the community to consider it as “our wiki” and not “the wiki of core ImageJ development teams.”
It took me about two hours to edit your text into wiki format, proofread, etc. It would have taken less time if you had made a wiki page in the first place. I was tripped up by the multiple versions of .txt files which were on my desktop: I initially wasted ~20 minutes editing the old version, before I realized it was not the latest. Using online shared documents such as wiki, Google docs, etc., avoids these sorts of “20th century” problems.
Anyway, to end on a positive note, I want to thank you again for your awesome writeup and thorough research. I hope this news post is helpful to more aspiring ImageJ developers!
thank you very much for this additional effort. Please apologize that I caused additonal loss of time.
I promiss: next time I will upload an article to the wiki myself! I started already with the next topic on my agenda: working through the tutorials and learn how the components of the different SciJava projects interplay. It might take some time however, as daily business is interfering a lot at the moment.