Page MenuHomec4science

ImageJ 2
Updated 1,756 Days AgoPublic

Scripts

Course on ImageJ 2 Scripts

Ops

On the forum, people are interested in creating ImageJ Ops for colocalization, which would be very useful... Here I will document my attempts at creating an OP, because using JACoP Tools is becoming a nightmare.

Duplicating an Existing Project with IntelliJ

Have your base project open.
From the project use Right-ClickRefactorCopy...

Give it a new name and select the Parent Directory

IntelliJ creates it but does not open it automatically

Go to nav{File > Open...}

Select the folder with your new project, here new-project

Changes to reflect the new project properties

In the POM

To reflect the new project. Important fields are

  1. artifactId,
  2. name
  3. description
  4. main-class (in the properties tag)

In the FileProject Structure...

You can change the following things
Project Name

Module Name under Modules

The actual Java Class

Navigate to one of the Java Classes in your new project and hit
Right-clickRefactorRename...
And rename it to reflect your new project.

Nice things to have

If you want to have your resulting JAR and dependencies copied to a Fiji subdirectory when you hit install

You need to add this in your POM under the <Properties> tag
<scijava.app.subdirectory>plugins/MyFolder</scijava.app.subdirectory>

For this to work, and according to best practices, you need to create a settings.xml file in your $HOME/.m2/ folder.
The file does not exist initially, so you should create it and then add the following.

<settings>
    <profiles>
        <profile>
            <id>imagej</id>
            <activation>
                <file>
                    <exists>C:/Fiji-Dev/</exists>
                </file>
            </activation>
            <properties>
		<scijava.app.directory>C:/Fiji-Dev/</scijava.app.directory>
                <delete.other.versions>true</delete.other.versions>
            </properties>
        </profile>
    </profiles>
</settings>

(This will now be applied to all your projects involving ImageJ)

Change the location of the Fiji installation (here C:/Fiji-Dev/)

Last Author
oburri
Last Edited
Jun 28 2019, 16:25

Event Timeline

romainGuiet moved this document from Restricted Phriction Wiki DocumentAug 10 2017, 09:51
oburri edited the content of this document. (Show Details)Jun 28 2019, 16:25
oburri changed the visibility from "Restricted Project (Project)" to "Public (No Login Required)".