diff --git a/pom.xml b/pom.xml index c5a2a21..bab417b 100644 --- a/pom.xml +++ b/pom.xml @@ -7,17 +7,17 @@ weasis-dicom-tools jar Weasis DICOM API (based on dcm4che3) - 5.31.0 + 5.31.1 17 [${java-version},) [3.0.5,) - 5.31.0 + 5.31.1 UTF-8 UTF-8 - 4.8.0.1 - 4.8.0-dcm + 4.8.1 + 4.8.1-dcm weasis-dicom-tools nroduit-github diff --git a/src/main/java/org/dcm4che3/img/op/MaskArea.java b/src/main/java/org/dcm4che3/img/op/MaskArea.java index 9719dad..562fd81 100644 --- a/src/main/java/org/dcm4che3/img/op/MaskArea.java +++ b/src/main/java/org/dcm4che3/img/op/MaskArea.java @@ -58,8 +58,7 @@ public static ImageCV drawShape(Mat srcImg, MaskArea maskArea) { Scalar color = c == null ? new Scalar(0, 0, 0) : new Scalar(c.getBlue(), c.getGreen(), c.getRed()); for (Shape shape : maskArea.getShapeList()) { - if (c == null && shape instanceof Rectangle) { - Rectangle r = (Rectangle) shape; + if (c == null && shape instanceof Rectangle r) { 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) {