diff --git a/.gitignore b/.gitignore index f6782eef4..9c9fee9ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,26 @@ +/target +/dicoogle/.classpath +/dicoogle/.settings/* +/sdk-ext/.classpath +/sdk-ext/.settings/* +/sdk/.classpath +/sdk/.project +/sdk/.settings/* +/webcore/lib/ node_modules/ -dist +**/webapp/dist .tmp .sass-cache/ -app/bower_components #eclipse .project .settings/* -dicoogle/.classpath -dicoogle/.settings/* -sdk-ext/.classpath -sdk-ext/.settings/* -sdk/.classpath -sdk/.project -sdk/.settings/* -webcore/lib/ +# IDEA .idea + +# Visual Studio Code .vscode/ + *.iml diff --git a/dicoogle/pom.xml b/dicoogle/pom.xml index b64140b9b..f517363c9 100644 --- a/dicoogle/pom.xml +++ b/dicoogle/pom.xml @@ -105,7 +105,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.3 + 3.5.1 package @@ -146,7 +146,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.11.0 ${project.build.sourceEncoding} 1.8 @@ -158,7 +158,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.2.0 + 3.3.1 ${project.build.sourceEncoding} @@ -209,16 +209,22 @@ com.mycila license-maven-plugin - 2.4 + 4.3 -
../short-license.txt
- - **/*.java - - - **/package-info.java - - + + JAVADOC_STYLE + + + +
../short-license.txt
+ + **/*.java + + + **/package-info.java + +
+
@@ -232,9 +238,10 @@ net.revelc.code.formatter formatter-maven-plugin - 2.11.0 + 2.16.0 UTF-8 + KEEP **/*.java @@ -257,7 +264,7 @@ com.github.eirslett frontend-maven-plugin - 1.12.0 + 1.14.0 @@ -296,8 +303,8 @@ - v14.17.3 - 6.14.13 + v18.17.1 + 9.6.7 target src/main/resources/webapp diff --git a/dicoogle/src/main/java/pt/ua/dicoogle/core/settings/LegacyServerSettings.java b/dicoogle/src/main/java/pt/ua/dicoogle/core/settings/LegacyServerSettings.java index e1fad5253..ba3a2c708 100644 --- a/dicoogle/src/main/java/pt/ua/dicoogle/core/settings/LegacyServerSettings.java +++ b/dicoogle/src/main/java/pt/ua/dicoogle/core/settings/LegacyServerSettings.java @@ -1284,7 +1284,7 @@ public List getDefaultStorage() { public String getNodeName() { return LegacyServerSettings.this.getNodeName(); } - + @JsonGetter("encrypt-users-file") @Override public boolean isEncryptUsersFile() { diff --git a/dicoogle/src/main/java/pt/ua/dicoogle/server/SOPList.java b/dicoogle/src/main/java/pt/ua/dicoogle/server/SOPList.java index 519b93995..b383bf9a6 100644 --- a/dicoogle/src/main/java/pt/ua/dicoogle/server/SOPList.java +++ b/dicoogle/src/main/java/pt/ua/dicoogle/server/SOPList.java @@ -48,91 +48,42 @@ public class SOPList { private Hashtable table; - private String[] SOP = { - UID.BasicStudyContentNotificationSOPClassRetired, - UID.StoredPrintStorageSOPClassRetired, - UID.HardcopyGrayscaleImageStorageSOPClassRetired, - UID.HardcopyColorImageStorageSOPClassRetired, - UID.ComputedRadiographyImageStorage, - UID.DigitalXRayImageStorageForPresentation, - UID.DigitalXRayImageStorageForProcessing, - UID.DigitalMammographyXRayImageStorageForPresentation, - UID.DigitalIntraOralXRayImageStorageForPresentation, - UID.DigitalIntraOralXRayImageStorageForProcessing, - UID.StandaloneModalityLUTStorageRetired, - UID.EncapsulatedPDFStorage, - UID.StandaloneVOILUTStorageRetired, - UID.GrayscaleSoftcopyPresentationStateStorageSOPClass, - UID.ColorSoftcopyPresentationStateStorageSOPClass, - UID.PseudoColorSoftcopyPresentationStateStorageSOPClass, - UID.BlendingSoftcopyPresentationStateStorageSOPClass, - UID.XRayAngiographicImageStorage, - UID.EnhancedXAImageStorage, - UID.XRayRadiofluoroscopicImageStorage, - UID.EnhancedXRFImageStorage, - UID.XRayAngiographicBiPlaneImageStorageRetired, - UID.PositronEmissionTomographyImageStorage, - UID.StandalonePETCurveStorageRetired, - UID.CTImageStorage, - UID.EnhancedCTImageStorage, - UID.NuclearMedicineImageStorage, - UID.UltrasoundMultiFrameImageStorageRetired, - UID.UltrasoundMultiFrameImageStorage, - UID.MRImageStorage, - UID.EnhancedMRImageStorage, - UID.MRSpectroscopyStorage, - UID.RTImageStorage, - UID.RTDoseStorage, - UID.RTStructureSetStorage, - UID.RTBeamsTreatmentRecordStorage, - UID.RTPlanStorage, - UID.RTBrachyTreatmentRecordStorage, - UID.RTTreatmentSummaryRecordStorage, - UID.NuclearMedicineImageStorageRetired, - UID.UltrasoundImageStorageRetired, - UID.UltrasoundImageStorage, - UID.RawDataStorage, - UID.SpatialRegistrationStorage, - UID.SpatialFiducialsStorage, - UID.RealWorldValueMappingStorage, - UID.SecondaryCaptureImageStorage, - UID.MultiFrameSingleBitSecondaryCaptureImageStorage, - UID.MultiFrameGrayscaleByteSecondaryCaptureImageStorage, - UID.MultiFrameGrayscaleWordSecondaryCaptureImageStorage, - UID.MultiFrameTrueColorSecondaryCaptureImageStorage, - UID.VLImageStorageTrialRetired, - UID.VLEndoscopicImageStorage, - UID.VideoEndoscopicImageStorage, - UID.VLMicroscopicImageStorage, - UID.VideoMicroscopicImageStorage, - UID.VLSlideCoordinatesMicroscopicImageStorage, - UID.VLPhotographicImageStorage, - UID.VideoPhotographicImageStorage, - UID.OphthalmicPhotography8BitImageStorage, - UID.OphthalmicPhotography16BitImageStorage, - UID.StereometricRelationshipStorage, - UID.VLMultiFrameImageStorageTrialRetired, - UID.StandaloneOverlayStorageRetired, - UID.BasicTextSRStorage, - UID.EnhancedSRStorage, - UID.ComprehensiveSRStorage, - UID.ProcedureLogStorage, - UID.MammographyCADSRStorage, - UID.KeyObjectSelectionDocumentStorage, - UID.ChestCADSRStorage, - UID.StandaloneCurveStorageRetired, - //UID._12leadECGWaveformStorage, - UID.GeneralECGWaveformStorage, - UID.AmbulatoryECGWaveformStorage, - UID.HemodynamicWaveformStorage, - UID.CardiacElectrophysiologyWaveformStorage, - UID.BasicVoiceAudioWaveformStorage, - UID.HangingProtocolStorage, - UID.SiemensCSANonImageStorage, - UID.VLWholeSlideMicroscopyImageStorage, - UID.BreastTomosynthesisImageStorage, - UID.XRayRadiationDoseSRStorage - }; + private String[] SOP = {UID.BasicStudyContentNotificationSOPClassRetired, UID.StoredPrintStorageSOPClassRetired, + UID.HardcopyGrayscaleImageStorageSOPClassRetired, UID.HardcopyColorImageStorageSOPClassRetired, + UID.ComputedRadiographyImageStorage, UID.DigitalXRayImageStorageForPresentation, + UID.DigitalXRayImageStorageForProcessing, UID.DigitalMammographyXRayImageStorageForPresentation, + UID.DigitalIntraOralXRayImageStorageForPresentation, UID.DigitalIntraOralXRayImageStorageForProcessing, + UID.StandaloneModalityLUTStorageRetired, UID.EncapsulatedPDFStorage, UID.StandaloneVOILUTStorageRetired, + UID.GrayscaleSoftcopyPresentationStateStorageSOPClass, UID.ColorSoftcopyPresentationStateStorageSOPClass, + UID.PseudoColorSoftcopyPresentationStateStorageSOPClass, + UID.BlendingSoftcopyPresentationStateStorageSOPClass, UID.XRayAngiographicImageStorage, + UID.EnhancedXAImageStorage, UID.XRayRadiofluoroscopicImageStorage, UID.EnhancedXRFImageStorage, + UID.XRayAngiographicBiPlaneImageStorageRetired, UID.PositronEmissionTomographyImageStorage, + UID.StandalonePETCurveStorageRetired, UID.CTImageStorage, UID.EnhancedCTImageStorage, + UID.NuclearMedicineImageStorage, UID.UltrasoundMultiFrameImageStorageRetired, + UID.UltrasoundMultiFrameImageStorage, UID.MRImageStorage, UID.EnhancedMRImageStorage, + UID.MRSpectroscopyStorage, UID.RTImageStorage, UID.RTDoseStorage, UID.RTStructureSetStorage, + UID.RTBeamsTreatmentRecordStorage, UID.RTPlanStorage, UID.RTBrachyTreatmentRecordStorage, + UID.RTTreatmentSummaryRecordStorage, UID.NuclearMedicineImageStorageRetired, + UID.UltrasoundImageStorageRetired, UID.UltrasoundImageStorage, UID.RawDataStorage, + UID.SpatialRegistrationStorage, UID.SpatialFiducialsStorage, UID.RealWorldValueMappingStorage, + UID.SecondaryCaptureImageStorage, UID.MultiFrameSingleBitSecondaryCaptureImageStorage, + UID.MultiFrameGrayscaleByteSecondaryCaptureImageStorage, + UID.MultiFrameGrayscaleWordSecondaryCaptureImageStorage, + UID.MultiFrameTrueColorSecondaryCaptureImageStorage, UID.VLImageStorageTrialRetired, + UID.VLEndoscopicImageStorage, UID.VideoEndoscopicImageStorage, UID.VLMicroscopicImageStorage, + UID.VideoMicroscopicImageStorage, UID.VLSlideCoordinatesMicroscopicImageStorage, + UID.VLPhotographicImageStorage, UID.VideoPhotographicImageStorage, + UID.OphthalmicPhotography8BitImageStorage, UID.OphthalmicPhotography16BitImageStorage, + UID.StereometricRelationshipStorage, UID.VLMultiFrameImageStorageTrialRetired, + UID.StandaloneOverlayStorageRetired, UID.BasicTextSRStorage, UID.EnhancedSRStorage, + UID.ComprehensiveSRStorage, UID.ProcedureLogStorage, UID.MammographyCADSRStorage, + UID.KeyObjectSelectionDocumentStorage, UID.ChestCADSRStorage, UID.StandaloneCurveStorageRetired, + // UID._12leadECGWaveformStorage, + UID.GeneralECGWaveformStorage, UID.AmbulatoryECGWaveformStorage, UID.HemodynamicWaveformStorage, + UID.CardiacElectrophysiologyWaveformStorage, UID.BasicVoiceAudioWaveformStorage, UID.HangingProtocolStorage, + UID.SiemensCSANonImageStorage, UID.VLWholeSlideMicroscopyImageStorage, UID.BreastTomosynthesisImageStorage, + UID.XRayRadiationDoseSRStorage}; public static synchronized SOPList getInstance() { if (instance == null) { @@ -383,10 +334,9 @@ public synchronized void updateList() { */ public synchronized void updateList(ServerSettings settings) { // Get all new SOP classes' UID (not existing in String[] SOP) - Collection newSOPs = settings.getDicomServicesSettings().getAdditionalSOPClasses().stream() - .map(AdditionalSOPClass::getUid) - .filter(newSOPUID -> !Arrays.asList(SOP).contains(newSOPUID)) - .collect(Collectors.toList()); + Collection newSOPs = + settings.getDicomServicesSettings().getAdditionalSOPClasses().stream().map(AdditionalSOPClass::getUid) + .filter(newSOPUID -> !Arrays.asList(SOP).contains(newSOPUID)).collect(Collectors.toList()); // Refresh hardcoded SOPs (outdated TransfersStorage) Arrays.asList(SOP).forEach(sop -> table.put(sop, new TransfersStorage())); // Add "Additional" SOPs to table w/ default transfer syntaxes @@ -417,11 +367,8 @@ public synchronized void readFromSettings() { * and update the archive's SOP list and storage transfer options accordingly. */ public synchronized void readFromSettings(ServerSettings settings) { - settings.getDicomServicesSettings() - .getSOPClasses() - .forEach(sopClass -> sopClass.getTransferSyntaxes() - .forEach(ts -> this.updateTSFieldByTsUID(sopClass.getUID(), ts, true)) - ); + settings.getDicomServicesSettings().getSOPClasses().forEach(sopClass -> sopClass.getTransferSyntaxes() + .forEach(ts -> this.updateTSFieldByTsUID(sopClass.getUID(), ts, true))); } /** Save any changes made to the SOP transfer options listings diff --git a/dicoogle/src/main/java/pt/ua/dicoogle/server/TransfersStorage.java b/dicoogle/src/main/java/pt/ua/dicoogle/server/TransfersStorage.java index fd48aa704..ee734212e 100755 --- a/dicoogle/src/main/java/pt/ua/dicoogle/server/TransfersStorage.java +++ b/dicoogle/src/main/java/pt/ua/dicoogle/server/TransfersStorage.java @@ -185,7 +185,7 @@ public String[] getVerboseTS() { } return return_value; } - + public static String convertTsNameToUID(String name) { return namesUidMapping.getKey(name).toString(); } diff --git a/dicoogle/src/main/java/pt/ua/dicoogle/server/queryretrieve/DicoogleDcmSend.java b/dicoogle/src/main/java/pt/ua/dicoogle/server/queryretrieve/DicoogleDcmSend.java index a89d8a53a..4fa146923 100644 --- a/dicoogle/src/main/java/pt/ua/dicoogle/server/queryretrieve/DicoogleDcmSend.java +++ b/dicoogle/src/main/java/pt/ua/dicoogle/server/queryretrieve/DicoogleDcmSend.java @@ -100,7 +100,8 @@ public class DicoogleDcmSend extends StorageCommitmentService { /** TransferSyntax: DCM4CHE URI Referenced */ private static final String DCM4CHEE_URI_REFERENCED_TS_UID = "1.2.40.0.13.1.1.2.4.94"; - private static final boolean FILE_READ_GUARD = System.getProperty("dicoogle.store.fileReadGuard", "").equalsIgnoreCase("true"); + private static final boolean FILE_READ_GUARD = + System.getProperty("dicoogle.store.fileReadGuard", "").equalsIgnoreCase("true"); private Executor executor = new NewThreadExecutor("DCMSND"); @@ -458,10 +459,8 @@ public void send() { FileInfo info = files.get(i); TransferCapability tc = assoc.getTransferCapabilityAsSCU(info.cuid); if (tc == null) { - LOGGER.warn("{} not supported by {}, skip file {}", - UIDDictionary.getDictionary().prompt(info.cuid), - remoteAE.getAETitle(), - info.item.getURI()); + LOGGER.warn("{} not supported by {}, skip file {}", UIDDictionary.getDictionary().prompt(info.cuid), + remoteAE.getAETitle(), info.item.getURI()); continue; } @@ -472,8 +471,7 @@ public void send() { LOGGER.warn("{} with {} not supported by {}, skip file {}", UIDDictionary.getDictionary().prompt(info.cuid), UIDDictionary.getDictionary().prompt(fileref ? DCM4CHEE_URI_REFERENCED_TS_UID : info.tsuid), - remoteAE.getAETitle(), - info.item.getURI()); + remoteAE.getAETitle(), info.item.getURI()); continue; } @@ -690,14 +688,12 @@ public void writeTo(PDVOutputStream out, String tsuid) throws IOException { } private void promptWarnRSP(String prefix, int status, FileInfo info, DicomObject cmd) { - LOGGER.warn("{} {}H for {}, cuid={}, tsuid={} (Command: {})", - prefix, StringUtils.shortToHex(status), + LOGGER.warn("{} {}H for {}, cuid={}, tsuid={} (Command: {})", prefix, StringUtils.shortToHex(status), info.item.getURI(), info.cuid, info.tsuid, cmd); } private void promptErrRSP(String prefix, int status, FileInfo info, DicomObject cmd) { - LOGGER.error("{} {}H for {}, cuid={}, tsuid={} (Command: {})", - prefix, StringUtils.shortToHex(status), + LOGGER.error("{} {}H for {}, cuid={}, tsuid={} (Command: {})", prefix, StringUtils.shortToHex(status), info.item.getURI(), info.cuid, info.tsuid, cmd); } diff --git a/dicoogle/src/main/java/pt/ua/dicoogle/server/users/UserFileHandle.java b/dicoogle/src/main/java/pt/ua/dicoogle/server/users/UserFileHandle.java index 01003f8b5..b9283a93a 100755 --- a/dicoogle/src/main/java/pt/ua/dicoogle/server/users/UserFileHandle.java +++ b/dicoogle/src/main/java/pt/ua/dicoogle/server/users/UserFileHandle.java @@ -89,7 +89,7 @@ public UserFileHandle(Path baseConfDir) throws IOException { } else if (Files.exists(users)) { // (2) users, encrypted logger.warn("File `users` will be interpreted as an encrypted users file. " - + "If this is correct, please rename to `users.xml.enc`"); + + "If this is correct, please rename to `users.xml.enc`"); filename = users; shouldEncrypt = true; } else if (Files.exists(usersXml)) { @@ -115,7 +115,7 @@ public UserFileHandle(Path baseConfDir) throws IOException { if (Files.exists(users)) { // (4) users, no encryption logger.warn("File `users` will be interpreted as an plain XML users file. " - + "If this is correct, please rename to `users.xml`"); + + "If this is correct, please rename to `users.xml`"); filename = users; shouldEncrypt = false; } else if (encryptUsersFile) { diff --git a/dicoogle/src/main/java/pt/ua/dicoogle/server/web/servlets/management/TransferOptionsServlet.java b/dicoogle/src/main/java/pt/ua/dicoogle/server/web/servlets/management/TransferOptionsServlet.java index d347356a9..c4836a87e 100644 --- a/dicoogle/src/main/java/pt/ua/dicoogle/server/web/servlets/management/TransferOptionsServlet.java +++ b/dicoogle/src/main/java/pt/ua/dicoogle/server/web/servlets/management/TransferOptionsServlet.java @@ -79,7 +79,7 @@ protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws Se ServerSettingsManager.saveSettings(); ResponseUtil.simpleResponse(resp, "success", true); } - + @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { this.doPut(req, resp); diff --git a/dicoogle/src/test/java/pt/ua/dicoogle/core/settings/ServerSettingsTest.java b/dicoogle/src/test/java/pt/ua/dicoogle/core/settings/ServerSettingsTest.java index 679ccacfd..aa7035064 100644 --- a/dicoogle/src/test/java/pt/ua/dicoogle/core/settings/ServerSettingsTest.java +++ b/dicoogle/src/test/java/pt/ua/dicoogle/core/settings/ServerSettingsTest.java @@ -85,19 +85,17 @@ public void testLoadConfig1() throws IOException { "1.2.840.10008.1.2.4.80", "1.2.840.10008.1.2.4.50"); assertSameContent(defaultTS, ((DicomServicesImpl) dcm).getDefaultTransferSyntaxes()); - Collection sopClasses = - Arrays.asList( - // CT Image Storage - new SOPClass("1.2.840.10008.5.1.4.1.1.2", Collections.emptyList()), - // Enhanced CT Image Storage - new SOPClass("1.2.840.10008.5.1.4.1.1.2.1", Collections.emptyList()), - // Enhanced CT Image Storage - new SOPClass("1.2.840.10008.5.1.4.1.1.12.1.1", - Arrays.asList("1.2.840.10008.1.2", "1.2.840.10008.1.2.1", "1.2.840.10008.1.2.5")), - // Ultrasound Multi-frame Image Storage - new SOPClass("1.2.840.10008.5.1.4.1.1.3.1", - Arrays.asList("1.2.840.10008.1.2", "1.2.840.10008.1.2.1", "1.2.840.10008.1.2.4.50", "1.2.840.10008.1.2.4.70")) - ); + Collection sopClasses = Arrays.asList( + // CT Image Storage + new SOPClass("1.2.840.10008.5.1.4.1.1.2", Collections.emptyList()), + // Enhanced CT Image Storage + new SOPClass("1.2.840.10008.5.1.4.1.1.2.1", Collections.emptyList()), + // Enhanced CT Image Storage + new SOPClass("1.2.840.10008.5.1.4.1.1.12.1.1", + Arrays.asList("1.2.840.10008.1.2", "1.2.840.10008.1.2.1", "1.2.840.10008.1.2.5")), + // Ultrasound Multi-frame Image Storage + new SOPClass("1.2.840.10008.5.1.4.1.1.3.1", Arrays.asList("1.2.840.10008.1.2", "1.2.840.10008.1.2.1", + "1.2.840.10008.1.2.4.50", "1.2.840.10008.1.2.4.70"))); Collection sopClassesFromSettings = ((DicomServicesImpl) dcm).getRawSOPClasses(); assertSameContent(sopClasses, sopClassesFromSettings); @@ -256,33 +254,21 @@ public void testLoadTransferOptions() throws IOException { ServerSettings.DicomServices dcm = settings.getDicomServicesSettings(); // should distinguish between an empty list and missing list - for (SOPClass sopClass: dcm.getSOPClasses()) { + for (SOPClass sopClass : dcm.getSOPClasses()) { switch (sopClass.getUID()) { case UID.CTImageStorage: - assertEquals( - Arrays.asList( - "1.2.840.10008.1.2", - "1.2.840.10008.1.2.1" - ), - sopClass.getTransferSyntaxes()); + assertEquals(Arrays.asList("1.2.840.10008.1.2", "1.2.840.10008.1.2.1"), + sopClass.getTransferSyntaxes()); break; case UID.UltrasoundMultiFrameImageStorage: - assertEquals( - Arrays.asList( - "1.2.840.10008.1.2", - "1.2.840.10008.1.2.1", - "1.2.840.10008.1.2.4.50", - "1.2.840.10008.1.2.4.70" - ), - sopClass.getTransferSyntaxes()); + assertEquals(Arrays.asList("1.2.840.10008.1.2", "1.2.840.10008.1.2.1", "1.2.840.10008.1.2.4.50", + "1.2.840.10008.1.2.4.70"), sopClass.getTransferSyntaxes()); break; case UID.UltrasoundMultiFrameImageStorageRetired: // no transfer syntaxes here, // and no default transfer syntaxes, // means no acceptable transfer syntax - assertEquals( - Collections.emptyList(), - sopClass.getTransferSyntaxes()); + assertEquals(Collections.emptyList(), sopClass.getTransferSyntaxes()); break; default: } @@ -294,31 +280,16 @@ public void testLoadTransferOptions() throws IOException { // see that the SOP list has been updated accordingly - assertEquals( - Arrays.asList("1.2.840.10008.1.2", "1.2.840.10008.1.2.1"), - list.getTS(UID.CTImageStorage).asList() - ); - assertEquals( - Arrays.asList( - "1.2.840.10008.1.2", - "1.2.840.10008.1.2.1", - "1.2.840.10008.1.2.4.70", - "1.2.840.10008.1.2.4.50" - ), - list.getTS(UID.UltrasoundMultiFrameImageStorage).asList() - ); - assertEquals( - Collections.emptyList(), - list.getTS(UID.UltrasoundMultiFrameImageStorageRetired).asList() - ); + assertEquals(Arrays.asList("1.2.840.10008.1.2", "1.2.840.10008.1.2.1"), + list.getTS(UID.CTImageStorage).asList()); + assertEquals(Arrays.asList("1.2.840.10008.1.2", "1.2.840.10008.1.2.1", "1.2.840.10008.1.2.4.70", + "1.2.840.10008.1.2.4.50"), list.getTS(UID.UltrasoundMultiFrameImageStorage).asList()); + assertEquals(Collections.emptyList(), list.getTS(UID.UltrasoundMultiFrameImageStorageRetired).asList()); // unmentioned SOP classes default to // accepting the default transfer syntaxes // (in this case, empty) - assertEquals( - Collections.emptyList(), - list.getTS(UID.BreastTomosynthesisImageStorage).asList() - ); + assertEquals(Collections.emptyList(), list.getTS(UID.BreastTomosynthesisImageStorage).asList()); } @Test @@ -348,32 +319,20 @@ public void testUpdateTransferOptions() throws IOException { Collection sopClasses = dcm.getSOPClasses(); for (SOPClass sopClass : sopClasses) { Collection tses = sopClass.getTransferSyntaxes(); - + switch (sopClass.getUID()) { case UID.CTImageStorage: assertEquals(Collections.emptyList(), tses); break; case UID.EnhancedXAImageStorage: - assertEquals( - Arrays.asList( - "1.2.840.10008.1.2", - "1.2.840.10008.1.2.1", - "1.2.840.10008.1.2.5" - ), - tses - ); + assertEquals(Arrays.asList("1.2.840.10008.1.2", "1.2.840.10008.1.2.1", "1.2.840.10008.1.2.5"), + tses); break; case UID.EnhancedCTImageStorage: - // fallthrough (same settings) + // fallthrough (same settings) case UID.UltrasoundMultiFrameImageStorage: - assertEquals( - Arrays.asList( - "1.2.840.10008.1.2", - "1.2.840.10008.1.2.1", - "1.2.840.10008.1.2.4.70", - "1.2.840.10008.1.2.4.50" - ), - tses); + assertEquals(Arrays.asList("1.2.840.10008.1.2", "1.2.840.10008.1.2.1", "1.2.840.10008.1.2.4.70", + "1.2.840.10008.1.2.4.50"), tses); break; default: break; @@ -419,11 +378,9 @@ public void testAdditionals() throws IOException { Logger logger = NOPLogger.NOP_LOGGER; // Filter (as in init) ds.setAdditionalTransferSyntaxes(ds.getAdditionalTransferSyntaxes().stream() - .filter(ats -> AdditionalTransferSyntax.isValid(ats, logger)) - .collect(Collectors.toList())); + .filter(ats -> AdditionalTransferSyntax.isValid(ats, logger)).collect(Collectors.toList())); ds.setAdditionalSOPClasses(ds.getAdditionalSOPClasses().stream() - .filter(asc -> AdditionalSOPClass.isValid(asc, logger)) - .collect(Collectors.toList())); + .filter(asc -> AdditionalSOPClass.isValid(asc, logger)).collect(Collectors.toList())); // assertions follow diff --git a/dicoogle/src/test/java/pt/ua/dicoogle/webui/WebUIPluginTest.java b/dicoogle/src/test/java/pt/ua/dicoogle/webui/WebUIPluginTest.java index 2a928e3a4..d53e3bd63 100644 --- a/dicoogle/src/test/java/pt/ua/dicoogle/webui/WebUIPluginTest.java +++ b/dicoogle/src/test/java/pt/ua/dicoogle/webui/WebUIPluginTest.java @@ -43,9 +43,8 @@ public class WebUIPluginTest { public void testLoadPlugin1() throws IOException, PluginFormatException { WebUIPluginManager webui = new WebUIPluginManager(); - String test1Path = WebUIPluginTest.class.getClassLoader() - .getResource("pt/ua/dicoogle/webui/WebPlugins/test1") - .getFile(); + String test1Path = + WebUIPluginTest.class.getClassLoader().getResource("pt/ua/dicoogle/webui/WebPlugins/test1").getFile(); webui.load(new File(test1Path)); WebUIPlugin plugin = webui.get("test1"); diff --git a/pom.xml b/pom.xml index f498ed62e..0b411c402 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.11.0 1.8 1.8 @@ -28,15 +28,22 @@ com.mycila license-maven-plugin - 2.4 + 4.3 -
short-license.txt
- - **/*.java - - - **/package-info.java - + + JAVADOC_STYLE + + + +
short-license.txt
+ + **/*.java + + + **/package-info.java + +
+
@@ -51,9 +58,10 @@ net.revelc.code.formatter formatter-maven-plugin - 2.11.0 + 2.16.0 UTF-8 + KEEP **/*.java diff --git a/sdk/pom.xml b/sdk/pom.xml index 641f50951..2ff2d42b7 100644 --- a/sdk/pom.xml +++ b/sdk/pom.xml @@ -56,25 +56,25 @@ org.apache.maven.plugins maven-shade-plugin - 2.3 + 3.5.1 + + + + *:* + + **/*.SF + **/*.DSA + **/*.RSA + + + + package shade - - - - *:* - - **/*.SF - **/*.DSA - **/*.RSA - - - - @@ -82,7 +82,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.11.0 ${project.build.sourceEncoding} 1.8 @@ -93,7 +93,7 @@ org.apache.maven.plugins maven-resources-plugin - 2.4.3 + 3.3.1 ${project.build.sourceEncoding} @@ -102,17 +102,23 @@ com.mycila license-maven-plugin - 2.4 + 4.3 -
../short-license.txt
- - **/*.java - - - **/package-info.java - + + JAVADOC_STYLE + + + +
../short-license.txt
+ + **/*.java + + + **/package-info.java + +
+
- @@ -125,9 +131,10 @@ net.revelc.code.formatter formatter-maven-plugin - 2.11.0 + 2.16.0 UTF-8 + KEEP **/*.java diff --git a/sdk/src/main/java/pt/ua/dicoogle/sdk/datastructs/dim/DIMGeneric.java b/sdk/src/main/java/pt/ua/dicoogle/sdk/datastructs/dim/DIMGeneric.java index 2a0fe2304..5544f82f0 100755 --- a/sdk/src/main/java/pt/ua/dicoogle/sdk/datastructs/dim/DIMGeneric.java +++ b/sdk/src/main/java/pt/ua/dicoogle/sdk/datastructs/dim/DIMGeneric.java @@ -457,7 +457,7 @@ public JSONObject getJSONObject(int depth, int offset, int psize) { // not a number, do not include } } - + instances.add(image); } seriesObj.put("images", instances);