Skip to content

Commit 1afec06

Browse files
committed
Rename ImageJ2 Legacy -> SciJava Ops ImageJ
1 parent b67a29a commit 1afec06

11 files changed

Lines changed: 47 additions & 55 deletions

File tree

imagej/imagej2-legacy/README.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
</mailingLists>
4646

4747
<modules>
48-
<module>imagej/imagej2-legacy</module>
4948
<module>scijava/scijava-collections</module>
5049
<module>scijava/scijava-common3</module>
5150
<module>scijava/scijava-concurrent</module>
@@ -57,6 +56,7 @@
5756
<module>scijava/scijava-ops-benchmarks</module>
5857
<module>scijava/scijava-ops-engine</module>
5958
<module>scijava/scijava-ops-image</module>
59+
<module>scijava/scijava-ops-imagej</module>
6060
<module>scijava/scijava-ops-indexer</module>
6161
<module>scijava/scijava-ops-spi</module>
6262
<module>scijava/scijava-ops-tutorial</module>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# ImageJ Ops 2: The next generation of image processing algorithms
1+
# SciJava Ops Image: The next generation of image processing algorithms
22

3-
This library provides a suite of algorithms to aid in image processing and is the successor to [ImageJ Ops](https://github.com/imagej/imagej-ops). For Maven projects, this library can be used by adding to your `pom.xml`:
3+
This library provides a suite of algorithms to aid in image processing using SciJava Ops. It is the successor to [ImageJ Ops](https://github.com/imagej/imagej-ops). For Maven projects, this library can be used by adding to your `pom.xml`:
44

55
```java
66
<dependency>
7-
<groupId>net.imagej</groupId>
8-
<artifactId>imagej-ops2</artifactId>
7+
<groupId>org.scijava</groupId>
8+
<artifactId>scijava-ops-image</artifactId>
99
<version>0-SNAPSHOT</version>
1010
<scope>test</scope>
1111
</dependency>
1212
```
1313

14-
As all algorithms in this library are Ops (check out SciJava Ops SPI for more on what this means), they are stateless and can be used statically. Static use, however, is discouraged with preference given to the use of SciJava Ops Engine (check out SciJava Ops Engine for the reasons why). All ImageJ Ops2 algorithms are usable out of the box with SciJava Ops Engine, making it easier to find the right algorithm for any application.
14+
As all algorithms in this library are Ops (check out SciJava Ops SPI for more on what this means), they are stateless and can be used statically. Static use, however, is discouraged with preference given to the use of SciJava Ops Engine (check out SciJava Ops Engine for the reasons why). All contained algorithms can be used out of the box with SciJava Ops Engine, making it easier to find the right algorithm for any application.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SciJava Ops ImageJ: An interface between SciJava 3 and ImageJ/ImageJ2
2+
3+
This library provides a bridge between SciJava 3 and ImageJ/ImageJ2.
4+
For Maven projects, this library can be used by adding to your `pom.xml`:
5+
6+
```java
7+
<dependency>
8+
<groupId>org.scijava</groupId>
9+
<artifactId>scijava-ops-imagej</artifactId>
10+
<version>0-SNAPSHOT</version>
11+
</dependency>
12+
```
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@
99
<relativePath>../..</relativePath>
1010
</parent>
1111

12-
<groupId>net.imagej</groupId>
13-
<artifactId>imagej2-legacy</artifactId>
12+
<artifactId>scijava-ops-imagej</artifactId>
1413

15-
<name>ImageJ2 Legacy</name>
16-
<description>An interface between SciJava 3 and ImageJ2.</description>
14+
<name>SciJava Ops ImageJ</name>
15+
<description>Components enabling interoperability between SciJava 3 and ImageJ/ImageJ2.</description>
1716
<url>https://github.com/scijava/scijava</url>
1817
<inceptionYear>2023</inceptionYear>
1918
<organization>
20-
<name>ImageJ</name>
21-
<url>https://imagej.net/</url>
19+
<name>SciJava</name>
20+
<url>https://scijava.org/</url>
2221
</organization>
2322
<licenses>
2423
<license>

imagej/imagej2-legacy/src/main/java/module-info.java renamed to scijava/scijava-ops-imagej/src/main/java/module-info.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import net.imagej2.legacy.types.DatasetTypeExtractor;
2-
31
/*-
42
* #%L
53
* ImageJ2 software for multidimensional image processing and analysis.
@@ -28,11 +26,11 @@
2826
* POSSIBILITY OF SUCH DAMAGE.
2927
* #L%
3028
*/
31-
module net.imagej2.legacy {
29+
module org.scijava.imagej {
3230

3331
requires net.imagej;
3432
requires org.scijava.types;
3533
requires org.scijava.priority;
3634

37-
provides org.scijava.types.TypeExtractor with net.imagej2.legacy.types.DatasetTypeExtractor;
35+
provides org.scijava.types.TypeExtractor with org.scijava.imagej.types.DatasetTypeExtractor;
3836
}

imagej/imagej2-legacy/src/main/java/net/imagej2/legacy/types/DatasetTypeExtractor.java renamed to scijava/scijava-ops-imagej/src/main/java/org/scijava/imagej/types/DatasetTypeExtractor.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
* %%
77
* Redistribution and use in source and binary forms, with or without
88
* modification, are permitted provided that the following conditions are met:
9-
*
9+
*
1010
* 1. Redistributions of source code must retain the above copyright notice,
1111
* this list of conditions and the following disclaimer.
1212
* 2. Redistributions in binary form must reproduce the above copyright notice,
1313
* this list of conditions and the following disclaimer in the documentation
1414
* and/or other materials provided with the distribution.
15-
*
15+
*
1616
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1717
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1818
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -27,7 +27,7 @@
2727
* #L%
2828
*/
2929

30-
package net.imagej2.legacy.types;
30+
package org.scijava.imagej.types;
3131

3232
import java.lang.reflect.Type;
3333

@@ -39,18 +39,17 @@
3939

4040
public class DatasetTypeExtractor implements TypeExtractor {
4141

42-
@Override
43-
public double getPriority() {
42+
@Override public double getPriority() {
4443
return Priority.HIGH;
4544
}
4645

47-
@Override
48-
public boolean canReify(TypeReifier r, Class<?> object) {
46+
@Override public boolean canReify(TypeReifier r, Class<?> object) {
4947
return Dataset.class.isAssignableFrom(object);
5048
}
5149

5250
@Override public Type reify(TypeReifier r, Object object) {
53-
if (!(object instanceof Dataset)) throw new IllegalArgumentException(object + " cannot be reified because it is not a Dataset!");
51+
if (!(object instanceof Dataset)) throw new IllegalArgumentException(
52+
object + " cannot be reified because it is not a Dataset!");
5453
return r.reify(((Dataset) object).getImgPlus());
5554
}
5655
}

imagej/imagej2-legacy/src/main/resources/META-INF/services/org.scijava.types.TypeExtractor renamed to scijava/scijava-ops-imagej/src/main/resources/META-INF/services/org.scijava.types.TypeExtractor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# -- DO NOT EDIT -- This file is autogenerated
22
# Instead, modify and re-run <basedir>/bin/generate-meta-inf.sh from the top-level
3-
net.imagej2.legacy.types.DatasetTypeExtractor
3+
org.scijava.imagej.types.DatasetTypeExtractor

imagej/imagej2-legacy/src/test/java/net/imagej2/legacy/types/DatasetTypeExtractorTest.java renamed to scijava/scijava-ops-imagej/src/test/java/org/scijava/imagej/types/DatasetTypeExtractorTest.java

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
* %%
77
* Redistribution and use in source and binary forms, with or without
88
* modification, are permitted provided that the following conditions are met:
9-
*
9+
*
1010
* 1. Redistributions of source code must retain the above copyright notice,
1111
* this list of conditions and the following disclaimer.
1212
* 2. Redistributions in binary form must reproduce the above copyright notice,
1313
* this list of conditions and the following disclaimer in the documentation
1414
* and/or other materials provided with the distribution.
15-
*
15+
*
1616
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1717
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1818
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -27,40 +27,36 @@
2727
* #L%
2828
*/
2929

30-
package net.imagej2.legacy.types;
30+
package org.scijava.imagej.types;
3131

3232
import java.lang.reflect.Type;
3333
import java.util.ServiceLoader;
3434

35+
import net.imagej.DefaultDataset;
36+
import net.imagej.ImgPlus;
37+
import net.imglib2.img.array.ArrayImgs;
3538
import org.junit.jupiter.api.Assertions;
3639
import org.junit.jupiter.api.Test;
37-
import org.scijava.Context;
3840
import org.scijava.discovery.Discoverer;
3941
import org.scijava.types.Any;
4042
import org.scijava.types.DefaultTypeReifier;
4143
import org.scijava.types.Types;
4244

43-
import net.imagej.DefaultDataset;
44-
import net.imagej.ImgPlus;
45-
import net.imglib2.img.array.ArrayImgs;
46-
4745
/**
4846
* Tests {@link DatasetTypeExtractor}
49-
*
47+
*
5048
* @author Gabriel Selzer
5149
*/
5250
public class DatasetTypeExtractorTest {
5351

54-
@Test
55-
public void testDatasetTypeExtractor() {
52+
@Test public void testDatasetTypeExtractor() {
5653
// Create a TypeReifier
57-
var reifier = new DefaultTypeReifier(Discoverer.all(
58-
ServiceLoader::load));
54+
var reifier = new DefaultTypeReifier(Discoverer.all(ServiceLoader::load));
5955
// Create a Dataset
60-
var ctx = new Context();
6156
var img = ArrayImgs.unsignedBytes(10, 10);
6257
var imgPlus = new ImgPlus<>(img);
63-
var ds = new DefaultDataset(ctx, imgPlus);
58+
// NB we pass a null context to avoid a SciJava Common dependency
59+
var ds = new DefaultDataset(null, imgPlus);
6460
// Assert correct reification
6561
// NB without a dependency on imagej-ops2 we cannot reify
6662
// the ImgPlus, but asserting an ImgPlus is the reified type

0 commit comments

Comments
 (0)