-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 431ad35
Showing
8 changed files
with
1,236 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
This is an example Maven project implementing an ImageJ 1.x plugin. | ||
|
||
It is intended as an ideal starting point to develop new ImageJ 1.x plugins | ||
in an IDE of your choice. You can even collaborate with developers using a | ||
different IDE than you. | ||
|
||
* In [Eclipse](http://eclipse.org), for example, it is as simple as | ||
_File>Import...>Existing Maven Project_. | ||
|
||
* In [NetBeans](http://netbeans.org), it is even simpler: | ||
_File>Open Project_. | ||
|
||
* The same works in [IntelliJ](http://jetbrains.net). | ||
|
||
* If [jEdit](http://jedit.org) is your preferred IDE, you will need the | ||
[Maven Plugin](http://plugins.jedit.org/plugins/?MavenPlugin). | ||
|
||
Die-hard command-line developers can use Maven directly by calling `mvn` | ||
in the project root. | ||
|
||
However you build the project, in the end you will have the `.jar` file | ||
(called *artifact* in Maven speak) in the `target/` subdirectory. | ||
|
||
To copy the artifact into the correct place, you can call | ||
`mvn -Dimagej.app.directory=/path/to/ImageJ.app/`. | ||
This will not only copy your artifact, but also all the dependencies. Restart | ||
your ImageJ or call *Help>Refresh Menus* to see your plugin in the menus. | ||
|
||
Developing plugins in an IDE is convenient, especially for debugging. To | ||
that end, the plugin contains a `main` method which sets the `plugins.dir` | ||
system property (so that the plugin is added to the Plugins menu), starts | ||
ImageJ, loads an image and runs the plugin. See also | ||
[this page](https://imagej.net/Debugging#Debugging_plugins_in_an_IDE_.28Netbeans.2C_IntelliJ.2C_Eclipse.2C_etc.29) | ||
for information how ImageJ makes it easier to debug in IDEs. | ||
|
||
Since this project is intended as a starting point for your own | ||
developments, it is in the public domain. | ||
|
||
How to use this project as a starting point | ||
=========================================== | ||
|
||
Either | ||
|
||
* `git clone git://github.com/imagej/example-legacy-plugin`, or | ||
* unpack https://github.com/imagej/example-legacy-plugin/archive/master.zip | ||
|
||
Then: | ||
|
||
1. Edit the `pom.xml` file. Every entry should be pretty self-explanatory. | ||
In particular, change | ||
1. the *artifactId* (**NOTE**: should contain a '_' character) | ||
2. the *groupId*, ideally to a reverse domain name your organization owns | ||
3. the *version* (note that you typically want to use a version number | ||
ending in *-SNAPSHOT* to mark it as a work in progress rather than a | ||
final version) | ||
4. the *dependencies* (read how to specify the correct | ||
*groupId/artifactId/version* triplet | ||
[here](https://imagej.net/Maven#How_to_find_a_dependency.27s_groupId.2FartifactId.2Fversion_.28GAV.29.3F)) | ||
5. the *developer* information | ||
6. the *scm* information | ||
2. Remove the `Process_Pixels.java` file and add your own `.java` files | ||
to `src/main/java/<package>/` (if you need supporting files -- like icons | ||
-- in the resulting `.jar` file, put them into `src/main/resources/`) | ||
3. Edit `src/main/resources/plugins.config` | ||
4. Replace the contents of `README.md` with information about your project. | ||
|
||
If you cloned the `example-legacy-plugin` repository, you probably want to | ||
publish the result in your own repository: | ||
|
||
1. Call `git status` to verify .gitignore lists all the files (or file | ||
patterns) that should be ignored | ||
2. Call `git add .` and `git add -u` to stage the current files for | ||
commit | ||
3. Call `git commit` or `git gui` to commit the changes | ||
4. [Create a new GitHub repository](https://github.com/new) | ||
5. `git remote set-url origin [email protected]:<username>/<projectname>` | ||
6. `git push origin HEAD` | ||
|
||
### Eclipse: To ensure that Maven copies the plugin to your ImageJ folder | ||
|
||
1. Go to _Run Configurations..._ | ||
2. Choose _Maven Build_ | ||
3. Add the following parameter: | ||
- name: `imagej.app.directory` | ||
- value: `/path/to/ImageJ.app/` | ||
|
||
This ensures that the final `.jar` file will also be copied to your ImageJ | ||
plugins folder everytime you run the Maven Build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mvn -Dimagej.app.directory=/Applications/Fiji.app/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"model_name": "ANNA-PALM_npc_tubulin_946b", | ||
"label":"ANNA-PALM(v1)", | ||
"url":"https://s3.eu-west-2.amazonaws.com/anna-palm-model/anet_npc_tubulin_946b_tensorflow_model.pb", | ||
"inputs": [{ | ||
"name": "input", | ||
"key": "input", | ||
"type": "image", | ||
"channels": ["SR", "LR"], | ||
"size": 512, | ||
"shape": [1, 512, 512, 2], | ||
"default": 0.0, | ||
"required": true | ||
}, | ||
{ | ||
"name": "mode", | ||
"key": "control", | ||
"type": "choice", | ||
"options": { | ||
"tubulin": 0.0, | ||
"nuclear_pore": 1.0, | ||
"actin": 2.0 | ||
}, | ||
"shape": [1, 1, 1, 1], | ||
"default": 0.0, | ||
"required": true | ||
}, | ||
{ | ||
"name": "channel mask", | ||
"key": "channel_mask", | ||
"type": "check_list", | ||
"length": 2, | ||
"shape": [1, 1, 1, 2], | ||
"default": 1.0, | ||
"required": false | ||
}, | ||
{ | ||
"name": "dropout probability", | ||
"key": "dropout_prob", | ||
"type": "float", | ||
"shape": [], | ||
"default": 0.0, | ||
"required": false | ||
} | ||
], | ||
"outputs": [{ | ||
"name": "output", | ||
"key": "output", | ||
"type": "image", | ||
"channels": ["SR"], | ||
"size": 512, | ||
"shape": [1, 512, 512, 1] | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
mvn clean compile assembly:single | ||
cp ./target/ANNA_PALM_Process-0.2.0-SNAPSHOT-jar-with-dependencies.jar /Applications/Fiji.app/plugins/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | ||
http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<mainClass>org.imod.anet.AnetPlugin</mainClass> | ||
</manifest> | ||
</archive> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<parent> | ||
<groupId>org.scijava</groupId> | ||
<artifactId>pom-scijava</artifactId> | ||
<version>14.0.0</version> | ||
<relativePath /> | ||
</parent> | ||
|
||
<groupId>org.imod</groupId> | ||
<artifactId>ANNA_PALM_Process</artifactId> | ||
<version>0.2.0-SNAPSHOT</version> | ||
|
||
<name>ANNA-PALM Process</name> | ||
<description>ANNA-PALM imagej client.</description> | ||
<url>https://github.com/impdpasteur/ANNA-PALM</url> | ||
<inceptionYear>2012</inceptionYear> | ||
<organization> | ||
<name>Imod Pasteur</name> | ||
<url>http://www.pasteur.fr/</url> | ||
</organization> | ||
<licenses> | ||
<license> | ||
<name>Pasteur License</name> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
<developers> | ||
<developer> | ||
<name>Wei OUYANG</name> | ||
<url>http://imagej.net/User:oeway</url> | ||
<roles> | ||
<role>lead</role> | ||
<role>developer</role> | ||
<role>debugger</role> | ||
<role>reviewer</role> | ||
<role>support</role> | ||
<role>maintainer</role> | ||
</roles> | ||
</developer> | ||
</developers> | ||
<contributors> | ||
<contributor> | ||
<name>Wei OUYANG</name> | ||
<url>http://imagej.net/User:oeway</url> | ||
</contributor> | ||
</contributors> | ||
|
||
<mailingLists> | ||
<mailingList> | ||
<name>ImageJ Forum</name> | ||
<archive>http://forum.imagej.net/</archive> | ||
</mailingList> | ||
</mailingLists> | ||
<scm> | ||
<connection>scm:git:git://github.com/impdpasteur/ANNA-PALM</connection> | ||
<developerConnection>scm:git:[email protected]:impdpasteur/ANNA-PALM</developerConnection> | ||
<tag>HEAD</tag> | ||
<url>https://github.com/impdpasteur/ANNA-PALM</url> | ||
</scm> | ||
<issueManagement> | ||
<system>GitHub Issues</system> | ||
<url>https://github.com/impdpasteur/ANNA-PALM</url> | ||
</issueManagement> | ||
<ciManagement> | ||
<system>None</system> | ||
</ciManagement> | ||
|
||
<properties> | ||
<package-name>org.imod.anet</package-name> | ||
<main-class>org.imod.anet.ANNA_PALM_Process</main-class> | ||
<license.licenseName>Pasteur license</license.licenseName> | ||
<license.copyrightOwners>Institut Pasteur</license.copyrightOwners> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>net.imagej</groupId> | ||
<artifactId>ij</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.tensorflow</groupId> | ||
<artifactId>tensorflow</artifactId> | ||
<version>1.4.0</version> | ||
</dependency> | ||
<!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple --> | ||
<dependency> | ||
<groupId>com.googlecode.json-simple</groupId> | ||
<artifactId>json-simple</artifactId> | ||
<version>1.1.1</version> | ||
</dependency> | ||
<!-- https://mvnrepository.com/artifact/io.crossbar.autobahn/autobahn-java --> | ||
<dependency> | ||
<groupId>io.crossbar.autobahn</groupId> | ||
<artifactId>autobahn-java</artifactId> | ||
<version>17.10.5</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
Oops, something went wrong.