├── .gitattributes ├── .github ├── build.sh ├── setup.sh └── workflows │ ├── build-main.yml │ └── build-pr.yml ├── .gitignore ├── .mailmap ├── INSTALL.txt ├── LICENSE.txt ├── NOTICE.txt ├── README.md ├── RELEASES.md ├── WELCOME.md ├── about ├── about1.tif ├── about1.tif.txt ├── about2.tif ├── about2.tif.txt ├── about3.tif ├── about3.tif.txt ├── about4.tif ├── about4.tif.txt ├── about5.tif └── about5.tif.txt ├── bin ├── ImageJ.bat ├── ImageJ.sh ├── check-headers.pl ├── gen-graphs.sh ├── populate-app.sh └── trigger-jenkins-deploy.sh ├── logo ├── 128x128-flat.png ├── 128x128-shadow.png ├── 16x16-flat-gray.png ├── 16x16-flat.png ├── 16x16-shadow.png ├── 256x256-flat-gray-circle.svg ├── 256x256-flat-gray-square.svg ├── 256x256-flat.png ├── 256x256-shadow-gray-circle.svg ├── 256x256-shadow-gray-square.svg ├── 256x256-shadow.png ├── 32x32-flat.png ├── 32x32-shadow.png ├── 64x64-flat.png ├── 64x64-shadow.png ├── ImageJ2.icns ├── ImageJ2.svg ├── imagej2-v1 │ ├── 128x128.png │ ├── 16x16.png │ ├── 256x256.png │ ├── 32x32.png │ ├── 512x512.png │ ├── 64x64.png │ ├── ImageJ2-v1.icns │ ├── imagej2-v1.ico │ ├── imagej2-v1.psd │ ├── microscope.jpg │ └── readme.txt ├── imagej2.ico ├── logo_runner-up.png ├── logo_winner.png ├── original │ ├── ImageJ.icns │ ├── imagej-128.ico │ ├── imagej-128.png │ ├── imagej-16.ico │ ├── imagej-16.png │ ├── imagej-32.ico │ ├── imagej-32.png │ ├── imagej-48.ico │ ├── imagej-48.png │ ├── imagej-64.png │ ├── imagej-logo.gif │ └── readme.txt └── readme.txt ├── pom.xml └── src ├── main ├── assembly │ ├── all.xml │ ├── application.xml │ ├── application │ │ ├── Contents │ │ │ ├── Info.plist │ │ │ └── PkgInfo │ │ └── plugins │ │ │ └── readme.txt │ ├── dir.xml │ └── zip.xml ├── deploy │ └── package │ │ ├── macosx │ │ ├── ImageJ-volume.icns │ │ └── ImageJ.icns │ │ └── windows │ │ └── ImageJ.ico └── java │ └── net │ └── imagej │ ├── ImageJ.java │ ├── Main.java │ └── app │ └── ToplevelImageJApp.java └── test └── java └── net └── imagej ├── app ├── MainTest.java ├── ServiceCompletenessTest.java └── ToplevelImageJAppTest.java └── debug └── TypeHierarchy.java /.gitattributes: -------------------------------------------------------------------------------- 1 | *.java diff=java 2 | -------------------------------------------------------------------------------- /.github/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main/ci-build.sh 3 | sh ci-build.sh 4 | -------------------------------------------------------------------------------- /.github/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main/ci-setup-github-actions.sh 3 | sh ci-setup-github-actions.sh 4 | -------------------------------------------------------------------------------- /.github/workflows/build-main.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | tags: 8 | - "*-[0-9]+.*" 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: Set up Java 17 | uses: actions/setup-java@v2 18 | with: 19 | java-version: '8' 20 | distribution: 'zulu' 21 | cache: 'maven' 22 | - name: Set up CI environment 23 | run: .github/setup.sh 24 | - name: Execute the build 25 | run: .github/build.sh 26 | env: 27 | GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} 28 | GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} 29 | MAVEN_USER: ${{ secrets.MAVEN_USER }} 30 | MAVEN_PASS: ${{ secrets.MAVEN_PASS }} 31 | OSSRH_PASS: ${{ secrets.OSSRH_PASS }} 32 | SIGNING_ASC: ${{ secrets.SIGNING_ASC }} 33 | -------------------------------------------------------------------------------- /.github/workflows/build-pr.yml: -------------------------------------------------------------------------------- 1 | name: build PR 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: Set up Java 15 | uses: actions/setup-java@v2 16 | with: 17 | java-version: '8' 18 | distribution: 'zulu' 19 | cache: 'maven' 20 | - name: Set up CI environment 21 | run: .github/setup.sh 22 | - name: Execute the build 23 | run: .github/build.sh 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | .metadata 3 | .project 4 | .settings 5 | target 6 | *.swp 7 | /.idea 8 | *.iml 9 | /app/ImageJ.app/ 10 | nb-configuration.xml 11 | /scripts/ 12 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Barry DeZonia 2 | Barry DeZonia 3 | ImageJ Jenkins 4 | Johannes Schindelin 5 | Mark Hiner 6 | -------------------------------------------------------------------------------- /INSTALL.txt: -------------------------------------------------------------------------------- 1 | For information on building ImageJ2 from source, see: 2 | 3 | https://imagej.net/develop/source 4 | 5 | For a list of ImageJ2 development topics, see: 6 | 7 | https://imagej.net/develop/ 8 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 - 2024, ImageJ2 developers. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | ImageJ2 depends on several other software packages, each with its own license. 2 | 3 | You can generate an up-to-date list of dependencies from the source code: 4 | 5 | mvn dependency:list 6 | 7 | Or to display them as a tree: 8 | 9 | mvn dependency:tree 10 | 11 | As of this writing, the full list is as follows: 12 | 13 | =============================================================================== 14 | Apache Commons Lang - http://commons.apache.org/proper/commons-lang/ 15 | 16 | License: Apache 2.0 17 | 18 | org.apache.commons:commons-lang3:3.1 19 | 20 | =============================================================================== 21 | Base64 - http://iharder.sourceforge.net/current/java/base64/ 22 | 23 | License: Public domain 24 | 25 | Artifact: net.iharder:base64:2.3.8 26 | 27 | =============================================================================== 28 | Beanshell - http://www.beanshell.org/ 29 | 30 | License: Sun Public License or LGPL 3+ 31 | 32 | Artifact: org.beanshell:bsh:2.0b4 33 | 34 | =============================================================================== 35 | Clojure - http://clojure.org/ 36 | 37 | License: EPL 1.0 38 | 39 | Artifact: org.clojure:clojure:1.3.0 40 | 41 | =============================================================================== 42 | EventBus - http://eventbus.org/ 43 | 44 | License: Apache 2.0 45 | 46 | Artifact: org.bushe:eventbus:1.4 47 | 48 | =============================================================================== 49 | gentyref - https://code.google.com/p/gentyref/ 50 | 51 | License: Apache 2.0 52 | 53 | Artifact: com.googlecode:gentyref:1.1.0 54 | 55 | =============================================================================== 56 | Groovy - http://groovy.codehaus.org/ 57 | 58 | License: Apache 2.0 59 | 60 | Artifact: org.codehaus.groovy:groovy:2.3.6 61 | 62 | =============================================================================== 63 | ImgLib2 - http://imglib2.net/ 64 | 65 | License: 2-clause BSD 66 | 67 | Artifacts: 68 | net.imglib2:imglib2:2.0.2 69 | net.imglib2:imglib2-algorithm:0.1.0 70 | net.imglib2:imglib2-algorithm-fft:0.1.0 71 | net.imglib2:imglib2-ij:2.0.0-beta-27 72 | net.imglib2:imglib2-realtransform:2.0.0-beta-27 73 | net.imglib2:imglib2-roi:0.1.0 74 | 75 | =============================================================================== 76 | JAMA - http://math.nist.gov/javanumerics/jama/ 77 | 78 | License: Public domain 79 | 80 | Artifact: gov.nist.math:jama:1.0.3 81 | 82 | =============================================================================== 83 | Javassist - http://www.javassist.org/ 84 | 85 | License: MPL 1.1 or LGPL 2.1 86 | 87 | Artifact: javassist:javassist:3.16.1-GA 88 | 89 | =============================================================================== 90 | JDatePicker - http://sourceforge.net/projects/jdatepicker/ 91 | 92 | License: BSD 93 | 94 | Artifact: net.sourceforge.jdatepicker:jdatepicker:1.3.2 95 | 96 | =============================================================================== 97 | JFreeChart - http://www.jfree.org/jfreechart/ 98 | 99 | License: LGPL 100 | 101 | Artifact: org.jfree:jfreechart:1.0.19 102 | 103 | Dependencies: 104 | org.jfree:jcommon:1.0.23 105 | 106 | =============================================================================== 107 | JHotDraw7 - http://www.randelshofer.ch/oop/jhotdraw/index.html 108 | 109 | License: LGPL or CC BY 1.5 110 | 111 | Artifact: org.jhotdraw:jhotdraw:7.6.0 112 | 113 | =============================================================================== 114 | JRuby - http://jruby.org/ 115 | 116 | License: CPL or GPL or LGPL 117 | 118 | Artifacts: 119 | org.jruby:jruby-core:1.7.12 120 | org.jruby:jruby-stdlib:1.7.12 121 | 122 | Dependencies: 123 | com.github.jnr:jffi:1.2.7 124 | com.github.jnr:jffi:native:1.2.7 125 | com.github.jnr:jnr-constants:0.8.5 126 | com.github.jnr:jnr-enxio:0.4 127 | com.github.jnr:jnr-ffi:1.0.7 128 | com.github.jnr:jnr-netdb:1.1.2 129 | com.github.jnr:jnr-posix:3.0.1 130 | com.github.jnr:jnr-unixsocket:0.3 131 | com.github.jnr:jnr-x86asm:1.0.2 132 | com.headius:invokebinder:1.2 133 | com.headius:options:1.1 134 | com.jcraft:jzlib:1.1.2 135 | com.martiansoftware:nailgun-server:0.9.1 136 | joda-time:joda-time:2.3 137 | org.jruby.extras:bytelist:1.0.11 138 | org.jruby.jcodings:jcodings:1.0.10 139 | org.jruby.joni:joni:2.1.1 140 | org.jruby:yecht:1.0 141 | org.ow2.asm:asm:4.0 142 | org.ow2.asm:asm-analysis:4.0 143 | org.ow2.asm:asm-commons:4.0 144 | org.ow2.asm:asm-tree:4.0 145 | org.ow2.asm:asm-util:4.0 146 | org.yaml:snakeyaml:1.13 147 | 148 | =============================================================================== 149 | JSch - http://www.jcraft.com/jsch/ 150 | 151 | License: 3-clause BSD 152 | 153 | Artifact: com.jcraft:jsch:0.1.49 154 | 155 | =============================================================================== 156 | Jython - http://jython.org/ 157 | 158 | License: Python Software Foundation License Version 2 159 | 160 | Artifact: org.scijava:jython-shaded:2.5.3 161 | 162 | =============================================================================== 163 | MarkdownJ - http://markdownj.org/ 164 | 165 | License: 3-clause BSD 166 | 167 | org.markdownj:markdownj:0.3.0-1.0.2b4 168 | 169 | =============================================================================== 170 | MigLayout - http://www.miglayout.com/ 171 | 172 | License: 3-clause BSD or GPL 173 | 174 | Artifact: com.miglayout:miglayout:swing:3.7.3.1 175 | 176 | =============================================================================== 177 | Mines Java Toolkit - http://inside.mines.edu/~dhale/jtk/ 178 | 179 | License: CPL 1.0 180 | 181 | Artifact: edu.mines:mines-jtk:20100113 182 | 183 | =============================================================================== 184 | Object Inspector - https://github.com/sbridges/object-inspector 185 | 186 | License: 2-clause BSD 187 | 188 | Artifact: com.github.sbridges.object-inspector:object-inspector:0.1 189 | 190 | =============================================================================== 191 | RSyntaxTextArea - http://fifesoft.com/rsyntaxtextarea/ 192 | 193 | License: 3-clause BSD 194 | 195 | Artifact: com.fifesoft:rsyntaxtextarea:2.5.2 196 | 197 | =============================================================================== 198 | SCIFIO - http://loci.wisc.edu/software/scifio 199 | 200 | License: 2-clause BSD 201 | 202 | Artifact: io.scif:scifio:0.17.0 203 | 204 | Dependencies: 205 | io.scif:jai_imageio:1.1.0 206 | org.mapdb:mapdb:1.0.3 207 | 208 | =============================================================================== 209 | SciJava Common - https://github.com/scijava/scijava-common 210 | 211 | License: 2-clause BSD 212 | 213 | Artifact: org.scijava:scijava-common:2.35.0 214 | 215 | Dependencies: 216 | com.googlecode:gentyref:1.1.0 217 | org.bushe:eventbus:1.4 218 | 219 | =============================================================================== 220 | Unidata UDUNITS - http://www.unidata.ucar.edu/software/udunits/ 221 | 222 | License: 3-clause BSD + lawsuit termination clause 223 | 224 | Artifact: edu.ucar:udunits:4.3.18 225 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Image.sc Forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&url=https%3A%2F%2Fforum.image.sc%2Ftags%2Fimagej.json&query=%24.topic_list.tags.0.topic_count&colorB=brightgreen&suffix=%20topics&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tag/imagej) 2 | [![](https://github.com/imagej/imagej2/actions/workflows/build-main.yml/badge.svg)](https://github.com/imagej/imagej2/actions/workflows/build-main.yml) 3 | [![developer chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://imagesc.zulipchat.com/#narrow/stream/327236-ImageJ2) 4 | [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/imagej/imagej2) 5 | 6 | This is the repository for [ImageJ2](https://imagej.net/software/imagej2), 7 | a rewrite of the original [ImageJ](https://imagej.net/software/imagej) for 8 | multidimensional image data, with a focus on scientific imaging. Its central 9 | goal is to broaden the paradigm of ImageJ beyond the limitations of the 10 | original ImageJ application, to support a wider range of multidimensional 11 | scientific image data. 12 | 13 | To ensure backwards compatibility, ImageJ2 has been designed to fully integrate 14 | into the original ImageJ user interface. This allows users to keep using ImageJ 15 | in familiar ways, while providing the ability to migrate toward more powerful 16 | new features as needed. 17 | 18 | Under the hood, ImageJ2 completely isolates the image processing logic from the 19 | graphical user interface (UI), allowing ImageJ2 commands to be used in many 20 | contexts, including headless in the cloud or on a server such as 21 | [OMERO](https://imagej.net/software/omero), from within another Java 22 | application such as [KNIME](https://imagej.net/software/knime) or 23 | [Icy](https://imagej.net/software/icy), or even from Python-based applications 24 | such as [CellProfiler](https://imagej.net/software/cellprofiler) and 25 | [napari](https://imagej.net/software/napari) via 26 | [PyImageJ](https://pypi.org/project/pyimagej). 27 | 28 | ImageJ2 has an N-dimensional data model driven by the powerful 29 | [ImgLib2](https://imagej.net/libs/imglib2) library, which supports image data 30 | expressed in an extensible set of numeric and non-numeric types, and accessed 31 | from an extensible set of data sources. ImageJ2 is driven by a collaborative 32 | development process; for details, see the 33 | [Contributing](https://imagej.net/contribute/) page. 34 | 35 | We collaborate with related projects such as 36 | [Fiji](https://imagej.net/software/fiji), 37 | [SCIFIO](https://imagej.net/software/scifio), 38 | [CellProfiler](https://imagej.net/software/cellprofiler), and 39 | [OME](https://openmicroscopy.org/), and are striving to deliver a coherent 40 | software stack reusable throughout the life sciences community and beyond. 41 | For more details, see the [SciJava web site](https://scijava.org/). 42 | 43 | For more details on the project, see the [ImageJ wiki](https://imagej.net/). 44 | 45 | 46 | # LICENSING 47 | 48 | ImageJ2 is distributed under a 49 | [Simplified BSD License](https://en.wikipedia.org/wiki/BSD_licenses); 50 | for the full text of the license, see 51 | [LICENSE.txt](https://github.com/imagej/imagej2/blob/master/LICENSE.txt). 52 | 53 | 54 | # IMAGEJ2 AS A LIBRARY 55 | 56 | ## From Java 57 | 58 | This repository is the main ImageJ2 application, which brings together all of 59 | ImageJ2 under the artifact 60 | [net.imagej:imagej](https://maven.scijava.org/index.html#nexus-search;gav~net.imagej~imagej~~~~kw,versionexpand). 61 | It is the easiest entry point if you are looking to use ImageJ2 as a library 62 | from your own software. E.g., in your Maven `pom.xml`: 63 | 64 | ``` 65 | 66 | org.scijava 67 | pom-scijava 68 | 30.0.0 69 | 70 | ... 71 | 72 | net.imagej 73 | imagej 74 | 75 | ``` 76 | 77 | We recommend inheriting from the 78 | [pom-scijava](https://github.com/scijava/pom-scijava) parent, although it is not 79 | required. (If you do not, you will need to include the `` of ImageJ2 in 80 | your `` declaration, and you may be bitten by [this bug in 81 | Maven](https://stackoverflow.com/q/45041888/1207769) regarding the versions of 82 | ImageJ2's dependencies that you inherit.) 83 | 84 | ## From other languages 85 | 86 | * __JavaScript__: Use the 87 | [imagej module on npm](https://www.npmjs.com/package/imagej) 88 | to call ImageJ2 in-process from node.js code. 89 | * __Python__: Use the 90 | [PyImageJ module on PyPi](https://pypi.org/project/pyimagej/) 91 | to call ImageJ2 in-process from Python code. 92 | * __Ruby, R, LLVM and beyond__: Use [GraalVM](https://www.graalvm.org/) 93 | to combine ImageJ2 with Truffle-based languages in the same VM, 94 | with shared objects and memory on a single VM heap. 95 | * __Interprocess__: Use the 96 | [ImageJ Server](https://github.com/imagej/imagej-server) 97 | to work with ImageJ2 via a RESTful web services API, between 98 | processes on the same machine, or between multiple machines. 99 | 100 | 101 | # DEPENDENCIES 102 | 103 | This component depends on other, lower level components, each of which lives in 104 | its own repository: 105 | 106 | * [ImageJ Common](https://github.com/imagej/imagej-common) 107 | * [ImageJ Legacy](https://github.com/imagej/imagej-legacy) 108 | * [ImageJ Ops](https://github.com/imagej/imagej-ops) 109 | * [ImageJ Updater](https://github.com/imagej/imagej-updater) 110 | * [ImgLib2](https://github.com/imglib/imglib) 111 | * [SCIFIO](https://github.com/scifio/scifio) 112 | * [SciJava Common](https://github.com/scijava/scijava-common) 113 | 114 | It also includes various "plugin" components at runtime: 115 | 116 | * [ImageJ Plugins: Commands](https://github.com/imagej/imagej-plugins-commands) 117 | * [ImageJ Plugins: Tools](https://github.com/imagej/imagej-plugins-tools) 118 | * [ImageJ Plugins: Uploader: SSH](https://github.com/imagej/imagej-plugins-uploader-ssh) 119 | * [ImageJ Plugins: Uploader: WebDAV](https://github.com/imagej/imagej-plugins-uploader-webdav) 120 | * [ImageJ Scripting](https://github.com/imagej/imagej-scripting) 121 | * [SciJava Plugins: Platforms](https://github.com/scijava/scijava-plugins-platforms) 122 | * [SciJava Plugins: Text: Markdown](https://github.com/scijava/scijava-plugins-text-markdown) 123 | * [SciJava Plugins: Text: Plain](https://github.com/scijava/scijava-plugins-text-plain) 124 | 125 | See the [pom.xml](pom.xml) for a complete list of dependencies. 126 | 127 | 128 | # BUGS 129 | 130 | For a list of known issues, see the 131 | [GitHub issues](https://github.com/imagej/imagej2/issues). 132 | 133 | Please report any bugs by following the 134 | [instructions online](https://imagej.net/discuss/bugs). 135 | -------------------------------------------------------------------------------- /RELEASES.md: -------------------------------------------------------------------------------- 1 | ImageJ2 uses several major components, each of which is released on its own 2 | development cycle. 3 | 4 | Component releases are done using the [SciJava 5 | release-version.sh](https://github.com/scijava/scijava-scripts/blob/master/release-version.sh) 6 | script, which uses the 7 | [maven-release-plugin](http://maven.apache.org/maven-release/maven-release-plugin/) 8 | to do some of the work. All releases are tagged in their respective Git 9 | repositories, with binary builds deployed to the [SciJava Maven 10 | repository](https://maven.scijava.org/). 11 | 12 | ## POM-SCIJAVA VERSIONING 13 | 14 | The 15 | [Bump-POM-SciJava](http://jenkins.imagej.net/view/SciJava/job/Bump-POM-SciJava/) 16 | Jenkins job is used to automatically manage the version properties in 17 | [pom-scijava](https://github.com/scijava/pom-scijava). If there are no breaking 18 | changes in the ImageJ2 software stack components that will be released, the 19 | procedure is simple: 20 | 21 | 1. Perform all necessary releases as indicated below. 22 | 2. Run Bump-POM-SciJava and select "UPDATE_XXXX" for all components that either: 23 | * Were newly released 24 | * Are downstream of a newly released component 25 | 26 | This will update the version properties to the latest releases of all 27 | components, and automatically update the pom-scijava usage to this newest 28 | pom-scijava version for each component that "UPDATE_XXXX" was selected. 29 | 30 | ### BREAKING CHANGES 31 | 32 | If some component releases will include breaking API changes, the procedure is 33 | different - as these changes will typically propagate through the software 34 | stack and will break builds if the downstream API use is not updated. In this 35 | case, the procedure is as follows: 36 | 37 | 1. Manually update [pom-scijava](https://github.com/scijava/pom-scijava)'s 38 | version properties to point to the *expected* (but not yet released) version of 39 | each component that will be released. As a part of this commit, the pom-scijava 40 | version number should be increased as well. 41 | 2. For each component that will be released, starting from the lowest 42 | component in the stack (e.g. the component with the breaking changes that 43 | are being propagated): 44 | 1. Add a single commit that updates the pom version to the latest and 45 | performs any necessary API updates. 46 | 2. Release the component as indicated below. 47 | 3. Run 48 | [Bump-POM-SciJava](http://jenkins.imagej.net/view/SciJava/job/Bump-POM-SciJava/) 49 | with the `POM_SCIJAVA_BUMPED_MANUALLY` parameter enabled to deploy the 50 | latest pom-scijava. Other parameters should be disabled. 51 | 4. (Optional) Run Bump-POM-SciJava for any remaining downstream components 52 | that need to be updated (e.g. those that were not manually updated). 53 | 54 | ## PREREQUISITES 55 | 56 | All ImageJ2 prerequisites use the 57 | [release-version.sh](https://github.com/scijava/scijava-scripts/blob/master/release-version.sh) 58 | script. For each project: 59 | 60 | cd 61 | release-version.sh 62 | 63 | The version numbering conventions for each project are as follows: 64 | 65 | | Project | Version syntax | 66 | | -------------- |:--------------:| 67 | | SciJava Common | 1.X.X | 68 | | ImgLib2 | 2.0.0-beta-X | 69 | | SCIFIO | 0.X.X | 70 | | ImageJ Launcher| 3.X.X | 71 | 72 | ## [IMAGEJ LAUNCHER](https://github.com/imagej/imagej-launcher) 73 | 74 | After running the release-version.sh script, you will need to manually deploy: 75 | 76 | open http://jenkins.imagej.net/job/ImageJ-launcher/build 77 | 78 | And build the newly pushed release tag; e.g., `imagej-launcher-3.14.159`. 79 | 80 | ## [IMAGEJ](https://github.com/imagej/imagej) 81 | 82 | The following steps perform a release of ImageJ itself: 83 | 84 | #### Use the latest version of ImageJ 1.x 85 | 86 | Verify that the pom-scijava version used by ImageJ references the 87 | [latest available version of ImageJ 88 | 1.x](https://maven.scijava.org/content/repositories/releases/net/imagej/ij/): 89 | 90 | cd imagej 91 | sj-version.sh | grep imagej1.version 92 | 93 | If not, [tell Jenkins to update `imagej1.version` in 94 | pom-scijava](http://jenkins.imagej.net/view/SciJava/job/Bump-POM-SciJava/build). 95 | Otherwise, uploading a new release to the update site will downgrade 96 | all ImageJ2 and Fiji users to an obsolete ImageJ 1.x version. 97 | 98 | #### Tag a release candidate 99 | 100 | *First of all*, if you have an **Eclipse** instance running, quit it, or make sure 101 | that *Project>Build automatically* is checked **off**. 102 | 103 | cd imagej 104 | release-version.sh --skip-push --skip-deploy --tag=temp 2.0.0-beta-7 105 | git push origin temp 106 | 107 | - Where `2.0.0-beta-7` is the new release version. 108 | - The `--tag=temp` argument creates a temporary tag named `temp`, 109 | from which we will build the release candidate in the next step. 110 | 111 | #### Build the release candidate 112 | 113 | open http://jenkins.imagej.net/job/ImageJ-release-build/build 114 | 115 | And specify the newly pushed `temp` tag. 116 | 117 | #### Test the release candidate 118 | 119 | - Download the resultant [application 120 | ZIP](http://jenkins.imagej.net/job/ImageJ-release-build/lastSuccessfulBuild/artifact/app/target/) 121 | from Jenkins and perform desired tests. 122 | - Fix any critical bugs found on `master` 123 | - Delete the `temp` tag locally and remotely 124 | - Start the release process over again 125 | 126 | #### Manual testing steps 127 | 128 | At a minimum, the following should be tested: 129 | 130 | * `File -> Open` 131 | * Ideally on all [SCIFIO-supported 132 | formats](https://github.com/scifio/scifio/tree/master/scifio/src/main/java/io/scif/formats). 133 | * On at least one dataset that will force caching, e.g. 134 | `test&axes=X,Y,Z&lengths=256,256,100000.fake` 135 | * `File -> Save as...` 136 | * ideally for all [SCIFIO-supported output 137 | formats](https://github.com/scifio/scifio/blob/master/scifio/src/main/java/io/scif/Writer.java). 138 | * `ImageJ -> Quit ImageJ` 139 | * Test this *before and after* opening data, especially data that causes 140 | caching. 141 | * Plugins 142 | * Test as many IJ2 plugins (green puzzle piece in the menus) as possible. 143 | * Test several legacy plugins (IJ1 microscope in the menus) to verify 144 | compatibility layer. 145 | 146 | #### Tag, build and deploy the actual release 147 | 148 | cd imagej 149 | release-version.sh 2.0.0-beta-7 150 | 151 | - Where `2.0.0-beta-7` is the new release version. 152 | 153 | #### Update pom-scijava 154 | 155 | Optionally, after performing the release, [tell Jenkins to update 156 | `imagej.version` in 157 | pom-scijava](http://jenkins.imagej.net/view/SciJava/job/Bump-POM-SciJava/build). 158 | 159 | #### Upload artifacts to the ImageJ update site 160 | 161 | - Unpack the [application 162 | ZIP](https://maven.scijava.org/content/repositories/releases/net/imagej/ij-app/) 163 | - Add upload information for the ''ImageJ'' update site: 164 | 165 | ``` 166 | ./ImageJ-linux64 --update edit-update-site ImageJ http://update.imagej.net/ \ 167 | @update.imagej.net /home/imagej/update-site/ 168 | ``` 169 | - Simulate an upload (to make sure everything is correct): 170 | 171 | ``` 172 | ./ImageJ-linux64 --update upload-complete-site --simulate ImageJ 173 | ``` 174 | - If the upload will render files obsolete that Fiji still relies on, upload them 175 | to the Fiji site using the ```--force-shadow``` option: 176 | 177 | ``` 178 | ./ImageJ-linux64 --update upload --force-shadow --site Fiji ... 179 | ``` 180 | - When everything is alright, upload it for real: 181 | 182 | ``` 183 | ./ImageJ-linux64 --update upload-complete-site ImageJ 184 | ``` 185 | 186 | #### Update web resources 187 | 188 | 1. [Create a blog post](http://developer.imagej.net/node/add/blog) on the 189 | ImageJ web site. It should be modeled after a [previous blog 190 | entry](http://developer.imagej.net/2013/06/12/imagej-v200-beta-7). 191 | 192 | 2. Rename the artifact `ij-app-XYZ-application.zip` to `imagej-XYZ.zip` where 193 | `XYZ` is the release version number. Add it as an attachment to the post. 194 | 195 | 3. Update the [Downloads page](http://developer.imagej.net/downloads). 196 | 197 | 4. Send a release announcement to the mailing lists (ImageJ and imagej-devel). 198 | It should be an abbreviated version of the blog post, modeled after a 199 | [previous release 200 | announcement](http://imagej.net/pipermail/imagej-devel/2012-May/000975.html). 201 | -------------------------------------------------------------------------------- /WELCOME.md: -------------------------------------------------------------------------------- 1 | # Welcome to ImageJ2! 2 | 3 | [ImageJ2](https://imagej.net/software/imagej2) is an effort to broaden 4 | ImageJ's functionality beyond the limitations of the original ImageJ 5 | application, to better support multidimensional scientific imaging. 6 | 7 | To ensure backwards compatibility, we designed ImageJ2 to fully integrate into 8 | the existing ImageJ user interface. This allows you to keep using ImageJ in 9 | familiar ways, while providing the ability to migrate toward more powerful new 10 | features as needed. 11 | 12 | If you use the [Fiji](https://imagej.net/software/fiji) distribution of ImageJ 13 | and ImageJ2, you may already be familiar with some of ImageJ2's features, such 14 | as the [Updater](https://imagej.net/plugins/updater), 15 | [Launcher](https://imagej.net/learn/launcher), and 16 | [Script Editor](https://imagej.net/scripting/script-editor), which were 17 | originally developed for Fiji. 18 | 19 | ## Features of ImageJ2 20 | 21 | ImageJ2 provides a wealth of new features and capabilities: 22 | 23 | * The ImageJ Updater makes it simple to stay up to date, and to add new plugins 24 | by enabling additional [Update Sites](https://imagej.net/update-sites). 25 | * New and enhanced file format support via the 26 | [SCIFIO library](https://imagej.net/libs/scifio) (see below). 27 | * More powerful [Script Editor](https://imagej.net/scripting/script-editor) 28 | with support for several scripting languages. 29 | * New commands: 30 | * `Plugins > Debug > Dump Stack` for debugging when things 31 | [hang](https://en.wikipedia.org/wiki/Hang_(computing)). 32 | * `Plugins > Debug > System Information` for reporting on versions of 33 | installed plugins and libraries. 34 | * Use ImageJ2's N-dimensional [ImgLib2](https://imagej.net/libs/imglib2)-based 35 | data structures (still in beta). 36 | * Write [parameterized commands and scripts](https://imagej.net/scripting/parameters): 37 | * Typed inputs and outputs with no dependence on AWT user interface. 38 | * Mix and match original ImageJ and ImageJ2 data structures. 39 | * Plugins appear in the menu automatically without plugins.config files. 40 | * Reusable in many contexts: KNIME, CellProfiler, OMERO, headless... 41 | 42 | ## ImageJ2 is more than just an application 43 | 44 | ImageJ2 is also a collection of reusable software libraries built on the 45 | [SciJava](https://imagej.net/libs/scijava) software stack, using a powerful 46 | plugin framework to facilitate rapid development and user customization. 47 | 48 | The following software component libraries form the core of ImageJ2: 49 | 50 | * [ImageJ Common](https://github.com/imagej/imagej-common) - 51 | The core image data model, using ImgLib2. 52 | * [ImageJ Ops](https://github.com/imagej/imagej-ops) - 53 | An extensible framework for reusable image processing algorithms. 54 | * [ImageJ Updater](https://github.com/imagej/imagej-updater) - 55 | A mechanism to update individual plugins and libraries within ImageJ2. 56 | * [ImageJ Legacy](https://github.com/imagej/imagej-legacy) - 57 | Provides complete backwards compatibility with the original ImageJ. 58 | * [SciJava Common](https://github.com/scijava/scijava-common) - 59 | The core frameworks for plugins, modules and the application itself. 60 | 61 | ## Improved image I/O with the SCIFIO library 62 | 63 | ImageJ2 uses the [SCIFIO](https://imagej.net/libs/scifio) library 64 | (**SC**ientific **I**mage **F**ormat **I**nput and **O**utput) by default 65 | for most image input tasks. You can change this behavior at any time by 66 | running `Edit > Options > ImageJ2` and modifying the 67 | `Use SCIFIO when opening files` option. 68 | 69 | ### Benefits of using SCIFIO 70 | 71 | SCIFIO is focused on robust and extensible support for reading and writing 72 | image file formats. Using it with ImageJ provides many advantages: 73 | 74 | * There is no need to call a special SCIFIO plugin; it works with commands like 75 | `File > Open` automatically. 76 | * There are additional import options available via the 77 | `File > Import > Image...` command. 78 | * There is a [Bio-Formats](https://imagej.net/formats/bio-formats) 79 | plugin for SCIFIO, included with the [Fiji](https://imagej.net/software/fiji) 80 | distribution of ImageJ, that adds automatic support for over a hundred life 81 | sciences file formats. 82 | * Additional SCIFIO file format plugins can be dropped into ImageJ2 and will 83 | also work automatically. 84 | * Unlike the original ImageJ's TIFF implementation, SCIFIO's support for TIFF 85 | adheres to the specification, allowing to successfully read many more sorts 86 | of TIFFs. 87 | * Similarly, SCIFIO supports more sorts of JPEG files since it uses its own 88 | JPEG decoder. 89 | * SCIFIO also ships with support for several QuickTime codecs, allowing reading 90 | of QuickTime MOV files even in 64-bit mode without QuickTime for Java. 91 | * SCIFIO supports many additional open file formats out of the box: 92 | * animated GIF 93 | * animated PNG 94 | * encapsulated postscript (EPS) 95 | * JPEG-2000 96 | * Micro-Manager datasets 97 | * Multi-image Network Graphics (MNG) 98 | * Nearly Raw Raster Data (NRRD) 99 | * Imspector OBF 100 | * OME-TIFF (multidimensional rich metadata TIFF) 101 | * OME-XML 102 | * PCX 103 | * PICT (even in 64-bit mode and/or without QuickTime for Java installed) 104 | * If SCIFIO cannot handle the image file, it falls back to the original 105 | ImageJ's I/O logic. 106 | * You can save to SCIFIO-supported file formats using the 107 | `File > Export > Image...` command. Supported formats for export include: 108 | * APNG 109 | * AVI 110 | * EPS 111 | * ICS 112 | * JPEG 113 | * JPEG2000 114 | * QuickTime 115 | * TIFF 116 | 117 | ### Current limitations of SCIFIO 118 | 119 | * SCIFIO is still in beta, so there is likely to be a higher incidence of bugs. 120 | Issues can be reported on the 121 | [SCIFIO issue tracker](https://github.com/scifio/scifio/issues). 122 | * Although we strive for full backwards compatibility, some files may appear 123 | slightly different when opened. 124 | * Opening files with SCIFIO is not fully macro recordable yet. 125 | -------------------------------------------------------------------------------- /about/about1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/about/about1.tif -------------------------------------------------------------------------------- /about/about1.tif.txt: -------------------------------------------------------------------------------- 1 | attribution This image courtesy of Tom Deerinck 2 | attribution via a Creative Commons license 3 | fontsize 45 4 | color 255 255 0 -------------------------------------------------------------------------------- /about/about2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/about/about2.tif -------------------------------------------------------------------------------- /about/about2.tif.txt: -------------------------------------------------------------------------------- 1 | attribution This image courtesy of Spike Walker 2 | attribution via a Creative Commons license 3 | fontsize 50 4 | color 255 140 0 5 | -------------------------------------------------------------------------------- /about/about3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/about/about3.tif -------------------------------------------------------------------------------- /about/about3.tif.txt: -------------------------------------------------------------------------------- 1 | attribution This image from ESO/J. Emerson/VISTA 2 | attribution Cambridge Astronomical Survey Unit 3 | fontsize 40 4 | color 255 255 0 -------------------------------------------------------------------------------- /about/about4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/about/about4.tif -------------------------------------------------------------------------------- /about/about4.tif.txt: -------------------------------------------------------------------------------- 1 | attribution This image courtesy of Hank L. Oppenheimer 2 | attribution via a Creative Commons license 3 | color 255 255 0 -------------------------------------------------------------------------------- /about/about5.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/about/about5.tif -------------------------------------------------------------------------------- /about/about5.tif.txt: -------------------------------------------------------------------------------- 1 | attribution This image courtesy of Annie Cavanagh 2 | attribution via a Creative Commons license 3 | fonstsize 30 4 | color 0 255 0 5 | -------------------------------------------------------------------------------- /bin/ImageJ.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | setlocal ENABLEEXTENSIONS 4 | set DIR=%~dp0 5 | set DIR=%DIR:~0,-1% 6 | 7 | :: 8 | :: Use bundled JRE, if present 9 | :: 10 | 11 | if exist "%DIR%\java\win32" ( 12 | set JAVA_PATH=%DIR%\java\win32\jdk1.8.0_66\jre 13 | ) 14 | 15 | if exist "%DIR%\java\win64" ( 16 | set JAVA_PATH=%DIR%\java\win64\jdk1.8.0_66\jre 17 | ) 18 | 19 | if exist "%JAVA_PATH%" goto pathOK 20 | 21 | if exist "%DIR%\java\win32" ( 22 | set JAVA_PATH=%DIR%\java\win32\jdk1.6.0_24\jre 23 | ) 24 | 25 | if exist "%DIR%\java\win64" ( 26 | set JAVA_PATH=%DIR%\java\win64\jdk1.6.0_24\jre 27 | ) 28 | 29 | if exist "%JAVA_PATH%" goto pathOK 30 | 31 | :: 32 | :: Detect Java installation from the registry. 33 | :: 34 | :: Credit to: 35 | :: http://www.rgagnon.com/javadetails/java-0642.html 36 | :: 37 | 38 | set KEY_NAME="HKLM\SOFTWARE\JavaSoft\Java Runtime Environment" 39 | set VALUE_NAME=CurrentVersion 40 | 41 | :: 42 | :: Get the current version 43 | :: 44 | FOR /F "usebackq skip=2 tokens=3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO ( 45 | set ValueValue=%%A 46 | ) 47 | if defined ValueValue ( 48 | @echo The current Java runtime is: %ValueValue% 49 | ) else ( 50 | @echo %KEY_NAME%\%VALUE_NAME% not found. 51 | goto end 52 | ) 53 | set JAVA_CURRENT="HKLM\SOFTWARE\JavaSoft\Java Runtime Environment\%ValueValue%" 54 | set JAVA_HOME=JavaHome 55 | 56 | :: 57 | :: Get the java path 58 | :: 59 | FOR /F "usebackq skip=2 tokens=3*" %%A IN (`REG QUERY %JAVA_CURRENT% /v %JAVA_HOME% 2^>nul`) DO ( 60 | set JAVA_PATH=%%A %%B 61 | ) 62 | 63 | if not exist "%JAVA_PATH%" ( 64 | echo. 65 | echo No Java installation could be found! 66 | echo. 67 | goto end 68 | ) 69 | 70 | :pathOK 71 | echo. 72 | echo Discovered Java at: 73 | echo %JAVA_PATH% 74 | echo. 75 | 76 | :: 77 | :: Build up the classpath. 78 | :: 79 | :: NB: Cannot use an inline loop due to batch files being so defective. 80 | :: Credit to: http://stackoverflow.com/a/13809834/1207769 81 | :: 82 | set CP=%DIR%\jars\* 83 | for /d %%a in (%DIR%\jars\*) do call :appendCP %%a 84 | call :appendCP %DIR%\plugins 85 | 86 | :: 87 | :: Launch ImageJ. 88 | :: 89 | echo Launching ImageJ. 90 | "%JAVA_PATH%\bin\java.exe" -cp "%CP%" net.imagej.Main 91 | 92 | goto end 93 | 94 | :appendCP 95 | set CP=%CP%;%1\* 96 | 97 | :end 98 | -------------------------------------------------------------------------------- /bin/ImageJ.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ### 4 | # #%L 5 | # ImageJ software for multidimensional image processing and analysis. 6 | # %% 7 | # Copyright (C) 2009 - 2015 Board of Regents of the University of 8 | # Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck 9 | # Institute of Molecular Cell Biology and Genetics. 10 | # %% 11 | # Redistribution and use in source and binary forms, with or without 12 | # modification, are permitted provided that the following conditions are met: 13 | # 14 | # 1. Redistributions of source code must retain the above copyright notice, 15 | # this list of conditions and the following disclaimer. 16 | # 2. Redistributions in binary form must reproduce the above copyright notice, 17 | # this list of conditions and the following disclaimer in the documentation 18 | # and/or other materials provided with the distribution. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 24 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | # POSSIBILITY OF SUCH DAMAGE. 31 | # #L% 32 | ### 33 | 34 | ### 35 | # A shell script to launch ImageJ without the ImageJ launcher. 36 | # 37 | # Author: Johannes Schindelin 38 | ### 39 | 40 | unset CDPATH 41 | 42 | # bend over for SunOS' sh, and use `` instead of $() 43 | DIRECTORY="`dirname "$0"`" 44 | PATHSEPARATOR=: 45 | ISWINDOWS= 46 | ISCYGWIN= 47 | case "`uname -s`" in 48 | MINGW*) 49 | ISWINDOWS=t 50 | PATHSEPARATOR=";" 51 | IMAGEJ_ROOT="$(cd "$DIRECTORY" && pwd -W)" 52 | ;; 53 | CYGWIN*) 54 | ISWINDOWS=t 55 | ISCYGWIN=t 56 | PATHSEPARATOR=";" 57 | IMAGEJ_ROOT="$(cygpath -d "$(cd "$DIRECTORY" && pwd)" | tr \\\\ /)" 58 | ;; 59 | *) 60 | IMAGEJ_ROOT="`cd "$DIRECTORY" && pwd`" 61 | ;; 62 | esac 63 | 64 | # SunOS's sh cannot do this: IMAGEJ_ROOT="${IMAGEJ_ROOT%*/bin}" 65 | case "$IMAGEJ_ROOT" in 66 | */bin) 67 | IMAGEJ_ROOT="`expr "$IMAGEJ_ROOT" : '\(.*\)/bin'`" 68 | ;; 69 | esac 70 | 71 | sq_quote () { 72 | echo "$1" | sed "s/[]\"\'\\\\(){}[\!\$ ;]/\\\\&/g" 73 | } 74 | 75 | add_classpath () { 76 | for arg 77 | do 78 | if test -z "$CLASSPATH" 79 | then 80 | CLASSPATH="$arg" 81 | else 82 | CLASSPATH="$CLASSPATH$PATHSEPARATOR$arg" 83 | fi 84 | done 85 | } 86 | 87 | first_java_options= 88 | java_options= 89 | ij_options= 90 | main_class=net.imagej.Main 91 | dashdash=f 92 | dry_run= 93 | needs_tools_jar= 94 | CLASSPATH= 95 | 96 | while test $# -gt 0 97 | do 98 | option="$1" 99 | case "$dashdash,$option" in 100 | f,--) 101 | dashdash=t 102 | ;; 103 | ?,--help) 104 | cat >&2 << EOF 105 | Usage: $0 [ --] 106 | 107 | Java options are passed to the Java Runtime, ImageJ 108 | options to ImageJ (or Jython, JRuby, ...). 109 | 110 | In addition, the following options are supported by ImageJ: 111 | General options: 112 | --help, -h 113 | show this help 114 | --dry-run 115 | show the command line but do not run anything 116 | --debugger=[,suspend=(y|n)] 117 | start up in debug mode, ready to be attached to 118 | 119 | Options to run programs other than ImageJ: 120 | --jython 121 | start Jython instead of ImageJ 122 | --jruby 123 | start JRuby instead of ImageJ 124 | --clojure 125 | start Clojure instead of ImageJ 126 | --beanshell, --bsh 127 | start BeanShell instead of ImageJ 128 | --main-class 129 | start the given class instead of ImageJ 130 | --mini-maven 131 | start MiniMaven instead of ImageJ 132 | --update 133 | start ImageJ's command-line Updater instead of ImageJ 134 | EOF 135 | exit 1 136 | ;; 137 | ?,--dry-run) 138 | dry_run=t 139 | ;; 140 | ?,--cp=*) 141 | add_classpath "${1#--cp=}" 142 | ;; 143 | ?,--classpath=*) 144 | add_classpath "${1#--classpath=}" 145 | ;; 146 | ?,--debugger=*) 147 | option="${option#--debugger=}" 148 | suspend="suspend=n" 149 | port="${option%%,*}" 150 | test "$port" = "$option" || 151 | suspend="${option#$port,}" 152 | agentlib="-agentlib:jdwp=transport=dt_socket,server=y" 153 | agentlib="$agentlib,address=localhost:$port,$suspend" 154 | first_java_options="$first_java_options $agentlib" 155 | ;; 156 | ?,--headless) 157 | first_java_options="$first_java_options -Djava.awt.headless=true" 158 | ;; 159 | ?,--mem=*) 160 | memory=${option#--mem=} 161 | first_java_options="$first_java_options -Xmx$memory" 162 | ;; 163 | ?,--jython) 164 | main_class=org.python.util.jython 165 | ;; 166 | ?,--jruby) 167 | main_class=org.jruby.Main 168 | ;; 169 | ?,--clojure) 170 | main_class=clojure.lang.Repl 171 | ;; 172 | ?,--beanshell|?,--bsh) 173 | main_class=bsh.Interpreter 174 | ;; 175 | ?,--main-class) 176 | shift 177 | main_class="$1" 178 | ;; 179 | ?,--main-class=*) 180 | main_class="`expr "$1" : '--main-class=\(.*\)'`" 181 | ;; 182 | ?,--javac) 183 | needs_tools_jar=t 184 | main_class=com.sun.tools.javac.Main 185 | ;; 186 | ?,--javap) 187 | needs_tools_jar=t 188 | main_class=sun.tools.javap.Main 189 | ;; 190 | ?,--javah) 191 | needs_tools_jar=t 192 | main_class=com.sun.tools.javah.Main 193 | ;; 194 | ?,--javadoc) 195 | needs_tools_jar=t 196 | main_class=com.sun.tools.javadoc.Main 197 | ;; 198 | ?,--mini-maven) 199 | main_class=org.scijava.minimaven.MiniMaven 200 | ;; 201 | ?,--update) 202 | main_class=net.imagej.updater.CommandLine 203 | ;; 204 | ?,--ant) 205 | needs_tools_jar=t 206 | main_class=org.apache.tools.ant.Main 207 | ;; 208 | f,*) 209 | java_options="$java_options `sq_quote "$option"`" 210 | ;; 211 | t,*) 212 | ij_options="$ij_options `sq_quote "$option"`" 213 | ;; 214 | esac 215 | shift 216 | done 217 | 218 | case "$dashdash" in 219 | f) 220 | ij_options="$ij_options $java_options" 221 | java_options= 222 | ;; 223 | esac 224 | 225 | get_first () { 226 | echo "$1" 227 | } 228 | 229 | case "$main_class,`get_first $ij_options`" in 230 | net.imagej.Main,*.py) 231 | main_class=org.python.util.jython 232 | ;; 233 | net.imagej.Main,*.rb) 234 | main_class=org.jruby.Main 235 | ;; 236 | net.imagej.Main,*.clj) 237 | main_class=clojure.lang.Repl 238 | ;; 239 | net.imagej.Main,*.bsh) 240 | main_class=bsh.Interpreter 241 | ;; 242 | esac 243 | 244 | discover_tools_jar () { 245 | javac="`which javac`" && 246 | while test -h "$javac" 247 | do 248 | javac="`readlink "$javac"`" 249 | done 250 | if test -n "$javac" 251 | then 252 | JAVA_HOME="${javac%/bin/javac}" 253 | if test -n "$ISWINDOWS" 254 | then 255 | JAVA_HOME="`cd "$JAVA_HOME" && pwd -W`" 256 | fi 257 | export JAVA_HOME 258 | echo "$JAVA_HOME/lib/tools.jar" 259 | fi 260 | } 261 | 262 | discover_jar () { 263 | ls -t "$IMAGEJ_ROOT/jars/$1-"[0-9]*.jar | 264 | head -n 1 265 | } 266 | 267 | test -z "$needs_tools_jar" || { 268 | add_classpath "`discover_tools_jar`" 269 | case "$main_class" in 270 | *.ant.*) 271 | ;; 272 | *) 273 | ij_options="-classpath $CLASSPATH $ij_options" 274 | ;; 275 | esac 276 | } 277 | 278 | case "$main_class" in 279 | net.imagej.Main|ij.ImageJ) 280 | ij_options="$main_class $ij_options" 281 | main_class="net.imagej.launcher.ClassLauncher -ijjarpath jars/ -ijjarpath plugins/" 282 | add_classpath "`discover_jar imagej-launcher`" "`discover_jar ij`" "`discover_jar javassist`" 283 | ;; 284 | org.apache.tools.ant.Main) 285 | for path in "$IMAGEJ_ROOT"/jars/ant*.jar 286 | do 287 | add_classpath "$path" 288 | done 289 | ;; 290 | *) 291 | for path in "$IMAGEJ_ROOT"/jars/*.jar "$IMAGEJ_ROOT"/plugins/*.jar 292 | do 293 | add_classpath "$path" 294 | done 295 | esac 296 | 297 | case "$dry_run" in 298 | t) 299 | java () { 300 | printf '%s' java 301 | i=1 302 | for option 303 | do 304 | printf " \"%s\"" "`sq_quote "$option"`" 305 | i=`expr $i + 1` 306 | done 307 | printf '\n' 308 | } 309 | ;; 310 | esac 311 | 312 | IMAGEJ_ROOT_SQ="`sq_quote "$IMAGEJ_ROOT"`" 313 | EXECUTABLE_NAME="$0" 314 | case "$EXECUTABLE_NAME" in 315 | */*) 316 | EXECUTABLE_NAME="`expr "$EXECUTABLE_NAME" : '.*/\([^/]*\)'`" 317 | ;; 318 | esac 319 | 320 | EXT_OPTION= 321 | case "`uname -s`" in 322 | Darwin) 323 | EXT_OPTION=-Djava.ext.dirs="$IMAGEJ_ROOT_SQ"/java/macosx-java3d/Home/lib/ext:/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Home/lib/ext 324 | ;; 325 | esac 326 | 327 | eval java $EXT_OPTION \ 328 | -Dpython.cachedir.skip=true \ 329 | -Dplugins.dir=$IMAGEJ_ROOT_SQ \ 330 | -Djava.class.path="`sq_quote "$CLASSPATH"`" \ 331 | -Dsun.java.command=ImageJ -Dij.dir=$IMAGEJ_ROOT_SQ \ 332 | -Dimagej.dir=$IMAGEJ_ROOT_SQ \ 333 | -Dimagej.executable="`sq_quote "$EXECUTABLE_NAME"`" \ 334 | -Dij.executable="`sq_quote "$EXECUTABLE_NAME"`" \ 335 | `cat "$IMAGEJ_ROOT"/jvm.cfg 2> /dev/null` \ 336 | $first_java_options \ 337 | $java_options \ 338 | $main_class $ij_options 339 | -------------------------------------------------------------------------------- /bin/check-headers.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # 4 | # check-headers.pl 5 | # 6 | 7 | # Script to verify existence and correctness of source code headers. 8 | 9 | # Usage: bin/check-headers.pl [subdirectory ...] 10 | 11 | use strict; 12 | 13 | use constant { 14 | OK => 0, 15 | INVALID_HEADER => 1, 16 | INVALID_COPYRIGHT => 2, 17 | DUPLICATE_BLANK_LINE => 3, 18 | INVALID_PACKAGE => 4, 19 | MISSING_BLANK_LINE => 5, 20 | UNEXPECTED_TEXT => 6, 21 | MALFORMED_CLASS_COMMENT => 7, 22 | UNKNOWN_AUTHOR => 9, 23 | MISSING_AUTHOR_TAG => 10, 24 | INVALID_TYPE_DECLARATION => 11, 25 | }; 26 | 27 | my $dir = `dirname "$0"`; 28 | chop $dir; 29 | 30 | my %knownAuthors = ( 31 | "Adam Fraser" => 1, 32 | "Aivar Grislis" => 1, 33 | "Albert Cardona" => 1, 34 | "Barry DeZonia" => 1, 35 | "Benjamin Nanes" => 1, 36 | "Curtis Rueden" => 1, 37 | "Daniel Seebacher" => 1, 38 | "Gabriel Landini" => 1, 39 | "Grant Harris" => 1, 40 | "Johannes Schindelin" => 1, 41 | "Lee Kamentsky" => 1, 42 | "Mark Hiner" => 1, 43 | "Rick Lentz" => 1, 44 | "Stephan Preibisch" => 1, 45 | "Stephan Saalfeld" => 1, 46 | "Wayne Rasband" => 1, 47 | 48 | "Jarek Sacha" => 1, 49 | "Jay Warrick" => 1, 50 | "Melinda Green" => 1, 51 | "Sean Luke" => 1, 52 | "Sumit Dubey" => 1, 53 | "Werner Randelshofer" => 1, 54 | "Yap Chin Kiet" => 1, 55 | ); 56 | 57 | # parse command line arguments 58 | my @args; 59 | if (scalar @ARGV == 0) { 60 | @args = ('.'); 61 | } 62 | else { 63 | @args = @ARGV; 64 | } 65 | 66 | # read copyright file 67 | my @copyright = readFile("LICENSE.txt"); 68 | my $spacers = 0; 69 | for (my $i = 0; $i < @copyright; $i++) { 70 | if ($copyright[$i] eq '') { 71 | if ($spacers < 2) { 72 | $copyright[$i] = '%%'; 73 | $spacers++; 74 | } 75 | } 76 | $copyright[$i] = ' * ' . $copyright[$i]; 77 | } 78 | push(@copyright, ' * #L%'); 79 | push(@copyright, ' */'); 80 | push(@copyright, ''); 81 | 82 | # find source files 83 | my $cmd = "find @args -name '*.java'"; 84 | my @src = `$cmd`; 85 | 86 | # process files 87 | my $rval = 0; 88 | for my $file (@src) { 89 | chop $file; 90 | my $result = process($file); 91 | if ($result) { $rval = $result; } 92 | } 93 | 94 | exit $rval; 95 | 96 | sub process($) { 97 | my ($file) = @_; 98 | 99 | my $dir = `dirname "$file"`; 100 | chop $dir; 101 | my $base = `basename "$file"`; 102 | chop $base; 103 | my $class = substr($base, 0, length($base) - 5); 104 | 105 | # read in source file 106 | my @data = readFile($file); 107 | 108 | # check header comment 109 | my $i = 0; 110 | my @header = ('/*', ' * #%L'); 111 | if (!match(\@header, \@data, $i)) { 112 | print "$file: invalid header\n"; 113 | return INVALID_HEADER; 114 | } 115 | $i += @header; 116 | 117 | # skip past copyright comment 118 | while ($data[$i] =~ /^ * /) { $i++; } 119 | if ($data[$i] ne "") { 120 | print "$file: invalid copyright: line $i is not empty\n"; 121 | return INVALID_COPYRIGHT; 122 | } 123 | 124 | # check for optional additional comments 125 | my $blank = 0; 126 | while (1) { 127 | if ($data[$i] =~ /^\/\//) { 128 | # single line comments are OK; continue 129 | $blank = 0; 130 | } 131 | elsif ($data[$i] =~ /^\/\*/) { 132 | # multi-line comments are OK; search for end of comment 133 | while ($i < @data && $data[$i++] !~ /\*\//) { } 134 | $blank = 0; 135 | } 136 | elsif ($data[$i] =~ /^\s*$/) { 137 | if ($blank) { 138 | print "$file: duplicate blank line at line #$i\n"; 139 | return DUPLICATE_BLANK_LINE; 140 | } 141 | $blank = 1; 142 | } 143 | else { 144 | # not an additional comment; move on 145 | last; 146 | } 147 | $i++; 148 | } 149 | 150 | # check package statement 151 | if ($data[$i++] !~ /^package .*;$/) { 152 | print "$file: invalid package\n"; 153 | return INVALID_PACKAGE; 154 | } 155 | 156 | # check blank line following package statement 157 | if ($data[$i++] !~ /^$/) { 158 | print "$file: no post-package blank line\n"; 159 | return MISSING_BLANK_LINE; 160 | } 161 | 162 | # check import statements 163 | $blank = 0; 164 | while (1) { 165 | my $line = trim($data[$i++]); 166 | if ($line =~ /^$/) { 167 | if ($blank) { 168 | print "$file: duplicate blank line at line #$i\n"; 169 | return DUPLICATE_BLANK_LINE; 170 | } 171 | $blank = 1; 172 | } 173 | else { 174 | $blank = 0; 175 | if ($line eq '/**') { 176 | last; 177 | } 178 | elsif ($line !~ /\/\// && $line !~ /^import /) { 179 | print "$file: unexpected text at line #$i\n"; 180 | return UNEXPECTED_TEXT; 181 | } 182 | } 183 | } 184 | 185 | if ($data[$i] !~ /^ \* [^\s@]/) { 186 | print "$file: malformed class comment at line #$i\n"; 187 | return MALFORMED_CLASS_COMMENT; 188 | } 189 | 190 | # check class comment 191 | my $author = 0; 192 | while (1) { 193 | my $line = $data[$i++]; 194 | if ($line eq ' */') { 195 | last; 196 | } 197 | if ($line !~ /^ \* ?/) { 198 | print "$file: malformed class comment at line #$i\n"; 199 | return MALFORMED_CLASS_COMMENT; 200 | } 201 | if ($line =~ /^ \* \@author (.*)$/) { 202 | my $authorName = $1; 203 | if (!exists($knownAuthors{$authorName})) { 204 | print "$file: unknown author: $authorName\n"; 205 | return UNKNOWN_AUTHOR; 206 | } 207 | $author = 1; 208 | } 209 | } 210 | 211 | if (!$author) { 212 | print "$file: missing author tag\n"; 213 | return MISSING_AUTHOR_TAG; 214 | } 215 | 216 | # skip annotations 217 | while ($data[$i] =~ /^\@/ || $data[$i] =~ /^\t/) { 218 | $i++; 219 | } 220 | 221 | # check type declaration 222 | my $keywords = '(public )?(abstract )?(final )?(strictfp )?'; 223 | if ($data[$i++] !~ /^$keywords(class)|(enum)|(interface) $class[ <]/) { 224 | print "$file: invalid type declaration at line #$i\n"; 225 | return INVALID_TYPE_DECLARATION; 226 | } 227 | 228 | # all OK 229 | return OK; 230 | } 231 | 232 | sub match($$$) { 233 | my ($tRef, $dRef, $index) = @_; 234 | my @template = @$tRef; 235 | my @data = @$dRef; 236 | 237 | my $i = $index; 238 | my $result = 1; 239 | for my $expected (@template) { 240 | my $actual = $data[$i++]; 241 | if ($actual ne $expected) { 242 | $result = 0; 243 | last; 244 | } 245 | } 246 | return $result; 247 | } 248 | 249 | sub readFile($) { 250 | my ($file) = @_; 251 | open FILE, "$file" or die "$file: $!"; 252 | my @data = ; 253 | close(FILE); 254 | for my $line (@data) { 255 | chop $line; 256 | } 257 | return @data; 258 | } 259 | 260 | sub trim($) { 261 | my ($line) = @_; 262 | $line =~ s/^\s*//; 263 | $line =~ s/\s*$//; 264 | return $line; 265 | } 266 | -------------------------------------------------------------------------------- /bin/gen-graphs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # gen-graphs.sh 5 | # 6 | 7 | # Script to generate ImageJ dependency graphs using maven-graph-plugin. 8 | # Called automatically by Jenkins during the ImageJ-daily job. 9 | # Requires graphviz to be installed. 10 | 11 | # Usage: bin/gen-graphs.sh 12 | 13 | set -e 14 | 15 | ROOT=`cd "$(dirname $0)/.." ; pwd` 16 | cd "$ROOT" 17 | 18 | GRAPH_CMD=" 19 | dot 20 | -Gnodesep=0.3 21 | -Goverlap=scale 22 | -Gsplines=true 23 | -Gepsilon=0.0001 24 | -Tjpg 25 | -o dependency-graph.jpg 26 | dependency-graph.dot 27 | " 28 | 29 | mvn graph:reactor 30 | cd target && $GRAPH_CMD 31 | -------------------------------------------------------------------------------- /bin/populate-app.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd "$(dirname "$0")/.." && 4 | if test ! -d ImageJ2.app 5 | then 6 | mvn -Papp -Ppopulate-app "$@" 7 | else 8 | mvn -Papp "$@" && 9 | VERSION="$(sed -n 's/^.\(.*\)<\/version>.*/\1/p' < pom.xml)" && 10 | ZIP=target/imagej-$VERSION-application.zip && 11 | unzip -o $ZIP && 12 | contents="$(unzip -l $ZIP | sed -n 's/^.*\(ImageJ2.app\/.*[^\/]\)$/\1/p')" && 13 | possibly_obsoletes="$(printf "%s\n%s\n%s" \ 14 | "$contents" "$contents" "$(find ImageJ2.app -type f)" | 15 | grep -ve /.checksums$ -e /db.xml.gz -e ^ImageJ2.app/samples/ \ 16 | -e /tools-1.4.2.jar$ -e /ImageJ2.desktop$ | 17 | sort | uniq -u)" && 18 | if test -n "$possibly_obsoletes" 19 | then 20 | printf "The following files might be outdated:\n\n%s\nDo you want to delete them? " \ 21 | "$possibly_obsoletes" && 22 | read line && 23 | case "$line" in 24 | y*|Y*) 25 | echo "$possibly_obsoletes" | 26 | tr '\n' '\0' | 27 | xargs -0 rm 28 | ;; 29 | esac 30 | fi 31 | fi && 32 | for jar in ImageJ2.app/jars/*.jar 33 | do 34 | if test -n "$(unzip -p $jar \*pom.properties 2> /dev/null | 35 | grep "^#Generated by" | grep Eclipse)" 36 | then 37 | echo "WARNING: built by Eclipse: $jar" 38 | fi 39 | done 40 | -------------------------------------------------------------------------------- /bin/trigger-jenkins-deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | usage () { 4 | test $# = 0 || echo "$*" >&2 5 | cat >&2 << EOF 6 | Usage: $ARGV0 [...] (launcher|app) [] 7 | 8 | Use this script to trigger Jenkins to build and deploy ImageJ. It will 9 | push the current commit to GitHub, under a temporary branchname, and 10 | then tell Jenkins to go ahead. After a successful deployment, you can 11 | remove that temporary branch from the repository. 12 | 13 | Choose whether to build and deploy the ImageJ launcher ('launcher') or 14 | ImageJ release itself ('app'). 15 | 16 | The token must match the secret stored in the Jenkins job. 17 | 18 | If no branch name is provided, a temporary one is generated from the 19 | current time. 20 | 21 | Options: 22 | 23 | --no-push Do not push the branch but assume it was already pushed. 24 | EOF 25 | exit 1 26 | } 27 | 28 | ARGV0=$0 29 | 30 | NO_PUSH= 31 | while test $# -gt 0 32 | do 33 | case "$1" in 34 | --no-push) 35 | NO_PUSH=t 36 | ;; 37 | -*) 38 | usage "Unknown option: $1" 39 | ;; 40 | *) 41 | break 42 | ;; 43 | esac 44 | shift 45 | done 46 | 47 | case $# in [23]) ;; *) usage;; esac 48 | 49 | case "$1" in 50 | launcher) 51 | JOB=ImageJ-launcher 52 | ;; 53 | app) 54 | JOB=ImageJ-release-build 55 | ;; 56 | *) 57 | usage "Unknown project: $1" 58 | ;; 59 | esac 60 | 61 | TOKEN="$2" 62 | 63 | if test $# -lt 3 64 | then 65 | BRANCHNAME=tmp-$(date +%Y%m%d%H%M%S) 66 | else 67 | BRANCHNAME="$3" 68 | fi 69 | 70 | # make sure the branch is pushed 71 | test -n "$NO_PUSH" || 72 | git push github.com:imagej/imagej HEAD:refs/heads/$BRANCHNAME 73 | 74 | # trigger the build 75 | curl "http://jenkins.imagej.net/job/$JOB/buildWithParameters?token=$TOKEN&branch=$BRANCHNAME" 76 | 77 | cat << EOF 78 | Jenkins should build $JOB now: 79 | 80 | http://jenkins.imagej.net/job/$JOB/ 81 | 82 | Upon success, you may want to delete the temporary branch: 83 | 84 | git push github.com:imagej/imagej :$BRANCHNAME 85 | EOF 86 | -------------------------------------------------------------------------------- /logo/128x128-flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/128x128-flat.png -------------------------------------------------------------------------------- /logo/128x128-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/128x128-shadow.png -------------------------------------------------------------------------------- /logo/16x16-flat-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/16x16-flat-gray.png -------------------------------------------------------------------------------- /logo/16x16-flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/16x16-flat.png -------------------------------------------------------------------------------- /logo/16x16-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/16x16-shadow.png -------------------------------------------------------------------------------- /logo/256x256-flat-gray-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | 16 | 25 | 27 | 31 | 35 | 36 | 45 | 47 | 51 | 55 | 56 | 65 | 74 | 83 | 84 | 86 | 87 | 89 | image/svg+xml 90 | 92 | 93 | 94 | 95 | 96 | 99 | 103 | 109 | 113 | 121 | 129 | 133 | 141 | 149 | 153 | 161 | 170 | 174 | 182 | 186 | 187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /logo/256x256-flat-gray-square.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | 16 | 25 | 27 | 31 | 35 | 36 | 45 | 47 | 51 | 55 | 56 | 65 | 74 | 83 | 84 | 86 | 87 | 89 | image/svg+xml 90 | 92 | 93 | 94 | 95 | 96 | 99 | 103 | 111 | 115 | 123 | 131 | 135 | 143 | 151 | 155 | 163 | 172 | 176 | 184 | 188 | 189 | 190 | 191 | 192 | -------------------------------------------------------------------------------- /logo/256x256-flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/256x256-flat.png -------------------------------------------------------------------------------- /logo/256x256-shadow-gray-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | 16 | 21 | 26 | 32 | 37 | 42 | 48 | 49 | 58 | 60 | 64 | 68 | 69 | 78 | 80 | 84 | 88 | 89 | 98 | 107 | 116 | 117 | 119 | 120 | 122 | image/svg+xml 123 | 125 | 126 | 127 | 128 | 129 | 132 | 136 | 142 | 146 | 154 | 162 | 166 | 174 | 182 | 186 | 194 | 203 | 207 | 215 | 219 | 220 | 221 | 222 | 223 | -------------------------------------------------------------------------------- /logo/256x256-shadow-gray-square.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 28 | 33 | 39 | 44 | 49 | 55 | 56 | 66 | 69 | 73 | 77 | 78 | 88 | 91 | 95 | 99 | 100 | 110 | 120 | 130 | 131 | 150 | 152 | 153 | 155 | image/svg+xml 156 | 158 | 159 | 160 | 161 | 162 | 167 | 171 | 179 | 185 | 196 | 207 | 222 | 233 | 244 | 259 | 270 | 282 | 297 | 308 | 323 | 324 | 325 | 326 | 327 | -------------------------------------------------------------------------------- /logo/256x256-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/256x256-shadow.png -------------------------------------------------------------------------------- /logo/32x32-flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/32x32-flat.png -------------------------------------------------------------------------------- /logo/32x32-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/32x32-shadow.png -------------------------------------------------------------------------------- /logo/64x64-flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/64x64-flat.png -------------------------------------------------------------------------------- /logo/64x64-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/64x64-shadow.png -------------------------------------------------------------------------------- /logo/ImageJ2.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/ImageJ2.icns -------------------------------------------------------------------------------- /logo/imagej2-v1/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/imagej2-v1/128x128.png -------------------------------------------------------------------------------- /logo/imagej2-v1/16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/imagej2-v1/16x16.png -------------------------------------------------------------------------------- /logo/imagej2-v1/256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/imagej2-v1/256x256.png -------------------------------------------------------------------------------- /logo/imagej2-v1/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/imagej2-v1/32x32.png -------------------------------------------------------------------------------- /logo/imagej2-v1/512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/imagej2-v1/512x512.png -------------------------------------------------------------------------------- /logo/imagej2-v1/64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/imagej2-v1/64x64.png -------------------------------------------------------------------------------- /logo/imagej2-v1/ImageJ2-v1.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/imagej2-v1/ImageJ2-v1.icns -------------------------------------------------------------------------------- /logo/imagej2-v1/imagej2-v1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/imagej2-v1/imagej2-v1.ico -------------------------------------------------------------------------------- /logo/imagej2-v1/imagej2-v1.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/imagej2-v1/imagej2-v1.psd -------------------------------------------------------------------------------- /logo/imagej2-v1/microscope.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/imagej2-v1/microscope.jpg -------------------------------------------------------------------------------- /logo/imagej2-v1/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains ImageJ2's logos and icons 2 | from prior to the adoption of its current logo. 3 | 4 | The microscope in the logo was based on a photograph of a Bausch + Lomb 5 | optical microscope from the UW Microscopy Museum collection at LOCI. 6 | 7 | The photograph was taken by Johannes Schindelin and Curtis Rueden, 8 | and reworked into cartoon form by Adam Fraser. 9 | -------------------------------------------------------------------------------- /logo/imagej2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/imagej2.ico -------------------------------------------------------------------------------- /logo/logo_runner-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/logo_runner-up.png -------------------------------------------------------------------------------- /logo/logo_winner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/logo_winner.png -------------------------------------------------------------------------------- /logo/original/ImageJ.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/original/ImageJ.icns -------------------------------------------------------------------------------- /logo/original/imagej-128.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/original/imagej-128.ico -------------------------------------------------------------------------------- /logo/original/imagej-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/original/imagej-128.png -------------------------------------------------------------------------------- /logo/original/imagej-16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/original/imagej-16.ico -------------------------------------------------------------------------------- /logo/original/imagej-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/original/imagej-16.png -------------------------------------------------------------------------------- /logo/original/imagej-32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/original/imagej-32.ico -------------------------------------------------------------------------------- /logo/original/imagej-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/original/imagej-32.png -------------------------------------------------------------------------------- /logo/original/imagej-48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/original/imagej-48.ico -------------------------------------------------------------------------------- /logo/original/imagej-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/original/imagej-48.png -------------------------------------------------------------------------------- /logo/original/imagej-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/original/imagej-64.png -------------------------------------------------------------------------------- /logo/original/imagej-logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/logo/original/imagej-logo.gif -------------------------------------------------------------------------------- /logo/original/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains logos and icons for the original ImageJ. 2 | 3 | The ImageJ icon is based on a photograph by Tom Grill 4 | (https://www.tomgrill.com/) of a Hartnack microscope, circa 1870's: 5 | http://www.arsmachina.com/s-hart1209.htm 6 | 7 | The ImageJ logo (imagej-logo.gif) was created using a macro: 8 | https://imagej.nih.gov/ij/macros/MakeImageJLogo.txt 9 | -------------------------------------------------------------------------------- /logo/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains logos and icons for ImageJ2. 2 | 3 | This logo is based on the logo contest winner by Jan Eglinger. 4 | The color selection was inspired by the logo contest runner-up Dave Williamson. 5 | 6 | logo_winner.png - Original winning logo design by Jan Eglinger. 7 | logo_runner-up.png - Original runner-up logo design by Dav Williamson. 8 | ImageJ2.svg - Source inkscape file used to generate the logo. 9 | *-flat.png - Flat logo scaled to various sizes, with transparency. 10 | *-shadow.png - Drop shadow logo scaled to various sizes, with transparency. 11 | 12 | Also included are several .svg images that contain different examples of how the 13 | logo could be represented on different backgrounds. 14 | 15 | For the original ImageJ's logos and icons, see the original subdirectory. 16 | For the first version of the ImageJ2 logo, see the imagej2-v1 subdirectory. 17 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.scijava 7 | pom-scijava 8 | 39.0.0 9 | 10 | 11 | 12 | net.imagej 13 | imagej 14 | 2.16.1-SNAPSHOT 15 | 16 | ImageJ2 17 | ImageJ2 is a rewrite of ImageJ for multidimensional image data, with a focus on scientific imaging. 18 | https://imagej.net/ 19 | 2009 20 | 21 | ImageJ 22 | https://imagej.net/ 23 | 24 | 25 | 26 | Simplified BSD License 27 | repo 28 | 29 | 30 | 31 | 32 | 33 | ctrueden 34 | Curtis Rueden 35 | https://imagej.net/people/ctrueden 36 | 37 | founder 38 | lead 39 | developer 40 | debugger 41 | reviewer 42 | support 43 | maintainer 44 | 45 | 46 | 47 | hinerm 48 | Mark Hiner 49 | https://imagej.net/people/hinerm 50 | 51 | developer 52 | debugger 53 | reviewer 54 | support 55 | maintainer 56 | 57 | 58 | 59 | 60 | 61 | Johannes Schindelin 62 | https://imagej.net/people/dscho 63 | dscho 64 | 65 | 66 | Barry DeZonia 67 | https://imagej.net/people/bdezonia 68 | bdezonia 69 | founder 70 | 71 | 72 | Grant Harris 73 | https://imagej.net/people/tnargsirrah 74 | tnargsirrah 75 | founder 76 | 77 | 78 | Matthias Arzt 79 | https://imagej.net/people/maarzt 80 | maarzt 81 | 82 | 83 | Tim-Oliver Buchholz 84 | https://imagej.net/people/tibuch 85 | tibuch 86 | 87 | 88 | Albert Cardona 89 | https://imagej.net/people/acardona 90 | acardona 91 | 92 | 93 | Christian Dietz 94 | https://imagej.net/people/dietzc 95 | dietzc 96 | 97 | 98 | Ellen TA Dobson 99 | https://imagej.net/people/etadobson 100 | etadobson 101 | 102 | 103 | Richard Domander 104 | https://imagej.net/people/rimadoma 105 | rimadoma 106 | 107 | 108 | Jan Eglinger 109 | https://imagej.net/people/imagejan 110 | imagejan 111 | 112 | 113 | Niko Ehrenfeuchter 114 | https://imagej.net/people/ehrenfeu 115 | ehrenfeu 116 | 117 | 118 | Gabriel Einsdorf 119 | https://imagej.net/people/gab1one 120 | gab1one 121 | 122 | 123 | Tiago Ferreira 124 | https://imagej.net/people/tferr 125 | tferr 126 | 127 | 128 | Henrik Grimler 129 | Grimler91 130 | 131 | 132 | Aivar Grislis 133 | https://imagej.net/people/grislis 134 | grislis 135 | 136 | 137 | Robert Haase 138 | https://imagej.net/people/haesleinhuepf 139 | haesleinhuepf 140 | 141 | 142 | Kyle Harrington 143 | https://imagej.net/people/kephale 144 | kephale 145 | 146 | 147 | Stefan Helfrich 148 | https://imagej.net/people/stelfrich 149 | stelfrich 150 | 151 | 152 | Martin Horn 153 | https://imagej.net/people/hornm 154 | hornm 155 | 156 | 157 | Florian Jug 158 | https://imagej.net/people/fjug 159 | fjug 160 | 161 | 162 | Lee Kamentsky 163 | https://imagej.net/people/LeeKamentsky 164 | LeeKamentsky 165 | 166 | 167 | Rick Lentz 168 | https://imagej.net/people/ricklentz 169 | ricklentz 170 | 171 | 172 | Mark Longair 173 | https://imagej.net/people/mhl 174 | mhl 175 | 176 | 177 | Hadrien Mary 178 | https://imagej.net/people/hadim 179 | hadim 180 | 181 | 182 | Matt McCormick 183 | https://imagej.net/people/thewtex 184 | thewtex 185 | 186 | 187 | Cyril Mongis 188 | https://imagej.net/people/cmongis 189 | cmongis 190 | 191 | 192 | Josh Moore 193 | https://imagej.net/joshmoore 194 | joshmoore 195 | 196 | 197 | Benjamin Nanes 198 | https://imagej.net/bnanes 199 | bnanes 200 | 201 | 202 | Brian Northan 203 | https://imagej.net/people/bnorthan 204 | bnorthan 205 | 206 | 207 | Tobias Pietzsch 208 | https://imagej.net/people/tpietzsch 209 | tpietzsch 210 | 211 | 212 | David Pinto 213 | https://imagej.net/people/carandraug 214 | carandraug 215 | 216 | 217 | Stephan Preibisch 218 | https://imagej.net/people/StephanPreibisch 219 | StephanPreibisch 220 | 221 | 222 | Wayne Rasband 223 | https://imagej.net/people/rasband 224 | rasband 225 | 226 | 227 | Stephan Saalfeld 228 | https://imagej.net/people/axtimwalde 229 | axtimwalde 230 | 231 | 232 | Deborah Schmidt 233 | https://imagej.net/frauzufall 234 | frauzufall 235 | 236 | 237 | Jean-Yves Tinevez 238 | https://imagej.net/people/tinevez 239 | tinevez 240 | 241 | 242 | Gabriella Turek 243 | https://imagej.net/people/turekg 244 | turekg 245 | 246 | 247 | Alison Walter 248 | https://imagej.net/people/awalter17 249 | awalter17 250 | 251 | 252 | Benjamin Wilhelm 253 | https://imagej.net/people/HedgehogCode 254 | HedgehogCode 255 | 256 | 257 | Leon Yang 258 | https://imagej.net/people/lnyng 259 | lnyng 260 | 261 | 262 | 263 | 264 | 265 | Image.sc Forum 266 | https://forum.image.sc/tag/imagej 267 | 268 | 269 | 270 | 271 | scm:git:https://github.com/imagej/imagej2 272 | scm:git:git@github.com:imagej/imagej2 273 | HEAD 274 | https://github.com/imagej/imagej2 275 | 276 | 277 | GitHub Issues 278 | https://github.com/imagej/imagej2/issues 279 | 280 | 281 | GitHub Actions 282 | https://github.com/imagej/imagej2/actions 283 | 284 | 285 | 286 | net.imagej.Main 287 | net.imagej 288 | 289 | bsd_2 290 | ImageJ2 developers. 291 | ImageJ2 software for multidimensional image processing and analysis. 292 | 293 | 294 | sign,deploy-to-scijava 295 | 296 | 297 | 298 | 299 | 300 | net.imagej 301 | imagej-common 302 | 303 | 304 | net.imagej 305 | imagej-launcher 306 | 307 | 308 | net.imagej 309 | imagej-notebook 310 | 311 | 312 | net.imagej 313 | imagej-ops 314 | 315 | 316 | net.imagej 317 | imagej-updater 318 | 319 | 320 | 321 | 322 | io.scif 323 | scifio 324 | 325 | 326 | 327 | 328 | org.scijava 329 | scijava-common 330 | 331 | 332 | 333 | 334 | net.imagej 335 | imagej-deprecated 336 | runtime 337 | 338 | 339 | net.imagej 340 | imagej-legacy 341 | runtime 342 | true 343 | 344 | 345 | net.imagej 346 | imagej-mesh-io 347 | runtime 348 | 349 | 350 | net.imagej 351 | imagej-plugins-batch 352 | runtime 353 | 354 | 355 | net.imagej 356 | imagej-plugins-commands 357 | runtime 358 | 359 | 360 | net.imagej 361 | imagej-plugins-tools 362 | runtime 363 | 364 | 365 | net.imagej 366 | imagej-plugins-uploader-ssh 367 | runtime 368 | 369 | 370 | net.imagej 371 | imagej-plugins-uploader-webdav 372 | runtime 373 | 374 | 375 | net.imagej 376 | imagej-scripting 377 | runtime 378 | 379 | 380 | net.imagej 381 | imagej-ui-swing 382 | runtime 383 | 384 | 385 | 386 | 387 | io.scif 388 | scifio-labeling 389 | runtime 390 | 391 | 392 | 393 | 394 | org.scijava 395 | scijava-io-http 396 | runtime 397 | 398 | 399 | org.scijava 400 | scijava-plugins-commands 401 | runtime 402 | 403 | 404 | org.scijava 405 | scijava-plugins-platforms 406 | runtime 407 | 408 | 409 | org.scijava 410 | scijava-plugins-text-markdown 411 | runtime 412 | 413 | 414 | org.scijava 415 | scijava-plugins-text-plain 416 | runtime 417 | 418 | 419 | org.scijava 420 | script-editor 421 | runtime 422 | 423 | 424 | org.scijava 425 | script-editor-jython 426 | runtime 427 | 428 | 429 | org.scijava 430 | script-editor-scala 431 | runtime 432 | 433 | 434 | 435 | 439 | 440 | org.scijava 441 | scijava-config 442 | runtime 443 | true 444 | 445 | 446 | 447 | 448 | junit 449 | junit 450 | test 451 | 452 | 453 | 454 | 455 | 456 | scijava.public 457 | https://maven.scijava.org/content/groups/public 458 | 459 | 460 | 461 | 462 | 463 | 464 | com.googlecode.maven-java-formatter-plugin 465 | maven-java-formatter-plugin 466 | 0.3.1 467 | 468 | ${basedir}/config/eclipse-code-formatter-profile.xml 469 | 470 | 471 | 472 | org.fusesource.mvnplugins 473 | maven-graph-plugin 474 | 475 | false 476 | 477 | 478 | 479 | 480 | 481 | 482 | 488 | 489 | alt-ui 490 | 491 | 492 | scijava.ui 493 | 494 | 495 | 496 | 497 | net.imagej 498 | imagej-ui-awt 499 | runtime 500 | 501 | 502 | 503 | 504 | 505 | org.codehaus.mojo 506 | exec-maven-plugin 507 | 508 | java 509 | 510 | -classpath 511 | 512 | -Dscijava.ui=${scijava.ui} 513 | ${main-class} 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 525 | 526 | swing 527 | 528 | 529 | !java.awt.headless 530 | 531 | 532 | 533 | 534 | 535 | 536 | 540 | 541 | app 542 | 543 | 544 | 545 | maven-assembly-plugin 546 | 547 | 548 | src/main/assembly/zip.xml 549 | 550 | imagej2-${project.version} 551 | 552 | 553 | 554 | make-assembly 555 | package 556 | 557 | single 558 | 559 | 560 | 561 | 562 | 563 | maven-dependency-plugin 564 | 565 | 566 | copy 567 | prepare-package 568 | 569 | copy 570 | 571 | 572 | 573 | 574 | ${project.groupId} 575 | imagej-launcher 576 | ${imagej-launcher.version} 577 | linux64 578 | exe 579 | ${project.build.directory}/ 580 | imagej-launcher-linux64 581 | 582 | 583 | ${project.groupId} 584 | imagej-launcher 585 | ${imagej-launcher.version} 586 | win32 587 | exe 588 | ${project.build.directory}/ 589 | imagej-launcher-win32.exe 590 | 591 | 592 | ${project.groupId} 593 | imagej-launcher 594 | ${imagej-launcher.version} 595 | win64 596 | exe 597 | ${project.build.directory}/ 598 | imagej-launcher-win64.exe 599 | 600 | 601 | ${project.groupId} 602 | imagej-launcher 603 | ${imagej-launcher.version} 604 | macosx 605 | exe 606 | ${project.build.directory}/ 607 | imagej-launcher-macosx 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 624 | 625 | deps 626 | 632 | 633 | 634 | net.imagej 635 | imagej 636 | ${project.version} 637 | sources 638 | 639 | 640 | 641 | 642 | net.imagej 643 | imagej-common 644 | ${imagej-common.version} 645 | sources 646 | 647 | 648 | net.imagej 649 | imagej-launcher 650 | ${imagej-launcher.version} 651 | sources 652 | 653 | 654 | net.imagej 655 | imagej-notebook 656 | ${imagej-notebook.version} 657 | sources 658 | 659 | 660 | net.imagej 661 | imagej-ops 662 | ${imagej-ops.version} 663 | sources 664 | 665 | 666 | net.imagej 667 | imagej-updater 668 | ${imagej-updater.version} 669 | sources 670 | 671 | 672 | 673 | 674 | io.scif 675 | scifio 676 | ${scifio.version} 677 | sources 678 | 679 | 680 | 681 | 682 | org.scijava 683 | scijava-common 684 | ${scijava-common.version} 685 | sources 686 | 687 | 688 | 689 | 690 | 691 | net.imagej 692 | imagej-legacy 693 | ${imagej-legacy.version} 694 | sources 695 | 696 | 697 | net.imagej 698 | imagej-mesh-io 699 | ${imagej-mesh-io.version} 700 | sources 701 | 702 | 703 | net.imagej 704 | imagej-plugins-batch 705 | ${imagej-plugins-batch.version} 706 | sources 707 | 708 | 709 | net.imagej 710 | imagej-plugins-commands 711 | ${imagej-plugins-commands.version} 712 | sources 713 | 714 | 715 | net.imagej 716 | imagej-plugins-tools 717 | ${imagej-plugins-tools.version} 718 | sources 719 | 720 | 721 | net.imagej 722 | imagej-plugins-uploader-ssh 723 | ${imagej-plugins-uploader-ssh.version} 724 | sources 725 | 726 | 727 | net.imagej 728 | imagej-plugins-uploader-webdav 729 | ${imagej-plugins-uploader-webdav.version} 730 | sources 731 | 732 | 733 | net.imagej 734 | imagej-scripting 735 | ${imagej-scripting.version} 736 | sources 737 | 738 | 739 | net.imagej 740 | imagej-ui-swing 741 | ${imagej-ui-swing.version} 742 | sources 743 | 744 | 745 | 746 | 747 | org.scijava 748 | scijava-io-http 749 | ${scijava-io-http.version} 750 | sources 751 | 752 | 753 | org.scijava 754 | scijava-plugins-commands 755 | ${scijava-plugins-commands.version} 756 | sources 757 | 758 | 759 | org.scijava 760 | scijava-plugins-platforms 761 | ${scijava-plugins-platforms.version} 762 | sources 763 | 764 | 765 | org.scijava 766 | scijava-plugins-text-markdown 767 | ${scijava-plugins-text-markdown.version} 768 | sources 769 | 770 | 771 | org.scijava 772 | scijava-plugins-text-plain 773 | ${scijava-plugins-text-plain.version} 774 | sources 775 | 776 | 777 | org.scijava 778 | script-editor 779 | ${script-editor.version} 780 | sources 781 | 782 | 783 | org.scijava 784 | script-editor-jython 785 | ${script-editor-jython.version} 786 | sources 787 | 788 | 789 | org.scijava 790 | script-editor-scala 791 | ${script-editor-scala.version} 792 | sources 793 | 794 | 795 | 796 | 797 | org.scijava 798 | scijava-config 799 | ${scijava-config.version} 800 | sources 801 | 802 | 803 | 804 | 805 | 806 | maven-dependency-plugin 807 | 808 | 809 | copy-dependencies 810 | prepare-package 811 | 812 | copy-dependencies 813 | 814 | 815 | 816 | 817 | 818 | org.codehaus.mojo 819 | exec-maven-plugin 820 | 821 | org.scijava.util.MetaInfCombiner 822 | 823 | ${basedir}/target/assembly/all/ 824 | 825 | 826 | 827 | 828 | package 829 | 830 | java 831 | 832 | 833 | 834 | 835 | 836 | maven-assembly-plugin 837 | 838 | 839 | src/main/assembly/all.xml 840 | 841 | imagej-${project.version} 842 | 843 | 844 | ${main-class} 845 | 846 | 847 | 848 | 849 | 850 | make-assembly 851 | package 852 | 853 | single 854 | 855 | 856 | 857 | 858 | 859 | maven-enforcer-plugin 860 | 861 | 862 | 863 | 864 | ${project.groupId}:${project.artifactId} 865 | 866 | 867 | 868 | 869 | 870 | 884 | false 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | populate-app 893 | 894 | 895 | 896 | maven-assembly-plugin 897 | 898 | 899 | src/main/assembly/dir.xml 900 | 901 | ImageJ2.app 902 | ${basedir} 903 | false 904 | false 905 | 906 | 907 | 908 | make-assembly 909 | package 910 | 911 | single 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | only-eclipse 922 | 923 | 924 | m2e.version 925 | 926 | 927 | 928 | 929 | 930 | 934 | 935 | org.eclipse.m2e 936 | lifecycle-mapping 937 | 1.0.0 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | ${project.version} 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | org.apache.maven.plugins 957 | maven-dependency-plugin 958 | [2.0,) 959 | 960 | copy 961 | unpack 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | -------------------------------------------------------------------------------- /src/main/assembly/all.xml: -------------------------------------------------------------------------------- 1 | 29 | 33 | all 34 | 35 | jar 36 | 37 | false 38 | 39 | 40 | ${basedir}/target/assembly/all 41 | / 42 | 43 | 44 | 45 | 46 | / 47 | true 48 | 49 | 50 | META-INF/annotations/* 51 | META-INF/json/* 52 | META-INF/services/* 53 | 54 | 55 | runtime 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/assembly/application.xml: -------------------------------------------------------------------------------- 1 | 29 | 30 | 31 | 32 | 33 | 34 | ${project.basedir}/src/main/assembly/application 35 | 36 | 37 | 38 | 39 | 40 | ${basedir} 41 | 42 | 43 | LICENSE* 44 | NOTICE* 45 | README* 46 | WELCOME* 47 | about/* 48 | luts/* 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | jars 58 | ${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension} 59 | false 60 | runtime 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | ${basedir}/logo/ImageJ2.icns 69 | Contents/Resources/ 70 | 71 | 72 | 73 | 74 | ${basedir}/logo/256x256-shadow.png 75 | images/ 76 | icon.png 77 | 78 | 79 | ${basedir}/logo/256x256-flat.png 80 | images/ 81 | icon-flat.png 82 | 83 | 84 | 85 | 86 | target/imagej-launcher-linux64 87 | ImageJ-linux64 88 | 0755 89 | 90 | 91 | target/imagej-launcher-macosx 92 | Contents/MacOS/ 93 | ImageJ-macosx 94 | 0755 95 | 96 | 97 | target/imagej-launcher-win32.exe 98 | ImageJ-win32.exe 99 | 0755 100 | 101 | 102 | target/imagej-launcher-win64.exe 103 | ImageJ-win64.exe 104 | 0755 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /src/main/assembly/application/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleAllowMixedLocalizations 6 | true 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleIdentifier 10 | net.imagej.ImageJ 11 | CFBundleDocumentTypes 12 | 13 | 14 | CFBundleTypeIconFile 15 | text.icns 16 | CFBundleTypeName 17 | ImageJ Document 18 | CFBundleTypeOSTypes 19 | 20 | **** 21 | 22 | CFBundleTypeRole 23 | Editor 24 | 25 | 26 | CFBundleExecutable 27 | ImageJ-macosx 28 | CFBundleGetInfoString 29 | http://imagej.net/ 30 | CFBundleIconFile 31 | ImageJ.icns 32 | CFBundleInfoDictionaryVersion 33 | 6.0 34 | CFBundleName 35 | ImageJ 36 | CFBundlePackageType 37 | APPL 38 | CFBundleSignature 39 | imgJ 40 | CFBundleVersion 41 | 10.2 42 | LSArchitecturePriority 43 | 44 | x86_64 45 | i386 46 | ppc64 47 | ppc 48 | 49 | NSPrincipalClass 50 | NSApplication 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/main/assembly/application/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPLimgJ -------------------------------------------------------------------------------- /src/main/assembly/application/plugins/readme.txt: -------------------------------------------------------------------------------- 1 | User plugins go here. 2 | -------------------------------------------------------------------------------- /src/main/assembly/dir.xml: -------------------------------------------------------------------------------- 1 | 29 | 33 | dir 34 | 35 | dir 36 | 37 | 38 | 39 | src/main/assembly/application.xml 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/main/assembly/zip.xml: -------------------------------------------------------------------------------- 1 | 29 | 33 | application 34 | 35 | zip 36 | 37 | ImageJ2.app 38 | 39 | src/main/assembly/application.xml 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/main/deploy/package/macosx/ImageJ-volume.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/src/main/deploy/package/macosx/ImageJ-volume.icns -------------------------------------------------------------------------------- /src/main/deploy/package/macosx/ImageJ.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/src/main/deploy/package/macosx/ImageJ.icns -------------------------------------------------------------------------------- /src/main/deploy/package/windows/ImageJ.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imagej/imagej2/05b46e61b16588dbea0c5cf4018996e595cac99e/src/main/deploy/package/windows/ImageJ.ico -------------------------------------------------------------------------------- /src/main/java/net/imagej/ImageJ.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImageJ2 software for multidimensional image processing and analysis. 4 | * %% 5 | * Copyright (C) 2009 - 2024 ImageJ2 developers. 6 | * %% 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | * #L% 28 | */ 29 | 30 | package net.imagej; 31 | 32 | import io.scif.SCIFIO; 33 | import io.scif.SCIFIOService; 34 | 35 | import net.imagej.animation.AnimationService; 36 | import net.imagej.app.ImageJApp; 37 | import net.imagej.display.ImageDisplayService; 38 | import net.imagej.display.OverlayService; 39 | import net.imagej.display.ScreenCaptureService; 40 | import net.imagej.display.WindowService; 41 | import net.imagej.lut.LUTService; 42 | import net.imagej.notebook.NotebookService; 43 | import net.imagej.ops.OpService; 44 | import net.imagej.render.RenderingService; 45 | import net.imagej.sampler.SamplerService; 46 | import net.imagej.updater.UpdateService; 47 | import net.imagej.updater.UploaderService; 48 | 49 | import org.scijava.AbstractGateway; 50 | import org.scijava.Context; 51 | import org.scijava.Gateway; 52 | import org.scijava.plugin.Plugin; 53 | import org.scijava.service.SciJavaService; 54 | 55 | /** 56 | * Main entry point into ImageJ2. This class enables working with ImageJ2 57 | * services in a simple way, while retaining extensibility (i.e., access to 58 | * third-party services). 59 | * 60 | * @author Curtis Rueden 61 | */ 62 | @Plugin(type = Gateway.class) 63 | public class ImageJ extends AbstractGateway { 64 | 65 | /** SCIFIO gateway instance, for access to SCIFIO services. */ 66 | private SCIFIO scifio; 67 | 68 | // -- Constructors -- 69 | 70 | /** 71 | * Creates a new application context with all ImageJ2, SCIFIO and SciJava 72 | * services. 73 | */ 74 | public ImageJ() { 75 | this(new Context(SciJavaService.class, SCIFIOService.class, 76 | ImageJService.class)); 77 | } 78 | 79 | /** 80 | * Creates a new application context which wraps the given existing SciJava 81 | * context. 82 | * 83 | * @see Context 84 | */ 85 | public ImageJ(final Context context) { 86 | super(ImageJApp.NAME, context); 87 | scifio = new SCIFIO(context); 88 | } 89 | 90 | // -- ImageJ methods - gateways -- 91 | 92 | public SCIFIO scifio() { 93 | return scifio; 94 | } 95 | 96 | // -- ImageJ methods - services -- 97 | 98 | /** 99 | * Gets this application context's {@link AnimationService}. 100 | * 101 | * @return The {@link AnimationService} of this application context. 102 | */ 103 | public AnimationService animation() { 104 | return get(AnimationService.class); 105 | } 106 | 107 | /** 108 | * Gets this application context's {@link DatasetService}. 109 | * 110 | * @return The {@link DatasetService} of this application context. 111 | */ 112 | public DatasetService dataset() { 113 | return get(DatasetService.class); 114 | } 115 | 116 | /** 117 | * Gets this application context's {@link ImageDisplayService}. 118 | * 119 | * @return The {@link ImageDisplayService} of this application context. 120 | */ 121 | public ImageDisplayService imageDisplay() { 122 | return get(ImageDisplayService.class); 123 | } 124 | 125 | /** 126 | * Gets this application context's {@link LUTService}. 127 | * 128 | * @return The {@link LUTService} of this application context. 129 | */ 130 | public LUTService lut() { 131 | return get(LUTService.class); 132 | } 133 | 134 | /** 135 | * Gets this application context's {@link NotebookService}. 136 | * 137 | * @return The {@link NotebookService} of this application context. 138 | */ 139 | public NotebookService notebook() { 140 | return get(NotebookService.class); 141 | } 142 | 143 | /** 144 | * Gets this application context's {@link OpService}. 145 | * 146 | * @return The {@link OpService} of this application context. 147 | */ 148 | public OpService op() { 149 | return get(OpService.class); 150 | } 151 | 152 | /** 153 | * Gets this application context's {@link OverlayService}. 154 | * 155 | * @return The {@link OverlayService} of this application context. 156 | */ 157 | public OverlayService overlay() { 158 | return get(OverlayService.class); 159 | } 160 | 161 | /** 162 | * Gets this application context's {@link RenderingService}. 163 | * 164 | * @return The {@link RenderingService} of this application context. 165 | */ 166 | public RenderingService rendering() { 167 | return get(RenderingService.class); 168 | } 169 | 170 | /** 171 | * Gets this application context's {@link SamplerService}. 172 | * 173 | * @return The {@link SamplerService} of this application context. 174 | */ 175 | public SamplerService sampler() { 176 | return get(SamplerService.class); 177 | } 178 | 179 | /** 180 | * Gets this application context's {@link ScreenCaptureService}. 181 | * 182 | * @return The {@link ScreenCaptureService} of this application context. 183 | */ 184 | public ScreenCaptureService screenCapture() { 185 | return get(ScreenCaptureService.class); 186 | } 187 | 188 | /** 189 | * Gets this application context's {@link UpdateService}. 190 | * 191 | * @return The {@link UpdateService} of this application context. 192 | */ 193 | public UpdateService update() { 194 | return get(UpdateService.class); 195 | } 196 | 197 | /** 198 | * Gets this application context's {@link UploaderService}. 199 | * 200 | * @return The {@link UploaderService} of this application context. 201 | */ 202 | public UploaderService uploader() { 203 | return get(UploaderService.class); 204 | } 205 | 206 | /** 207 | * Gets this application context's {@link WindowService}. 208 | * 209 | * @return The {@link WindowService} of this application context. 210 | */ 211 | public WindowService window() { 212 | return get(WindowService.class); 213 | } 214 | 215 | // -- Gateway methods -- 216 | 217 | @Override 218 | public String getShortName() { 219 | return "ij"; 220 | } 221 | } 222 | -------------------------------------------------------------------------------- /src/main/java/net/imagej/Main.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImageJ2 software for multidimensional image processing and analysis. 4 | * %% 5 | * Copyright (C) 2009 - 2024 ImageJ2 developers. 6 | * %% 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | * #L% 28 | */ 29 | 30 | package net.imagej; 31 | 32 | /** 33 | * Launches ImageJ. 34 | * 35 | * @author Curtis Rueden 36 | */ 37 | public final class Main { 38 | 39 | private Main() { 40 | // prevent instantiation of utility class 41 | } 42 | 43 | /** @deprecated Use {@link ImageJ#launch} instead. */ 44 | @Deprecated 45 | public static ImageJ launch(final String... args) { 46 | final ImageJ ij = new ImageJ(); 47 | ij.launch(args); 48 | return ij; 49 | } 50 | 51 | public static void main(final String... args) { 52 | final ImageJ ij = new ImageJ(); 53 | ij.launch(args); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/net/imagej/app/ToplevelImageJApp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImageJ2 software for multidimensional image processing and analysis. 4 | * %% 5 | * Copyright (C) 2009 - 2024 ImageJ2 developers. 6 | * %% 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | * #L% 28 | */ 29 | 30 | package net.imagej.app; 31 | 32 | import org.scijava.app.App; 33 | import org.scijava.log.LogService; 34 | import org.scijava.plugin.Parameter; 35 | import org.scijava.plugin.Plugin; 36 | import org.scijava.service.Service; 37 | 38 | /** 39 | * An extension of {@link ImageJApp} that provides the versions of both ImageJ2 40 | * and the original ImageJ, when {@link #getVersion()} is called. 41 | * 42 | * @author Curtis Rueden 43 | * @see org.scijava.app.AppService 44 | */ 45 | @Plugin(type = App.class, name = ImageJApp.NAME, 46 | priority = ImageJApp.PRIORITY + 1) 47 | public class ToplevelImageJApp extends ImageJApp { 48 | 49 | // NB: This app uses the same name as ImageJApp, but with a higher priority, 50 | // so that it takes precedence in the AppService. 51 | 52 | @Parameter(required = false) 53 | private LogService log; 54 | 55 | @Override 56 | public String getArtifactId() { 57 | return "imagej"; 58 | } 59 | 60 | @Override 61 | public String getVersion() { 62 | final String version = super.getVersion(); 63 | final String legacyVersion = getLegacyVersion(); 64 | return version + (legacyVersion == null ? "" : "/" + legacyVersion); 65 | } 66 | 67 | // -- Helper methods -- 68 | 69 | private String getLegacyVersion() { 70 | try { 71 | final Class c = Class.forName("net.imagej.legacy.LegacyService"); 72 | if (!Service.class.isAssignableFrom(c)) return null; // no imagej-legacy 73 | 74 | @SuppressWarnings("unchecked") 75 | final Class sc = (Class) c; 76 | 77 | final Service legacyService = getContext().getService(sc); 78 | if (legacyService == null) return null; // no LegacyService in context 79 | 80 | return legacyService.getVersion(); 81 | } 82 | catch (final ClassNotFoundException exc) { 83 | if (log != null) log.debug(exc); 84 | } 85 | return null; 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /src/test/java/net/imagej/app/MainTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImageJ2 software for multidimensional image processing and analysis. 4 | * %% 5 | * Copyright (C) 2009 - 2024 ImageJ2 developers. 6 | * %% 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | * #L% 28 | */ 29 | 30 | package net.imagej.app; 31 | 32 | import static org.junit.Assert.assertEquals; 33 | import static org.junit.Assert.assertTrue; 34 | 35 | import net.imagej.ImageJ; 36 | import net.imagej.ImageJService; 37 | import net.imagej.Main; 38 | 39 | import org.junit.Test; 40 | import org.scijava.plugin.Plugin; 41 | import org.scijava.service.AbstractService; 42 | import org.scijava.service.Service; 43 | 44 | /** 45 | * Tests {@link Main}. 46 | * 47 | * @author Curtis Rueden 48 | */ 49 | public class MainTest { 50 | 51 | /** Tests launching an alternate main method. */ 52 | @Test 53 | public void testMains() { 54 | final ImageJ ij = new ImageJ(); 55 | ij.launch("--main", Concatenate.class.getName(), "kung", "-", "fu"); 56 | assertEquals("kung-fu", Concatenate.s); 57 | final boolean headless = ij.ui().isHeadless(); 58 | assertEquals(headless, ij.get(LitmusService.class).isDisposed()); 59 | if (!headless) { 60 | // Since we didn't run headlessly we need to manually dispose the context 61 | ij.getContext().dispose(); 62 | } 63 | } 64 | 65 | /** 66 | * Tests that the {@link org.scijava.Context} is disposed after running 67 | * headlessly. 68 | */ 69 | @Test 70 | public void testHeadless() { 71 | final ImageJ ij = new ImageJ(); 72 | ij.launch("--headless"); 73 | assertTrue(ij.get(LitmusService.class).isDisposed()); 74 | } 75 | 76 | // -- Helper classes -- 77 | 78 | /** A service which knows whether it has been disposed yet. */ 79 | @Plugin(type = Service.class) 80 | public static class LitmusService extends AbstractService implements 81 | ImageJService 82 | { 83 | 84 | private boolean disposed; 85 | 86 | @Override 87 | public void dispose() { 88 | disposed = true; 89 | } 90 | 91 | public boolean isDisposed() { 92 | return disposed; 93 | } 94 | } 95 | 96 | /** Class containing a handy main method for testing. */ 97 | public static class Concatenate { 98 | 99 | public static String s; 100 | 101 | public static void main(final String... args) { 102 | final StringBuilder sb = new StringBuilder(); 103 | for (final String arg : args) { 104 | sb.append(arg); 105 | } 106 | s = sb.toString(); 107 | } 108 | } 109 | 110 | } 111 | -------------------------------------------------------------------------------- /src/test/java/net/imagej/app/ServiceCompletenessTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImageJ2 software for multidimensional image processing and analysis. 4 | * %% 5 | * Copyright (C) 2009 - 2024 ImageJ2 developers. 6 | * %% 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | * #L% 28 | */ 29 | 30 | package net.imagej.app; 31 | 32 | import static org.junit.Assert.assertSame; 33 | import static org.junit.Assert.assertTrue; 34 | 35 | import java.util.ArrayList; 36 | import java.util.List; 37 | 38 | import net.imagej.ImageJService; 39 | 40 | import org.junit.After; 41 | import org.junit.Before; 42 | import org.junit.Test; 43 | import org.scijava.Context; 44 | import org.scijava.InstantiableException; 45 | import org.scijava.plugin.PluginIndex; 46 | import org.scijava.plugin.PluginInfo; 47 | import org.scijava.service.SciJavaService; 48 | import org.scijava.service.Service; 49 | 50 | import io.scif.SCIFIOService; 51 | 52 | /** 53 | * Tests that all expected ImageJ services are present. 54 | * 55 | * @author Curtis Rueden 56 | */ 57 | public class ServiceCompletenessTest { 58 | 59 | private Context ctx; 60 | 61 | @Before 62 | public void setUp() { 63 | ctx = new Context(ImageJService.class); 64 | } 65 | 66 | @After 67 | public void tearDown() { 68 | ctx.dispose(); 69 | } 70 | 71 | @SuppressWarnings("deprecation") 72 | @Test 73 | public void testServices() { 74 | final ArrayList> services = 75 | new ArrayList<>(); 76 | services.add(net.imagej.DefaultDatasetService.class); 77 | services.add(net.imagej.DefaultImgPlusService.class); 78 | services.add(net.imagej.animation.DefaultAnimationService.class); 79 | services.add(net.imagej.autoscale.DefaultAutoscaleService.class); 80 | services.add(net.imagej.display.DefaultImageDisplayService.class); 81 | services.add(net.imagej.display.DefaultOverlayService.class); 82 | services.add(net.imagej.display.DefaultWindowService.class); 83 | services.add(net.imagej.display.DefaultZoomService.class); 84 | services.add(net.imagej.display.DummyScreenCaptureService.class); 85 | // services.add(net.imagej.legacy.LegacyService.class); 86 | services.add(net.imagej.legacy.display.LegacyImageDisplayService.class); 87 | services.add(net.imagej.lut.DefaultLUTService.class); 88 | services.add(net.imagej.measure.DefaultMeasurementService.class); 89 | services.add(net.imagej.measure.DefaultStatisticsService.class); 90 | services.add(net.imagej.operator.DefaultCalculatorService.class); 91 | services.add(net.imagej.ops.DefaultNamespaceService.class); 92 | services.add(net.imagej.ops.DefaultOpMatchingService.class); 93 | services.add(net.imagej.ops.DefaultOpService.class); 94 | services.add(net.imagej.render.DummyRenderingService.class); 95 | services.add(net.imagej.sampler.DefaultSamplerService.class); 96 | services.add(net.imagej.threshold.DefaultThresholdService.class); 97 | services.add(net.imagej.types.DefaultDataTypeService.class); 98 | services.add(net.imagej.ui.DefaultImageJUIService.class); 99 | services.add(net.imagej.ui.awt.AWTRenderingService.class); 100 | services.add(net.imagej.ui.awt.AWTScreenCaptureService.class); 101 | services.add(net.imagej.ui.swing.overlay.JHotDrawService.class); 102 | services.add(net.imagej.updater.DefaultUpdateService.class); 103 | services.add(net.imagej.updater.DefaultUploaderService.class); 104 | for (final Class c : services) { 105 | final Service s = ctx.service(c); 106 | assertSame(c, s.getClass()); 107 | } 108 | } 109 | 110 | @Test 111 | public void testMarkerInterfaces() throws InstantiableException { 112 | final PluginIndex pluginIndex = new PluginIndex(); 113 | final List> servicePlugins = // 114 | pluginIndex.getPlugins(Service.class); 115 | for (final PluginInfo info : servicePlugins) { 116 | final Class c = info.loadClass(); 117 | final boolean scijava = SciJavaService.class.isAssignableFrom(c); 118 | final boolean imagej = ImageJService.class.isAssignableFrom(c); 119 | final boolean scifio = SCIFIOService.class.isAssignableFrom(c); 120 | assertTrue(c.getName(), scijava ^ imagej ^ scifio); 121 | } 122 | } 123 | 124 | } 125 | -------------------------------------------------------------------------------- /src/test/java/net/imagej/app/ToplevelImageJAppTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImageJ2 software for multidimensional image processing and analysis. 4 | * %% 5 | * Copyright (C) 2009 - 2024 ImageJ2 developers. 6 | * %% 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | * #L% 28 | */ 29 | 30 | package net.imagej.app; 31 | 32 | import static org.junit.Assert.assertEquals; 33 | import static org.junit.Assert.assertSame; 34 | import static org.junit.Assert.assertTrue; 35 | 36 | import net.imagej.ImageJ; 37 | 38 | import org.junit.After; 39 | import org.junit.Before; 40 | import org.junit.Test; 41 | import org.scijava.app.App; 42 | 43 | /** 44 | * Tests {@link ToplevelImageJApp}. 45 | * 46 | * @author Curtis Rueden 47 | */ 48 | public class ToplevelImageJAppTest { 49 | 50 | private ImageJ ij; 51 | 52 | @Before 53 | public void setUp() { 54 | ij = new ImageJ(); 55 | } 56 | 57 | @After 58 | public void tearDown() { 59 | ij.getContext().dispose(); 60 | } 61 | 62 | @Test 63 | public void testApp() { 64 | final App app = ij.app().getApp(); 65 | assertSame(ToplevelImageJApp.class, app.getClass()); 66 | assertEquals("net.imagej", app.getGroupId()); 67 | assertEquals("imagej", app.getArtifactId()); 68 | final String version = app.getVersion(); 69 | assertTrue(version.contains("/1.")); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/test/java/net/imagej/debug/TypeHierarchy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImageJ2 software for multidimensional image processing and analysis. 4 | * %% 5 | * Copyright (C) 2009 - 2024 ImageJ2 developers. 6 | * %% 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | * #L% 28 | */ 29 | 30 | package net.imagej.debug; 31 | 32 | import java.util.ArrayList; 33 | import java.util.Collection; 34 | import java.util.Collections; 35 | import java.util.HashMap; 36 | import java.util.HashSet; 37 | import java.util.List; 38 | 39 | /** 40 | * Dumps the type hierarchy of the classes given as arguments. 41 | * 42 | * @author Curtis Rueden 43 | */ 44 | public class TypeHierarchy { 45 | 46 | private final HashMap, TypeNode> classes; 47 | 48 | public TypeHierarchy(final String[] classNames) { 49 | classes = loadClasses(classNames); 50 | parseRelationships(); 51 | } 52 | 53 | public void printTree() { 54 | for (final TypeNode node : sort(classes.values())) { 55 | if (node.isRoot()) System.out.println(node); 56 | } 57 | } 58 | 59 | public static void main(final String[] args) { 60 | final TypeHierarchy typeHierarchy = new TypeHierarchy(args); 61 | typeHierarchy.printTree(); 62 | } 63 | 64 | public static > List sort( 65 | final Collection c) 66 | { 67 | final ArrayList sortedList = new ArrayList<>(c); 68 | Collections.sort(sortedList); 69 | return sortedList; 70 | } 71 | 72 | // -- Helper methods -- 73 | 74 | private HashMap, TypeNode> loadClasses(final String[] classNames) { 75 | final HashMap, TypeNode> list = new HashMap<>(); 76 | for (final String className : classNames) { 77 | try { 78 | final Class c = Class.forName(className); 79 | list.put(c, new TypeNode(c)); 80 | } 81 | catch (final ClassNotFoundException exc) { 82 | System.err.println("Ignoring invalid class: " + className); 83 | } 84 | } 85 | return list; 86 | } 87 | 88 | private void parseRelationships() { 89 | for (final TypeNode node : classes.values()) { 90 | parseAncestors(null, node.getClassObject()); 91 | } 92 | } 93 | 94 | private void parseAncestors(final TypeNode child, final Class c) { 95 | if (c == null) return; 96 | final TypeNode node = classes.get(c); 97 | if (node == null) { 98 | if (c != Object.class) { 99 | System.err.println("Ignoring irrelevant class: " + c.getName()); 100 | } 101 | return; 102 | } 103 | if (child != null) node.addChild(child); 104 | parseAncestors(node, c.getSuperclass()); 105 | for (final Class iface : c.getInterfaces()) { 106 | parseAncestors(node, iface); 107 | } 108 | } 109 | 110 | // -- Helper classes -- 111 | 112 | public class TypeNode implements Comparable { 113 | 114 | private final Class c; 115 | private final HashSet children = new HashSet<>(); 116 | private final HashSet parents = new HashSet<>(); 117 | 118 | public TypeNode(final Class c) { 119 | this.c = c; 120 | } 121 | 122 | public Class getClassObject() { 123 | return c; 124 | } 125 | 126 | public void addChild(final TypeNode node) { 127 | children.add(node); 128 | node.parents.add(this); 129 | } 130 | 131 | public boolean isRoot() { 132 | return parents.isEmpty(); 133 | } 134 | 135 | public boolean isLeaf() { 136 | return children.isEmpty(); 137 | } 138 | 139 | @Override 140 | public String toString() { 141 | return toString(0); 142 | } 143 | 144 | private String toString(final int indent) { 145 | final StringBuilder sb = new StringBuilder(); 146 | for (int i = 0; i < indent; i++) { 147 | sb.append(' '); 148 | } 149 | sb.append(c.getName()); 150 | sb.append("\n"); 151 | for (final TypeNode child : sort(children)) { 152 | sb.append(child.toString(indent + 2)); 153 | } 154 | return sb.toString(); 155 | } 156 | 157 | @Override 158 | public int compareTo(final TypeNode o) { 159 | return c.getName().compareTo(o.c.getName()); 160 | } 161 | 162 | } 163 | 164 | } 165 | --------------------------------------------------------------------------------