Skip to content

Commit

Permalink
Update ot dcm4che 5.25.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nroduit committed Feb 3, 2022
1 parent dff9253 commit ff4e6f4
Show file tree
Hide file tree
Showing 24 changed files with 22 additions and 59 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<artifactId>weasis-dicom-tools</artifactId>
<packaging>jar</packaging>
<name>Weasis DICOM API (based on dcm4che3)</name>
<version>5.24.2</version>
<version>5.25.1</version>

<properties>
<java-version>1.8</java-version>
<enforcer.jdk-version>[${java-version},)</enforcer.jdk-version>
<enforcer.maven-version>[3.0.5,)</enforcer.maven-version>
<dcm4che.version>5.24.2</dcm4che.version>
<dcm4che.version>5.25.1</dcm4che.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sonar.projectKey>weasis-dicom-tools</sonar.projectKey>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/dcm4che3/tool/getscu/GetSCU.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ public String getCuid() {
private int priority;
private InformationModel model;
private File storageDir;
private Attributes keys = new Attributes();
private final Attributes keys = new Attributes();
private int[] inFilter = DEF_IN_FILTER;
private Association as;
private int cancelAfter;
private final DicomState state;
private DimseRSPHandler rspHandler;
private long totalSize = 0;

private BasicCStoreSCP storageSCP =
private final BasicCStoreSCP storageSCP =
new BasicCStoreSCP("*") {

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/dcm4che3/tool/movescu/MoveSCU.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public String getCuid() {
private int priority;
private String destination;
private InformationModel model;
private Attributes keys = new Attributes();
private final Attributes keys = new Attributes();
private int[] inFilter = DEF_IN_FILTER;
private transient Association as;
private int cancelAfter;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/weasis/dicom/mf/Patient.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public class Patient implements Xml, Comparable<Patient> {

private final String patientID;
private String issuerOfPatientID;
private final String issuerOfPatientID;
private String patientName;
private String patientBirthDate = null;
private String patientBirthTime = null;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/weasis/dicom/mf/ViewerMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class ViewerMessage {
public enum eLevel {
INFO,
WARN,
ERROR;
ERROR
}

private final String message;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/weasis/dicom/mf/Xml.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.weasis.core.util.StringUtil;

public interface Xml {
static final Logger LOGGER = LoggerFactory.getLogger(Xml.class);
Logger LOGGER = LoggerFactory.getLogger(Xml.class);

enum Level {
PATIENT("Patient"), // $NON-NLS-1$
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/weasis/dicom/op/CGetForward.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public enum InformationModel {
private int priority;
private InformationModel model;

private Attributes keys = new Attributes();
private final Attributes keys = new Attributes();
private Association as;

private final StoreFromStreamSCU streamSCU;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/weasis/dicom/op/CMove.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static DicomState process(
}
AdvancedParams options = params == null ? new AdvancedParams() : params;

try (MoveSCU moveSCU = new MoveSCU(progress); ) {
try (MoveSCU moveSCU = new MoveSCU(progress)) {
Connection remote = moveSCU.getRemoteConnection();
Connection conn = moveSCU.getConnection();
options.configureConnect(moveSCU.getAAssociateRQ(), remote, calledNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.dcm4che3.util.UIDUtils;

public class DefaultAttributeEditor implements AttributeEditor {
private HashMap<String, String> uidMap;
private final HashMap<String, String> uidMap;
private final boolean generateUIDs;
private final Attributes tagToOverride;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/weasis/dicom/param/MaskArea.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static ImageCV drawShape(Mat srcImg, MaskArea maskArea) {
r = r.intersection(new Rectangle(0, 0, srcImg.width(), srcImg.height()));
Rect rect2d = new Rect(r.x, r.y, r.width, r.height);
if (r.width < 3 || r.height < 3) {
LOGGER.warn("The masking shape is not applicable: {}", r.toString());
LOGGER.warn("The masking shape is not applicable: {}", r);
} else {
Imgproc.blur(srcImg.submat(rect2d), dstImg.submat(rect2d), new Size(7, 7));
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/weasis/dicom/util/StoreFromStreamSCU.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

public class StoreFromStreamSCU {

private static Logger LOGGER = LoggerFactory.getLogger(StoreFromStreamSCU.class);
private static final Logger LOGGER = LoggerFactory.getLogger(StoreFromStreamSCU.class);

@FunctionalInterface
public interface RSPHandlerFactory {
Expand Down Expand Up @@ -117,7 +117,7 @@ private void onCStoreRSP(Attributes cmd) {
LOGGER.warn(
"Received C-STORE-RSP with Status {}H{}",
TagUtils.shortToHexString(status),
"\r\n" + cmd.toString());
"\r\n" + cmd);
} else {
LOGGER.warn(
"Received C-STORE-RSP with Status {}H",
Expand All @@ -135,7 +135,7 @@ private void onCStoreRSP(Attributes cmd) {
LOGGER.error(
"Received C-STORE-RSP with Status {}H{}",
TagUtils.shortToHexString(status),
"\r\n" + cmd.toString());
"\r\n" + cmd);
} else {
LOGGER.error(
"Received C-STORE-RSP with Status {}H",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

public class HttpServerErrorException extends RuntimeException {

private static final long serialVersionUID = 1253673551984892314L;

public HttpServerErrorException(String message) {
super(message);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/weasis/dicom/web/Multipart.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected static Map<String, String> getHeaders(String header) {
}
end = parseEOF(header, k);
buf.append(" ");
buf.append(header.substring(k, end));
buf.append(header, k, end);
start = end + 2;
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/weasis/dicom/web/MultipartReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ public class MultipartReader {
private int tailBuffer = 0;

/**
* @param inputStream the <code>InputStream</code> of a multipart exchange.
* @param input the <code>InputStream</code> of a multipart exchange.
* @param boundary the mark to delimit the parts of a multipart stream.
*/
public MultipartReader(InputStream input, byte[] boundary) {
this(input, boundary, 4096);
}

/**
* @param inputStream the <code>InputStream</code> of a multipart exchange.
* @param input the <code>InputStream</code> of a multipart exchange.
* @param boundary the mark to delimit the parts of a multipart stream.
* @param bufferSize the size of the buffer in bytes. Default is 4096.
* @param bufSize the size of the buffer in bytes. Default is 4096.
*/
public MultipartReader(InputStream input, byte[] boundary, int bufSize) {
this.inputStream = input;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import java.io.IOException;

public class MultipartStreamException extends IOException {
private static final long serialVersionUID = -4358358366372546933L;

public MultipartStreamException(String message) {
super(message);
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/org/weasis/dicom/CFindNetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
package org.weasis.dicom;

import java.util.List;
import org.apache.log4j.BasicConfigurator;
import org.dcm4che3.data.Attributes;
import org.dcm4che3.data.Tag;
import org.dcm4che3.net.Status;
Expand All @@ -27,7 +26,6 @@ public class CFindNetTest {

@Test
public void testProcess() {
BasicConfigurator.configure();

DicomParam[] params = {
new DicomParam(Tag.PatientID, "PAT001"),
Expand Down
10 changes: 1 addition & 9 deletions src/test/java/org/weasis/dicom/CGetForwardNetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
package org.weasis.dicom;

import java.util.Arrays;
import org.apache.log4j.BasicConfigurator;
import org.dcm4che3.data.Attributes;
import org.dcm4che3.data.Tag;
import org.dcm4che3.data.VR;
Expand All @@ -20,19 +19,12 @@
import org.junit.Assert;
import org.junit.Test;
import org.weasis.dicom.op.CGetForward;
import org.weasis.dicom.param.AdvancedParams;
import org.weasis.dicom.param.ConnectOptions;
import org.weasis.dicom.param.CstoreParams;
import org.weasis.dicom.param.DefaultAttributeEditor;
import org.weasis.dicom.param.DicomNode;
import org.weasis.dicom.param.DicomProgress;
import org.weasis.dicom.param.DicomState;
import org.weasis.dicom.param.*;

public class CGetForwardNetTest {

@Test
public void testProcess() {
BasicConfigurator.configure();

DicomProgress progress = new DicomProgress();
progress.addProgressListener(
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/org/weasis/dicom/CGetNetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
package org.weasis.dicom;

import java.io.IOException;
import org.apache.log4j.BasicConfigurator;
import org.dcm4che3.data.Tag;
import org.dcm4che3.net.Status;
import org.hamcrest.MatcherAssert;
Expand All @@ -30,7 +29,6 @@ public class CGetNetTest {

@Test
public void testProcess() throws IOException {
BasicConfigurator.configure();

DicomProgress progress = new DicomProgress();
progress.addProgressListener(
Expand Down
8 changes: 1 addition & 7 deletions src/test/java/org/weasis/dicom/CMoveNetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
package org.weasis.dicom;

import java.util.EnumSet;
import org.apache.log4j.BasicConfigurator;
import org.dcm4che3.data.Tag;
import org.dcm4che3.net.QueryOption;
import org.dcm4che3.net.Status;
Expand All @@ -19,17 +18,12 @@
import org.junit.Assert;
import org.junit.Test;
import org.weasis.dicom.op.CMove;
import org.weasis.dicom.param.AdvancedParams;
import org.weasis.dicom.param.DicomNode;
import org.weasis.dicom.param.DicomParam;
import org.weasis.dicom.param.DicomProgress;
import org.weasis.dicom.param.DicomState;
import org.weasis.dicom.param.*;

public class CMoveNetTest {

@Test
public void testProcess() {
BasicConfigurator.configure();

DicomProgress progress = new DicomProgress();
progress.addProgressListener(
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/org/weasis/dicom/CstoreNetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.log4j.BasicConfigurator;
import org.dcm4che3.data.Attributes;
import org.dcm4che3.data.Tag;
import org.dcm4che3.data.VR;
Expand All @@ -35,7 +34,6 @@ public class CstoreNetTest {

@Test
public void testProcess() {
BasicConfigurator.configure();

AdvancedParams params = new AdvancedParams();
ConnectOptions connectOptions = new ConnectOptions();
Expand Down
9 changes: 1 addition & 8 deletions src/test/java/org/weasis/dicom/DicomListenerNetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
package org.weasis.dicom;

import org.apache.log4j.BasicConfigurator;
import org.dcm4che3.net.Status;
import org.hamcrest.MatcherAssert;
import org.hamcrest.core.IsEqual;
Expand All @@ -18,20 +17,14 @@
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.weasis.dicom.op.CGetForward;
import org.weasis.dicom.param.AdvancedParams;
import org.weasis.dicom.param.ConnectOptions;
import org.weasis.dicom.param.DicomNode;
import org.weasis.dicom.param.DicomProgress;
import org.weasis.dicom.param.DicomState;
import org.weasis.dicom.param.ListenerParams;
import org.weasis.dicom.param.*;
import org.weasis.dicom.tool.DicomListener;

public class DicomListenerNetTest {
@Rule public TemporaryFolder testFolder = new TemporaryFolder();

@Test
public void testProcess() {
BasicConfigurator.configure();

AdvancedParams params = new AdvancedParams();
ConnectOptions connectOptions = new ConnectOptions();
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/org/weasis/dicom/EchoNetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
package org.weasis.dicom;

import org.apache.log4j.BasicConfigurator;
import org.dcm4che3.net.Status;
import org.hamcrest.core.IsEqual;
import org.junit.Assert;
Expand All @@ -22,7 +21,6 @@ public class EchoNetTest {

@Test
public void testProcess() {
BasicConfigurator.configure();

// DicomNode calling = new DicomNode("WEA-SCU");
// DicomNode called = new DicomNode("DCM4CHEE", "localhost", 11112);
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/org/weasis/dicom/ModalityWorklistNetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
package org.weasis.dicom;

import java.util.List;
import org.apache.log4j.BasicConfigurator;
import org.dcm4che3.data.Attributes;
import org.dcm4che3.data.Tag;
import org.dcm4che3.net.Status;
Expand All @@ -27,7 +26,6 @@ public class ModalityWorklistNetTest {

@Test
public void testProcess() {
BasicConfigurator.configure();

// Filter by AETitle by setting a value
final int[] sps = {Tag.ScheduledProcedureStepSequence};
Expand Down
3 changes: 0 additions & 3 deletions src/test/java/org/weasis/dicom/StowNetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.BasicConfigurator;
import org.dcm4che3.data.Attributes;
import org.dcm4che3.data.Tag;
import org.dcm4che3.data.VR;
Expand All @@ -36,8 +35,6 @@ public class StowNetTest {

@Test
public void testProcess() {
BasicConfigurator.configure();

List<String> files = new ArrayList<>();
try {
files.add(new File(getClass().getResource("mr.dcm").toURI()).getPath());
Expand Down

0 comments on commit ff4e6f4

Please sign in to comment.