Skip to content

Commit

Permalink
Update weasis-dicom-tools to 5.31.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nroduit committed Nov 3, 2023
1 parent 098f165 commit c0d5280
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 30 deletions.
14 changes: 12 additions & 2 deletions weasis-base/weasis-base-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,18 @@
<artifactId>org.apache.felix.gogo.runtime</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.hk2</groupId>
<artifactId>osgi-resource-locator</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
import bibliothek.gui.dock.util.DirectWindowProvider;
import bibliothek.gui.dock.util.DockUtilities;
import com.formdev.flatlaf.extras.FlatSVGIcon;
import jakarta.json.Json;
import jakarta.json.JsonObject;
import jakarta.json.JsonReader;
import java.awt.AWTException;
import java.awt.BorderLayout;
import java.awt.Component;
Expand Down Expand Up @@ -76,9 +79,6 @@
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonReader;
import javax.management.InstanceNotFoundException;
import javax.management.JMException;
import javax.management.MBeanServer;
Expand Down
6 changes: 6 additions & 0 deletions weasis-dicom/weasis-dicom-codec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
</exclusion>
</exclusions>
</dependency>
<!-- Add osgi-resource-locator dependency for loading JsonProvider with dcm4che-json -->
<dependency>
<groupId>org.glassfish.hk2</groupId>
<artifactId>osgi-resource-locator</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.weasis.imageio</groupId>
<artifactId>weasis-imageio-codec</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
package org.weasis.dicom.explorer.rs;

import jakarta.json.Json;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URLEncoder;
Expand All @@ -19,7 +20,6 @@
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import javax.json.Json;
import org.dcm4che3.data.Attributes;
import org.dcm4che3.data.Tag;
import org.dcm4che3.json.JSONReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public static void applyMipParameters(
}
} catch (Exception e) {
if (raw != null) {
FileUtil.delete(raw.getFile());
FileUtil.delete(raw.file());
raw = null;
}
LOGGER.error("Writing MIP", e);
Expand All @@ -188,7 +188,7 @@ public static void applyMipParameters(
return;
}
RawImageIO rawIO = new RawImageIO(raw, null);
rawIO.getFileCache().setOriginalTempFile(raw.getFile());
rawIO.getFileCache().setOriginalTempFile(raw.file());
rawIO.setBaseAttributes(cpTags);

// Tags with same values for all the Series
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void setBaseAttributes(Attributes attributes) {
public File getDicomFile() {
Attributes dcm = getDicomObject();

File file = imageCV.getFile();
File file = imageCV.file();
BulkData bdl =
new BulkData(
file.toURI().toString(),
Expand Down Expand Up @@ -107,7 +107,7 @@ public PlanarImage getImageFragment(MediaElement media) throws Exception {

@Override
public URI getUri() {
return imageCV.getFile().toURI();
return imageCV.file().toURI();
}

@Override
Expand Down Expand Up @@ -239,7 +239,7 @@ private synchronized DicomMetaData readMetaData() {
dcm.setSpecificCharacterSet(cs.toCodes());
DicomMediaUtils.fillAttributes(tags, dcm);
dcm.addAll(attributes);
File file = imageCV.getFile();
File file = imageCV.file();
BulkData bdl =
new BulkData(
file.toURI().toString(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ private static DicomSeries buildDicomSeriesFromRaw(
newSeries[i].write(
ImageProcessor.getRotatedImage(newSeries[i].read(), Core.ROTATE_90_CLOCKWISE));
} catch (Exception e) {
FileUtil.delete(newSeries[i].getFile());
FileUtil.delete(newSeries[i].file());
throw e;
}

Expand All @@ -473,7 +473,7 @@ private static DicomSeries buildDicomSeriesFromRaw(
}
}
RawImageIO rawIO = new RawImageIO(newSeries[i], null);
rawIO.getFileCache().setOriginalTempFile(newSeries[i].getFile());
rawIO.getFileCache().setOriginalTempFile(newSeries[i].file());
rawIO.setBaseAttributes(cpTags);

// Tags with same values for all the Series
Expand Down Expand Up @@ -643,7 +643,7 @@ private static double writeBlock(
for (int i = 0; i < newSeries.length; i++) {
if (newSeries[i] != null) {
if (abort[0]) {
FileUtil.delete(newSeries[i].getFile());
FileUtil.delete(newSeries[i].file());
} else {
newSeries[i].write(builImgs[i]);
}
Expand Down
2 changes: 1 addition & 1 deletion weasis-distributions/etc/config/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
},
{
"code": "felix.auto.start.4",
"value": "${dollar}{weasis.codebase.url}/bundle/org.apache.felix.bundlerepository-${felix.bundlerepository.version}.jar${xz.ext} ${dollar}{weasis.codebase.url}/bundle/jakarta.json-${javax.json.version}.jar${xz.ext} ${dollar}{weasis.codebase.url}/bundle/osgi.promise-${osgi.promise.version}.jar${xz.ext}",
"value": "${dollar}{weasis.codebase.url}/bundle/org.apache.felix.bundlerepository-${felix.bundlerepository.version}.jar${xz.ext} ${dollar}{weasis.codebase.url}/bundle/jakarta.json-api-${jakarta.json.version}.jar${xz.ext} ${dollar}{weasis.codebase.url}/bundle/parsson-${org.eclipse.parsson.version}.jar${xz.ext} ${dollar}{weasis.codebase.url}/bundle/osgi-resource-locator-${osgi.resource.locator.version}.jar${xz.ext} ${dollar}{weasis.codebase.url}/bundle/osgi.promise-${osgi.promise.version}.jar${xz.ext}",
"description": "OSGI bundle repository",
"type": "A",
"category": "FELIX_INSTALL"
Expand Down
18 changes: 15 additions & 3 deletions weasis-distributions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,21 @@
<outputDirectory>${tmp.bundle.dir}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<version>${javax.json.version}</version>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${jakarta.json.version}</version>
<outputDirectory>${tmp.bundle.dir}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<version>${org.eclipse.parsson.version}</version>
<outputDirectory>${tmp.bundle.dir}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.glassfish.hk2</groupId>
<artifactId>osgi-resource-locator</artifactId>
<version>${osgi.resource.locator.version}</version>
<outputDirectory>${tmp.bundle.dir}</outputDirectory>
</artifactItem>
<artifactItem>
Expand Down
2 changes: 1 addition & 1 deletion weasis-launcher/conf/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
},
{
"code": "felix.auto.start.4",
"value": "file:${maven.localRepository}/org/apache/felix/org.apache.felix.bundlerepository/${felix.bundlerepository.version}/org.apache.felix.bundlerepository-${felix.bundlerepository.version}.jar file:${maven.localRepository}/org/glassfish/jakarta.json/${javax.json.version}/jakarta.json-${javax.json.version}.jar file:${maven.localRepository}/org/osgi/osgi.promise/${osgi.promise.version}/osgi.promise-${osgi.promise.version}.jar",
"value": "file:${maven.localRepository}/org/apache/felix/org.apache.felix.bundlerepository/${felix.bundlerepository.version}/org.apache.felix.bundlerepository-${felix.bundlerepository.version}.jar file:${maven.localRepository}/jakarta/json/jakarta.json-api/${jakarta.json.version}/jakarta.json-api-${jakarta.json.version}.jar file:${maven.localRepository}/org/eclipse/parsson/parsson/${org.eclipse.parsson.version}/parsson-${org.eclipse.parsson.version}.jar file:${maven.localRepository}/org/glassfish/hk2/osgi-resource-locator/${osgi.resource.locator.version}/osgi-resource-locator-${osgi.resource.locator.version}.jar file:${maven.localRepository}/org/osgi/osgi.promise/${osgi.promise.version}/osgi.promise-${osgi.promise.version}.jar",
"description": "OSGI bundle repository",
"type": "A",
"category": "FELIX_INSTALL"
Expand Down
36 changes: 25 additions & 11 deletions weasis-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,24 @@
<slf4j.version>1.7.36</slf4j.version>
<sling.commons.log.version>3.0.2-r5</sling.commons.log.version>
<dockingframes.version>1.1.6</dockingframes.version>
<weasis-dicom-tools.version>5.30.0</weasis-dicom-tools.version>
<weasis.core.img.version>4.8.0.1</weasis.core.img.version>
<weasis.opencv.native.version>4.8.0-dcm</weasis.opencv.native.version>
<javax.json.version>1.1.6</javax.json.version>
<weasis-dicom-tools.version>5.31.1</weasis-dicom-tools.version>
<weasis.core.img.version>4.8.1</weasis.core.img.version>
<weasis.opencv.native.version>4.8.1-dcm</weasis.opencv.native.version>
<jakarta.json.version>2.1.3</jakarta.json.version>
<org.eclipse.parsson.version>1.1.5</org.eclipse.parsson.version>
<osgi.resource.locator.version>2.5.0-b42</osgi.resource.locator.version>
<jaxb.osgi.version>4.0.3</jaxb.osgi.version>
<xml.bind-api.version>4.0.0</xml.bind-api.version>
<joml.version>1.10.5</joml.version>
<jogamp.version>2.5.0</jogamp.version>
<jackson.version>2.15.1</jackson.version>
<scribejava.version>8.3.3</scribejava.version>
<zip4j.version>2.11.4</zip4j.version>
<zip4j.version>2.11.5</zip4j.version>

<assertj.version>3.24.2</assertj.version>
<mockito.version>5.2.0</mockito.version>
<byte-buddy.version>1.14.6</byte-buddy.version>
<byte-buddy-agent.version>1.14.1</byte-buddy-agent.version>
<byte-buddy-agent.version>1.14.2</byte-buddy-agent.version>
</properties>

<licenses>
Expand Down Expand Up @@ -505,9 +507,21 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<version>${javax.json.version}</version>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${jakarta.json.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<version>${org.eclipse.parsson.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.hk2</groupId>
<artifactId>osgi-resource-locator</artifactId>
<version>${osgi.resource.locator.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -656,8 +670,8 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.prefs</artifactId>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.prefs</artifactId>
</dependency>

<!-- FOR TESTS -->
Expand Down

0 comments on commit c0d5280

Please sign in to comment.