Skip to content

Commit

Permalink
Quickfix for saving ROIs (#18)
Browse files Browse the repository at this point in the history
* Update pom.xml and bump version
* Replace saveROI loop by saveROIs
* Update GitHub actions
* Set default server to localhost
  • Loading branch information
ppouchin authored Feb 9, 2023
1 parent a823ec6 commit 0bad4da
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 105 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/pom.xml') }}
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Package with Maven
run: mvn -B package --file pom.xml
- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: jars
retention-days: 2
Expand Down
123 changes: 31 additions & 92 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>pom-scijava-base</artifactId>
<artifactId>pom-scijava</artifactId>
<groupId>org.scijava</groupId>
<version>12.0.0</version>
<version>33.2.0</version>
</parent>

<groupId>fr.igred</groupId>
<artifactId>omero_batch-plugin</artifactId>
<version>1.0.3</version>
<version>1.0.4</version>

<name>omero_batch-plugin</name>
<description>ImageJ plugin to batch process images from OMERO.</description>
Expand Down Expand Up @@ -48,9 +48,9 @@
<id>ppouchin</id>
<name>Pierre Pouchin</name>
<email>pierre.pouchin@uca.fr</email>
<url>https://www.gred-clermont.fr/directory/member/pierre-pouchin/</url>
<url>https://www.igred.fr/directory/member/pierre-pouchin/</url>
<organization>GReD (INSERM U1103 / CNRS UMR 6293 / UCA)</organization>
<organizationUrl>https://www.gred-clermont.fr</organizationUrl>
<organizationUrl>https://www.igred.fr</organizationUrl>
<roles>
<role>lead</role>
<role>developer</role>
Expand Down Expand Up @@ -118,22 +118,9 @@
<maven.compiler.target>8</maven.compiler.target>
<license.licenseName>gpl_v2</license.licenseName>
<license.copyrightOwners>MICA &amp; GReD</license.copyrightOwners>
<allowedDuplicateClasses>com.esotericsoftware.kryo.*,com.esotericsoftware.minlog.*,com.esotericsoftware.reflectasm.*</allowedDuplicateClasses>
<soc.version>5.9.0</soc.version>
<soc.version>5.10.0</soc.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>fr.igred</groupId>
<artifactId>simple-omero-client</artifactId>
<version>${soc.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>net.imagej</groupId>
Expand All @@ -145,33 +132,33 @@
<artifactId>bio-formats_plugins</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ome</groupId>
<artifactId>formats-bsd</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ome</groupId>
<artifactId>formats-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ome</groupId>
<artifactId>formats-bsd</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ome</groupId>
<artifactId>formats-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>fr.igred</groupId>
<artifactId>simple-omero-client</artifactId>
<version>${soc.version}</version>
</dependency>
<dependency>
<groupId>org.scijava</groupId>
<artifactId>scijava-common</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.scijava</groupId>
<artifactId>scijava-ui-swing</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.scijava</groupId>
<artifactId>scijava-common</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.scijava</groupId>
<artifactId>scijava-ui-swing</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
</dependencies>

<repositories>
Expand All @@ -187,11 +174,6 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand All @@ -211,51 +193,7 @@
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -271,9 +209,10 @@
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<detectJavaApiLink>false</detectJavaApiLink>
</configuration>
</plugin>
</plugins>
</reporting>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/igred/ij/gui/OMEROConnectDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public OMEROConnectDialog() {
final int width = 350;
final int height = 200;

final String defaultHost = "bioimage.france-bioinformatique.fr";
final String defaultHost = "localhost";
final int defaultPort = 4064;

super.setModal(true);
Expand Down
10 changes: 2 additions & 8 deletions src/main/java/fr/igred/ij/macro/OMEROBatchRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -758,10 +758,7 @@ private void saveOverlay(ImagePlus imp, Long imageId, String title, String prope
deleteROIs(image);
}
setState("Saving overlay ROIs on OMERO...");
for (ROIWrapper roi : rois) {
roi.setImage(image);
image.saveROI(client, roi);
}
image.saveROIs(client, rois);
loadROIs(image, imp, true); // reload ROIs
} catch (ServiceException | AccessException | ExecutionException e) {
IJ.error("Could not import overlay ROIs to OMERO: " + e.getMessage());
Expand Down Expand Up @@ -793,10 +790,7 @@ private void saveROIManager(ImagePlus imp, Long imageId, String title, String pr
deleteROIs(image);
}
setState("Saving ROIs on OMERO...");
for (ROIWrapper roi : rois) {
roi.setImage(image);
image.saveROI(client, roi);
}
image.saveROIs(client, rois);
loadROIs(image, imp, false); // reload ROIs
} catch (ServiceException | AccessException | ExecutionException e) {
IJ.error("Could not import ROIs to OMERO: " + e.getMessage());
Expand Down

0 comments on commit 0bad4da

Please sign in to comment.