From ceeb970110675d388782bee4d56a2675e94c31da Mon Sep 17 00:00:00 2001 From: Salim Kanoun Date: Thu, 14 Jun 2018 16:11:07 +0200 Subject: [PATCH 01/10] debug --- src/org/petctviewer/orthanc/monitoring/CD_Burner.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/org/petctviewer/orthanc/monitoring/CD_Burner.java b/src/org/petctviewer/orthanc/monitoring/CD_Burner.java index 709ff190..9da910bc 100644 --- a/src/org/petctviewer/orthanc/monitoring/CD_Burner.java +++ b/src/org/petctviewer/orthanc/monitoring/CD_Burner.java @@ -271,14 +271,13 @@ private File printDat(String nom, String id, String date, String studyDescriptio SimpleDateFormat formatter = new SimpleDateFormat(dateFormatChoix); String formattedDate = formatter.format(dateExamen); - //On parse le nom pour enlever les _ et passer le prenom en minuscule + //On parse le nom pour enlever les ^ et passer le prenom en minuscule int separationNomPrenom=nom.indexOf("^", 0); if (separationNomPrenom!=-1) { nom=nom.substring(0, separationNomPrenom+2)+nom.substring(separationNomPrenom+2).toLowerCase(); } - - String datFile = "patientName="+nom.replaceAll("^", " ")+"\n" + String datFile = "patientName="+nom.replaceAll("\\^", " ")+"\n" + "patientId=" + id +"\n" + "patientDate="+ formattedDate + "\n" + "studyDescription="+ studyDescription+"\n"; From fa3db74bddd054ff2430f54cd4fc12e679b40702 Mon Sep 17 00:00:00 2001 From: salim Date: Fri, 22 Jun 2018 09:06:52 +0200 Subject: [PATCH 02/10] debug --- .../orthanc/anonymize/VueAnon.java | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/org/petctviewer/orthanc/anonymize/VueAnon.java b/src/org/petctviewer/orthanc/anonymize/VueAnon.java index e5f0b9b0..c9e355df 100644 --- a/src/org/petctviewer/orthanc/anonymize/VueAnon.java +++ b/src/org/petctviewer/orthanc/anonymize/VueAnon.java @@ -109,7 +109,7 @@ public class VueAnon extends JFrame implements PlugIn{ private JLabel state = new JLabel(); private DateFormat df = new SimpleDateFormat("MM/dd/yyyy"); private DateFormat dfZip = new SimpleDateFormat("MM_dd_yyyy_HHmmss"); - private JFrame gui=this; + private JFrame gui; private JSONParser parser=new JSONParser(); //QueryFillStore @@ -235,6 +235,11 @@ public VueAnon(){ if(runOrthanc.getIsStarted()) { makeGUI(); } + else { + //SK PROBLEME LE PROGRAMME NE QUITTE PAS + System.out.println("ici"); + //this.dispose(); + } }else { makeGUI(); @@ -243,6 +248,7 @@ public VueAnon(){ } public void makeGUI(){ + gui=this; //On set les objets necessaires modelePatients = new TableDataPatientsAnon(connexionHttp); modeleExportSeries = new TableDataExportSeries(connexionHttp, this, stateExports); @@ -2516,6 +2522,9 @@ public void stateChanged(ChangeEvent e) { this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); this.getRootPane().setDefaultButton(search); this.addWindowListener(new CloseWindowAdapter(this, this.zipContent, this.modeleAnonStudies.getOldOrthancUIDs(), this.modeleExportStudies.getStudiesList(), monitoring, runOrthanc)); + pack(); + setLocationRelativeTo(null); + setVisible(true); } private void openCloseAnonTool(boolean open) { @@ -2913,17 +2922,8 @@ protected void done(){ public static void main(String... args){ System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog"); - VueAnon vue = new VueAnon(); - SwingUtilities.invokeLater(new Runnable(){ - - @Override - public void run() { - vue.pack(); - vue.setLocationRelativeTo(null); - vue.setVisible(true); - - } - }); + new VueAnon(); + } @Override @@ -2932,12 +2932,8 @@ public void run(String string) { @Override public void run() { - VueAnon vue = new VueAnon(); - vue.pack(); - vue.setLocationRelativeTo(null); - WindowManager.addWindow(gui); - IJ.register(VueAnon.class); - vue.setVisible(true); + new VueAnon(); + } }); From f68196756a140b7c871bee894228c0a1541fa10c Mon Sep 17 00:00:00 2001 From: salim Date: Fri, 22 Jun 2018 09:46:00 +0200 Subject: [PATCH 03/10] debug --- .../orthanc/monitoring/Tag_Monitoring.java | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java b/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java index fc1940e0..668df50c 100644 --- a/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java +++ b/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java @@ -134,12 +134,20 @@ private HashMap getMainPatientTag(JSONObject mainPatientTag) { textAreaConsole.append("PatientSex"+ patientSex+ ","); textAreaConsole.append("PatientBirthDate= " +birthDate+ "\n"); - String[] name =patientName.split("^"); HashMap hashmapTagPatient=new HashMap(); + + if(patientName.indexOf("^") != -1) { + String[] namePatient =patientName.split("^"); + hashmapTagPatient.put("LastName", namePatient[0]); + hashmapTagPatient.put("FirstName", namePatient[1]); + } + else { + hashmapTagPatient.put("LastName", patientName); + hashmapTagPatient.put("FirstName", "N/A"); + } + hashmapTagPatient.put("PatientBirthDate", birthDate); hashmapTagPatient.put("PatientID", patientID); - hashmapTagPatient.put("LastName", name[0]); - hashmapTagPatient.put("FirstName", name[1]); hashmapTagPatient.put("PatientSex", patientSex); return hashmapTagPatient; @@ -226,9 +234,17 @@ private HashMap getTagFromInstance(String seriesID) { } - String[] namePatient =hashmapTag.get("PatientName").split("^"); - hashmapTag.put("LastName", namePatient[0]); - hashmapTag.put("FirstName", namePatient[1]); + + if(hashmapTag.get("PatientName").indexOf("^") != -1) { + String[] namePatient =hashmapTag.get("PatientName").split("^"); + hashmapTag.put("LastName", namePatient[0]); + hashmapTag.put("FirstName", namePatient[1]); + } + else { + hashmapTag.put("LastName", hashmapTag.get("PatientName")); + hashmapTag.put("FirstName", "N/A"); + } + for (int i=0 ; i Date: Sat, 23 Jun 2018 14:34:29 +0200 Subject: [PATCH 04/10] monitoring progress --- .../orthanc/monitoring/JDBC_Monitoring.java | 21 ++-- .../orthanc/monitoring/Tag_Monitoring.java | 9 +- .../orthanc/monitoring/monitoring.sql | 101 +++++++++++------- 3 files changed, 74 insertions(+), 57 deletions(-) diff --git a/src/org/petctviewer/orthanc/monitoring/JDBC_Monitoring.java b/src/org/petctviewer/orthanc/monitoring/JDBC_Monitoring.java index 95afaa64..347a07da 100644 --- a/src/org/petctviewer/orthanc/monitoring/JDBC_Monitoring.java +++ b/src/org/petctviewer/orthanc/monitoring/JDBC_Monitoring.java @@ -28,15 +28,6 @@ public class JDBC_Monitoring { private Connection connection; private Preferences jprefer = Preferences.userRoot().node("/anonPlugin"); - - public static void main(String arg[]) { - JDBC_Monitoring monitoring=new JDBC_Monitoring(); - monitoring.InsertPatient("a", "b", "c", "dd","e","f"); - monitoring.InsertStudy("gd", "dfg", "dfg", "dg","dg", "dfg", "dfg", "dg", "gd"); - monitoring.InsertSeries("100", "100", "90", "Manifacturer", "Manifacturer_Model", "Performing_Physician_Name", "Series_Description", "Station_Name", "22012015", "15124500", "Protocol_Name", "Series_Instance_UID", "Comment_Radiation_Dose", "Radiopharmaceutical_sequence", "Radiopharmaceutical", "RadiopharmaceuticalStartTime", "RadionuclideTotalDose", "RadionuclideHalfLife", "RadionuclidePositronFraction", "Radiation_Dose_Module", "Shared_Tags", "Orthanc_Serie_ID"); - - - } public JDBC_Monitoring() { @@ -74,12 +65,12 @@ public void InsertPatient(String patientLastName, String patientFirstName, Strin } public void InsertStudy(String studyID, String studyInstanceUID, String Orthanc_Study_ID, String accessionNumber, String institutionName, String referringPhysicianName, - String studyDate, String studyDescription, String studyTime ) { + String studyDate, String studyDescription, String studyTime, String parentPatientOrthanc ) { try { Statement st = connection.createStatement(); - String sql = ("INSERT INTO `studies`(`accessionNumber`, `institutionName`, `referringPhysicianName`, `studyDate`, `studyDescription`, `studyID`, `studyInstanceUID`, `studyTime`, `Orthanc_Study_ID`) " - + "VALUES ('"+accessionNumber+"','"+institutionName+"','"+referringPhysicianName+"','"+studyDate+"','"+studyDescription+"','"+studyID+"','"+studyInstanceUID+"','"+studyTime+"','"+Orthanc_Study_ID+"')"); + String sql = ("INSERT INTO `studies`(`accessionNumber`, `institutionName`, `referringPhysicianName`, `studyDate`, `studyDescription`, `studyID`, `studyInstanceUID`, `studyTime`, `Orthanc_Study_ID`, `parentPatientOrthanc`) " + + "VALUES ('"+accessionNumber+"','"+institutionName+"','"+referringPhysicianName+"','"+studyDate+"','"+studyDescription+"','"+studyID+"','"+studyInstanceUID+"','"+studyTime+"','"+Orthanc_Study_ID+"','"+parentPatientOrthanc+"')"); System.out.println(sql); boolean rs = st.execute(sql); } catch (SQLException e) { @@ -92,12 +83,12 @@ public void InsertStudy(String studyID, String studyInstanceUID, String Orthanc_ public void InsertSeries(String size, String age, String weight, String Manifacturer, String Manifacturer_Model, String Performing_Physician_Name, String Series_Description, String Station_Name, String Content_Date, String Content_Time, String Protocol_Name, String Series_Instance_UID, String Comment_Radiation_Dose, String Radiopharmaceutical_sequence, String Radiopharmaceutical, String RadiopharmaceuticalStartTime, String RadionuclideTotalDose, String RadionuclideHalfLife, String RadionuclidePositronFraction, - String Radiation_Dose_Module, String Shared_Tags, String Orthanc_Serie_ID) { + String Radiation_Dose_Module, String Shared_Tags, String Orthanc_Serie_ID, String parentStudyOrthanc) { try { Statement st = connection.createStatement(); - String sql = ("INSERT INTO `series`(`size`, `age`, `weight`, `Manifacturer`, `Manifacturer_Model`, `Performing_Physician_Name`, `Series_Description`, `Station_Name`, `Content_Date`, `Content_Time`, `Protocol_Name`, `Series_Instance_UID`, `Comment_Radiation_Dose`, `Radiopharmaceutical_sequence`, `Radiopharmaceutical`, `RadiopharmaceuticalStartTime`, `RadionuclideTotalDose`, `RadionuclideHalfLife`, `RadionuclidePositronFraction`, `Radiation_Dose_Module`, `shared_Tags`, `Orthanc_Serie_ID`) " - + "VALUES ('"+size+"','"+age+"','"+weight+"','"+Manifacturer+"','"+Manifacturer_Model+"','"+Performing_Physician_Name+"','"+Series_Description+"','"+Station_Name+"','"+Content_Date+"','"+Content_Time+"','"+Protocol_Name+"','"+Series_Instance_UID+"','"+Comment_Radiation_Dose+"','"+Radiopharmaceutical_sequence+"','"+Radiopharmaceutical+"','"+RadiopharmaceuticalStartTime+"','"+RadionuclideTotalDose+"','"+RadionuclideHalfLife+"','"+RadionuclidePositronFraction+"','"+Radiation_Dose_Module+"','"+Shared_Tags+"','"+Orthanc_Serie_ID+"')"); + String sql = ("INSERT INTO `series`(`size`, `age`, `weight`, `Manifacturer`, `Manifacturer_Model`, `Performing_Physician_Name`, `Series_Description`, `Station_Name`, `Content_Date`, `Content_Time`, `Protocol_Name`, `Series_Instance_UID`, `Comment_Radiation_Dose`, `Radiopharmaceutical_sequence`, `Radiopharmaceutical`, `RadiopharmaceuticalStartTime`, `RadionuclideTotalDose`, `RadionuclideHalfLife`, `RadionuclidePositronFraction`, `Radiation_Dose_Module`, `shared_Tags`, `Orthanc_Serie_ID`,`parentStudyOrthanc` ) " + + "VALUES ('"+size+"','"+age+"','"+weight+"','"+Manifacturer+"','"+Manifacturer_Model+"','"+Performing_Physician_Name+"','"+Series_Description+"','"+Station_Name+"','"+Content_Date+"','"+Content_Time+"','"+Protocol_Name+"','"+Series_Instance_UID+"','"+Comment_Radiation_Dose+"','"+Radiopharmaceutical_sequence+"','"+Radiopharmaceutical+"','"+RadiopharmaceuticalStartTime+"','"+RadionuclideTotalDose+"','"+RadionuclideHalfLife+"','"+RadionuclidePositronFraction+"','"+Radiation_Dose_Module+"','"+Shared_Tags+"','"+Orthanc_Serie_ID+"','"+parentStudyOrthanc+"')"); System.out.println(sql); boolean rs = st.execute(sql); } catch (SQLException e) { diff --git a/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java b/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java index 668df50c..47a4f9b2 100644 --- a/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java +++ b/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java @@ -72,7 +72,7 @@ else if (level.equals("study")) { } if(jprefer.getBoolean("useDBMonitoring", false)) { db.InsertPatient(studyTag.get("LastName"), studyTag.get("FirstName") , studyTag.get("PatientID"), monitoring.newPatientID.get(i), studyTag.get("PatientBirthDate"), studyTag.get("PatientSex") ); - db.InsertStudy(studyTag.get("StudyID"), studyTag.get("StudyInstanceUID"), studyTag.get(monitoring.newStudyID.get(i)), studyTag.get("AccessionNumber"), studyTag.get("InstitutionName"), studyTag.get("ReferringPhysicianName"), studyTag.get("StudyDate"), studyTag.get("StudyDescription"), studyTag.get("StudyTime")); + db.InsertStudy(studyTag.get("StudyID"), studyTag.get("StudyInstanceUID"), studyTag.get(monitoring.newStudyID.get(i)), studyTag.get("AccessionNumber"), studyTag.get("InstitutionName"), studyTag.get("ReferringPhysicianName"), studyTag.get("StudyDate"), studyTag.get("StudyDescription"), studyTag.get("StudyTime"), studyTag.get("ParentPatient")); } if(jprefer.getBoolean("AutoDeleteMonitoring", false)) { @@ -93,11 +93,10 @@ else if (level.equals("serie")) { textAreaConsole.append("Shared-Tags"+sbSharedTags+","); foundTags.put("Shared_Tags", sbSharedTags.toString()); - System.out.println(foundTags.toString()); if(jprefer.getBoolean("useDBMonitoring", false)) { db.InsertPatient(foundTags.get("LastName"), foundTags.get("FirstName") , foundTags.get("PatientID"), foundTags.get("ParentPatient") , foundTags.get("PatientBirthDate"), foundTags.get("PatientSex") ); - db.InsertStudy(foundTags.get("StudyID"), foundTags.get("StudyInstanceUID"), foundTags.get("ParentStudy") , foundTags.get("AccessionNumber"), foundTags.get("InstitutionName"), foundTags.get("ReferringPhysicianName"), foundTags.get("StudyDate"), foundTags.get("StudyDescription"), foundTags.get("StudyTime")); - db.InsertSeries(foundTags.get("PatientSize"), foundTags.get("PatientAge"), foundTags.get("PatientWeight"),foundTags.get("Manufacturer"), foundTags.get("ManufacturerModelName"), foundTags.get("PerformingPhysicianName"), foundTags.get("SeriesDescription"), foundTags.get("StationName"), foundTags.get("ContentDate"), foundTags.get("ContentTime"), foundTags.get("ProtocolName"), foundTags.get("SeriesInstanceUID"), foundTags.get("CommentsOnRadiationDose"), foundTags.get("RadiopharmaceuticalInformationSequence"), foundTags.get("Radiopharmaceutical"), foundTags.get("RadiopharmaceuticalStartTime"), foundTags.get("RadionuclideTotalDose"), foundTags.get("RadionuclideHalfLife"), foundTags.get("RadionuclidePositronFraction"), foundTags.get(Tag_Of_Interest.radiationDoseModule), foundTags.get("Shared_Tags"), foundTags.get(monitoring.newStableSeriesID.get(i))); + db.InsertStudy(foundTags.get("StudyID"), foundTags.get("StudyInstanceUID"), foundTags.get("ParentStudy") , foundTags.get("AccessionNumber"), foundTags.get("InstitutionName"), foundTags.get("ReferringPhysicianName"), foundTags.get("StudyDate"), foundTags.get("StudyDescription"), foundTags.get("StudyTime"), foundTags.get("ParentPatient")); + db.InsertSeries(foundTags.get("PatientSize"), foundTags.get("PatientAge"), foundTags.get("PatientWeight"),foundTags.get("Manufacturer"), foundTags.get("ManufacturerModelName"), foundTags.get("PerformingPhysicianName"), foundTags.get("SeriesDescription"), foundTags.get("StationName"), foundTags.get("ContentDate"), foundTags.get("ContentTime"), foundTags.get("ProtocolName"), foundTags.get("SeriesInstanceUID"), foundTags.get("CommentsOnRadiationDose"), foundTags.get("RadiopharmaceuticalInformationSequence"), foundTags.get("Radiopharmaceutical"), foundTags.get("RadiopharmaceuticalStartTime"), foundTags.get("RadionuclideTotalDose"), foundTags.get("RadionuclideHalfLife"), foundTags.get("RadionuclidePositronFraction"), foundTags.get(Tag_Of_Interest.radiationDoseModule), foundTags.get("Shared_Tags"), foundTags.get(monitoring.newStableSeriesID.get(i)), foundTags.get("ParentStudy")); } if(jprefer.getBoolean("AutoDeleteMonitoring", false)) { @@ -169,6 +168,7 @@ private HashMap getMainStudyTag(JSONObject jsonStudy) { String studyID=(String) jsonMainStudyTag.get("StudyID"); String studyInstanceUID=(String) jsonMainStudyTag.get("StudyInstanceUID"); String studyTime=(String) jsonMainStudyTag.get("StudyTime"); + String parentPatientID=(String) jsonMainStudyTag.get("ParentPatient"); textAreaConsole.append("AccessionNumber= "+accessionNumber+ ","); textAreaConsole.append("InstitutionName= " + institutionName+ ","); @@ -187,6 +187,7 @@ private HashMap getMainStudyTag(JSONObject jsonStudy) { hashmapTagPatient.put("StudyID", studyID); hashmapTagPatient.put("StudyInstanceUID", studyInstanceUID); hashmapTagPatient.put("StudyTime", studyTime); + hashmapTagPatient.put("ParentPatient", parentPatientID); return hashmapTagPatient; diff --git a/src/org/petctviewer/orthanc/monitoring/monitoring.sql b/src/org/petctviewer/orthanc/monitoring/monitoring.sql index 49eea5bd..4474da1a 100644 --- a/src/org/petctviewer/orthanc/monitoring/monitoring.sql +++ b/src/org/petctviewer/orthanc/monitoring/monitoring.sql @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Client : localhost --- Généré le : Ven 18 Mai 2018 à 23:58 +-- Généré le : Sam 23 Juin 2018 à 14:31 -- Version du serveur : 5.7.22-0ubuntu0.16.04.1 -- Version de PHP : 7.0.30-0ubuntu0.16.04.1 @@ -28,11 +28,11 @@ SET time_zone = "+00:00"; CREATE TABLE `patients` ( `Orthanc_Patient_ID` varchar(70) NOT NULL, - `Last_Name` varchar(70) NOT NULL, - `First_Name` varchar(70) NOT NULL, + `Last_Name` varchar(70) DEFAULT NULL, + `First_Name` varchar(70) DEFAULT NULL, `Patient_ID` varchar(32) NOT NULL, - `DOB` varchar(8) NOT NULL, - `Sex` varchar(6) NOT NULL + `DOB` varchar(8) DEFAULT NULL, + `Sex` varchar(6) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -42,27 +42,29 @@ CREATE TABLE `patients` ( -- CREATE TABLE `series` ( - `size` double NOT NULL, - `age` double NOT NULL, - `weight` double NOT NULL, - `Manifacturer` varchar(32) NOT NULL, - `Manifacturer_Model` varchar(32) NOT NULL, - `Performing_Physician_Name` varchar(32) NOT NULL, - `Series_Description` varchar(32) NOT NULL, - `Station_Name` varchar(32) NOT NULL, - `Content_Date` varchar(8) NOT NULL, - `Content_Time` varchar(15) NOT NULL, - `Protocol_Name` varchar(32) NOT NULL, - `Series_Instance_UID` varchar(70) NOT NULL, - `Comment_Radiation_Dose` text NOT NULL, - `Radiopharmaceutical_sequence` text NOT NULL, - `Radiopharmaceutical` varchar(32) NOT NULL, - `RadiopharmaceuticalStartTime` varchar(32) NOT NULL, - `RadionuclideTotalDose` varchar(32) NOT NULL, - `RadionuclideHalfLife` varchar(32) NOT NULL, - `RadionuclidePositronFraction` varchar(32) NOT NULL, - `Radiation_Dose_Module` text NOT NULL, - `shared_Tags` text NOT NULL + `size` double DEFAULT NULL, + `age` varchar(32) DEFAULT NULL, + `weight` double DEFAULT NULL, + `Manifacturer` varchar(32) DEFAULT NULL, + `Manifacturer_Model` varchar(32) DEFAULT NULL, + `Performing_Physician_Name` varchar(32) DEFAULT NULL, + `Series_Description` varchar(32) DEFAULT NULL, + `Station_Name` varchar(32) DEFAULT NULL, + `Content_Date` varchar(8) DEFAULT NULL, + `Content_Time` varchar(15) DEFAULT NULL, + `Protocol_Name` varchar(32) DEFAULT NULL, + `Series_Instance_UID` varchar(100) NOT NULL, + `Comment_Radiation_Dose` text, + `Radiopharmaceutical_sequence` text, + `Radiopharmaceutical` varchar(32) DEFAULT NULL, + `RadiopharmaceuticalStartTime` varchar(32) DEFAULT NULL, + `RadionuclideTotalDose` varchar(32) DEFAULT NULL, + `RadionuclideHalfLife` varchar(32) DEFAULT NULL, + `RadionuclidePositronFraction` varchar(32) DEFAULT NULL, + `Radiation_Dose_Module` text, + `shared_Tags` text, + `Orthanc_Serie_ID` varchar(70) NOT NULL, + `parentStudyOrthanc` varchar(70) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -72,15 +74,16 @@ CREATE TABLE `series` ( -- CREATE TABLE `studies` ( - `accessionNumber` varchar(35) NOT NULL, - `institutionName` varchar(35) NOT NULL, - `referringPhysicianName` varchar(35) NOT NULL, - `studyDate` varchar(35) NOT NULL, - `studyDescription` varchar(35) NOT NULL, - `studyID` varchar(35) NOT NULL, - `studyInstanceUID` varchar(70) NOT NULL, - `studyTime` varchar(35) NOT NULL, - `Orthanc_Study_ID` varchar(70) NOT NULL + `accessionNumber` varchar(35) DEFAULT NULL, + `institutionName` varchar(35) DEFAULT NULL, + `referringPhysicianName` varchar(35) DEFAULT NULL, + `studyDate` varchar(35) DEFAULT NULL, + `studyDescription` varchar(35) DEFAULT NULL, + `studyID` varchar(35) DEFAULT NULL, + `studyInstanceUID` varchar(100) NOT NULL, + `studyTime` varchar(35) DEFAULT NULL, + `Orthanc_Study_ID` varchar(70) NOT NULL, + `parentPatientOrthanc` varchar(70) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- @@ -91,19 +94,41 @@ CREATE TABLE `studies` ( -- Index pour la table `patients` -- ALTER TABLE `patients` - ADD PRIMARY KEY (`Patient_ID`); + ADD PRIMARY KEY (`Patient_ID`), + ADD UNIQUE KEY `Orthanc_Patient_ID_2` (`Orthanc_Patient_ID`), + ADD KEY `Orthanc_Patient_ID` (`Orthanc_Patient_ID`); -- -- Index pour la table `series` -- ALTER TABLE `series` - ADD PRIMARY KEY (`Series_Instance_UID`); + ADD PRIMARY KEY (`Series_Instance_UID`), + ADD KEY `parentStudyUID` (`parentStudyOrthanc`); -- -- Index pour la table `studies` -- ALTER TABLE `studies` - ADD PRIMARY KEY (`studyInstanceUID`); + ADD PRIMARY KEY (`studyInstanceUID`), + ADD UNIQUE KEY `Orthanc_Study_ID_2` (`Orthanc_Study_ID`), + ADD KEY `parentPatientID` (`parentPatientOrthanc`), + ADD KEY `Orthanc_Study_ID` (`Orthanc_Study_ID`); + +-- +-- Contraintes pour les tables exportées +-- + +-- +-- Contraintes pour la table `series` +-- +ALTER TABLE `series` + ADD CONSTRAINT `parentStudy` FOREIGN KEY (`parentStudyOrthanc`) REFERENCES `studies` (`Orthanc_Study_ID`); + +-- +-- Contraintes pour la table `studies` +-- +ALTER TABLE `studies` + ADD CONSTRAINT `parentPatient` FOREIGN KEY (`parentPatientOrthanc`) REFERENCES `patients` (`Orthanc_Patient_ID`); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; From 9a2fde4bf325a16d6c2d6f904c07a8f6c0ee93b5 Mon Sep 17 00:00:00 2001 From: salim Date: Sat, 23 Jun 2018 14:37:28 +0200 Subject: [PATCH 05/10] debug --- src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java b/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java index 47a4f9b2..db6a3462 100644 --- a/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java +++ b/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java @@ -90,7 +90,7 @@ else if (level.equals("serie")) { StringBuilder sbSharedTags=parametre.makeGetConnectionAndStringBuilder("/series/"+monitoring.newStableSeriesID.get(i)+"/shared-tags"); - textAreaConsole.append("Shared-Tags"+sbSharedTags+","); + //textAreaConsole.append("Shared-Tags"+sbSharedTags+","); foundTags.put("Shared_Tags", sbSharedTags.toString()); if(jprefer.getBoolean("useDBMonitoring", false)) { From 4d29ed4041ae669982236db6a4dfc002e7372c6f Mon Sep 17 00:00:00 2001 From: salim Date: Sat, 23 Jun 2018 15:47:56 +0200 Subject: [PATCH 06/10] debug --- .../petctviewer/orthanc/monitoring/Tag_Monitoring.java | 9 +++++---- .../petctviewer/orthanc/monitoring/Tag_Of_Interest.java | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java b/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java index db6a3462..23b5c159 100644 --- a/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java +++ b/src/org/petctviewer/orthanc/monitoring/Tag_Monitoring.java @@ -96,7 +96,7 @@ else if (level.equals("serie")) { if(jprefer.getBoolean("useDBMonitoring", false)) { db.InsertPatient(foundTags.get("LastName"), foundTags.get("FirstName") , foundTags.get("PatientID"), foundTags.get("ParentPatient") , foundTags.get("PatientBirthDate"), foundTags.get("PatientSex") ); db.InsertStudy(foundTags.get("StudyID"), foundTags.get("StudyInstanceUID"), foundTags.get("ParentStudy") , foundTags.get("AccessionNumber"), foundTags.get("InstitutionName"), foundTags.get("ReferringPhysicianName"), foundTags.get("StudyDate"), foundTags.get("StudyDescription"), foundTags.get("StudyTime"), foundTags.get("ParentPatient")); - db.InsertSeries(foundTags.get("PatientSize"), foundTags.get("PatientAge"), foundTags.get("PatientWeight"),foundTags.get("Manufacturer"), foundTags.get("ManufacturerModelName"), foundTags.get("PerformingPhysicianName"), foundTags.get("SeriesDescription"), foundTags.get("StationName"), foundTags.get("ContentDate"), foundTags.get("ContentTime"), foundTags.get("ProtocolName"), foundTags.get("SeriesInstanceUID"), foundTags.get("CommentsOnRadiationDose"), foundTags.get("RadiopharmaceuticalInformationSequence"), foundTags.get("Radiopharmaceutical"), foundTags.get("RadiopharmaceuticalStartTime"), foundTags.get("RadionuclideTotalDose"), foundTags.get("RadionuclideHalfLife"), foundTags.get("RadionuclidePositronFraction"), foundTags.get(Tag_Of_Interest.radiationDoseModule), foundTags.get("Shared_Tags"), foundTags.get(monitoring.newStableSeriesID.get(i)), foundTags.get("ParentStudy")); + db.InsertSeries(foundTags.get("PatientSize"), foundTags.get("PatientAge"), foundTags.get("PatientWeight"),foundTags.get("Manufacturer"), foundTags.get("ManufacturerModelName"), foundTags.get("PerformingPhysicianName"), foundTags.get("SeriesDescription"), foundTags.get("StationName"), foundTags.get("ContentDate"), foundTags.get("ContentTime"), foundTags.get("ProtocolName"), foundTags.get("SeriesInstanceUID"), foundTags.get("CommentsOnRadiationDose"), foundTags.get("RadiopharmaceuticalInformationSequence"), foundTags.get("Radiopharmaceutical"), foundTags.get("RadiopharmaceuticalStartTime"), foundTags.get("RadionuclideTotalDose"), foundTags.get("RadionuclideHalfLife"), foundTags.get("RadionuclidePositronFraction"), foundTags.get(Tag_Of_Interest.radiationDoseModule), foundTags.get("Shared_Tags"), monitoring.newStableSeriesID.get(i), foundTags.get("ParentStudy")); } if(jprefer.getBoolean("AutoDeleteMonitoring", false)) { @@ -136,7 +136,7 @@ private HashMap getMainPatientTag(JSONObject mainPatientTag) { HashMap hashmapTagPatient=new HashMap(); if(patientName.indexOf("^") != -1) { - String[] namePatient =patientName.split("^"); + String[] namePatient =patientName.split("\\^"); hashmapTagPatient.put("LastName", namePatient[0]); hashmapTagPatient.put("FirstName", namePatient[1]); } @@ -237,7 +237,7 @@ private HashMap getTagFromInstance(String seriesID) { if(hashmapTag.get("PatientName").indexOf("^") != -1) { - String[] namePatient =hashmapTag.get("PatientName").split("^"); + String[] namePatient =hashmapTag.get("PatientName").split("\\^"); hashmapTag.put("LastName", namePatient[0]); hashmapTag.put("FirstName", namePatient[1]); } @@ -271,10 +271,11 @@ private HashMap getTagFromInstance(String seriesID) { if (tags.containsKey(Tag_Of_Interest.radiopharmaceuticalTag)) { JSONObject radiopharmaceuticalSequence = (JSONObject) tags.get(Tag_Of_Interest.radiopharmaceuticalTag); + hashmapTag.put("RadiopharmaceuticalInformationSequence", radiopharmaceuticalSequence.toString()); JSONArray radiopharmaceuticalSequenceTags= (JSONArray) radiopharmaceuticalSequence.get("Value"); JSONObject radiopharmaceuticalSequenceTagsValue = (JSONObject) radiopharmaceuticalSequenceTags.get(0); for (int i=0 ; i Date: Sat, 23 Jun 2018 17:39:54 +0200 Subject: [PATCH 07/10] enhancements --- .../orthanc/Jsonsettings/SettingsGUI.java | 1018 ++++++++--------- .../orthanc/setup/ConnectionSetup.java | 271 +++-- 2 files changed, 644 insertions(+), 645 deletions(-) diff --git a/src/org/petctviewer/orthanc/Jsonsettings/SettingsGUI.java b/src/org/petctviewer/orthanc/Jsonsettings/SettingsGUI.java index c2cd871d..7716fae0 100644 --- a/src/org/petctviewer/orthanc/Jsonsettings/SettingsGUI.java +++ b/src/org/petctviewer/orthanc/Jsonsettings/SettingsGUI.java @@ -48,6 +48,10 @@ import java.awt.event.FocusEvent; import java.awt.FlowLayout; import javax.swing.SwingConstants; +import javax.swing.JTabbedPane; +import java.awt.Component; +import javax.swing.Box; +import java.awt.Font; public class SettingsGUI extends JFrame { @@ -80,14 +84,15 @@ public class SettingsGUI extends JFrame { public SettingsGUI() { - - getContentPane().setLayout(new GridLayout(3, 3, 0, 0)); setTitle("Orthanc JSON editor"); - setPreferredSize(new Dimension(1400, 700)); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + getContentPane().setLayout(new BorderLayout(0, 0)); + + JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP); + getContentPane().add(tabbedPane, BorderLayout.CENTER); JPanel General = new JPanel(); + tabbedPane.addTab("General", null, General, null); General.setBorder(new LineBorder(new Color(0, 0, 0))); - getContentPane().add(General); General.setLayout(new BorderLayout(0, 0)); JPanel Titre = new JPanel(); @@ -131,23 +136,6 @@ public void focusLost(FocusEvent e) { spinner_Max_Storage_Size.setValue(settings.MaximumStorageSize); boutton_general.add(spinner_Max_Storage_Size); - JButton btnNewButton_1 = new JButton("Index Directory"); - btnNewButton_1.setToolTipText("Path to the directory that holds the SQLite index (if unset, the\n value of StorageDirectory is used). This index could be stored on\na RAM-drive or a SSD device for performance reasons."); - btnNewButton_1.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - //On ouvre le JFileChooser pour selectionner un repertoire et on l'ajoute dans la variable adhoc - JFileChooser fc =new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - int ouvrir=fc.showOpenDialog(null); - //Si valide - if (ouvrir==JFileChooser.APPROVE_OPTION) { - settings.indexDirectory=fc.getSelectedFile().getAbsolutePath().toString(); - index_value.setText(settings.indexDirectory); - } - - }}); - boutton_general.add(btnNewButton_1); - JLabel lblMaxiumPatientCount = new JLabel("Maxium Patient Count"); lblMaxiumPatientCount.setToolTipText("Maximum number of patients that can be stored at a given time in the storage (a value of \"0\" indicates no limit on the number of patients)"); boutton_general.add(lblMaxiumPatientCount); @@ -165,23 +153,6 @@ public void focusLost(FocusEvent e) { spinner_Max_Patient_Count.setValue(settings.MaximumPatientCount); boutton_general.add(spinner_Max_Patient_Count); - JButton btnNewButton = new JButton("Storage Directory"); - btnNewButton.setToolTipText("Path to the directory that holds the heavyweight files"); - btnNewButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - //On ouvre le JFileChooser pour selectionner un repertoire et on l'ajoute dans la variable adhoc - JFileChooser fc =new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - int ouvrir=fc.showOpenDialog(null); - //Si valide - if (ouvrir==JFileChooser.APPROVE_OPTION) { - settings.storageDirectory=fc.getSelectedFile().getAbsolutePath().toString(); - storage_value.setText(settings.storageDirectory); - } - } - }); - boutton_general.add(btnNewButton); - JCheckBox rdbtnNewRadioButton = new JCheckBox("Storage Compression"); rdbtnNewRadioButton.setToolTipText("Enable the transparent compression of the DICOM instances"); rdbtnNewRadioButton.addFocusListener(new FocusAdapter() { @@ -193,19 +164,24 @@ public void focusLost(FocusEvent e) { rdbtnNewRadioButton.setSelected(settings.StorageCompression); boutton_general.add(rdbtnNewRadioButton); + JPanel panel_btns = new JPanel(); + boutton_general.add(panel_btns); + panel_btns.setLayout(new GridLayout(0, 2, 0, 0)); + + JButton btnNewButton_1 = new JButton("Index Directory"); + panel_btns.add(btnNewButton_1); + btnNewButton_1.setToolTipText("Path to the directory that holds the SQLite index (if unset, the\n value of StorageDirectory is used). This index could be stored on\na RAM-drive or a SSD device for performance reasons."); + + JButton btnNewButton = new JButton("Storage Directory"); + panel_btns.add(btnNewButton); + btnNewButton.setToolTipText("Path to the directory that holds the heavyweight files"); + JButton btnLuaScripts = new JButton("Lua Scripts"); + panel_btns.add(btnLuaScripts); btnLuaScripts.setToolTipText("List of paths to the custom Lua scripts that are to be loaded into this instance of Orthanc"); - btnLuaScripts.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - FolderDialog dialoglua=new FolderDialog(true, settings); - dialoglua.setVisible(true); - lua_value.setText(String.valueOf(settings.luaFolder.size())); - - } - }); - boutton_general.add(btnLuaScripts); JButton btnPlugins = new JButton("plugins"); + panel_btns.add(btnPlugins); btnPlugins.setToolTipText("List of paths to the plugins that are to be loaded into this instance of Orthanc"); btnPlugins.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -214,7 +190,40 @@ public void actionPerformed(ActionEvent e) { plugin_value.setText(String.valueOf(settings.pluginsFolder.size())); } }); - boutton_general.add(btnPlugins); + btnLuaScripts.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + FolderDialog dialoglua=new FolderDialog(true, settings); + dialoglua.setVisible(true); + lua_value.setText(String.valueOf(settings.luaFolder.size())); + + } + }); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + //On ouvre le JFileChooser pour selectionner un repertoire et on l'ajoute dans la variable adhoc + JFileChooser fc =new JFileChooser(); + fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + int ouvrir=fc.showOpenDialog(null); + //Si valide + if (ouvrir==JFileChooser.APPROVE_OPTION) { + settings.storageDirectory=fc.getSelectedFile().getAbsolutePath().toString(); + storage_value.setText(settings.storageDirectory); + } + } + }); + btnNewButton_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + //On ouvre le JFileChooser pour selectionner un repertoire et on l'ajoute dans la variable adhoc + JFileChooser fc =new JFileChooser(); + fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + int ouvrir=fc.showOpenDialog(null); + //Si valide + if (ouvrir==JFileChooser.APPROVE_OPTION) { + settings.indexDirectory=fc.getSelectedFile().getAbsolutePath().toString(); + index_value.setText(settings.indexDirectory); + } + + }}); JPanel General_Strings = new JPanel(); General.add(General_Strings, BorderLayout.SOUTH); @@ -245,8 +254,8 @@ public void actionPerformed(ActionEvent e) { General_Strings.add(plugin_value); JPanel http_Config = new JPanel(); + tabbedPane.addTab("http", null, http_Config, null); http_Config.setBorder(new LineBorder(new Color(0, 0, 0))); - getContentPane().add(http_Config); http_Config.setLayout(new BorderLayout(0, 0)); JPanel Titre_Http = new JPanel(); @@ -257,8 +266,13 @@ public void actionPerformed(ActionEvent e) { JPanel http_bouttons = new JPanel(); http_Config.add(http_bouttons, BorderLayout.CENTER); + http_bouttons.setLayout(new GridLayout(0, 1, 0, 0)); + + JPanel http = new JPanel(); + http_bouttons.add(http); JCheckBox rdbtnHttpServerEnabled = new JCheckBox("HTTP Server Enabled"); + http.add(rdbtnHttpServerEnabled); rdbtnHttpServerEnabled.setToolTipText("Enable the HTTP server. If this parameter is set to \"false\", Orthanc acts as a pure DICOM server. The REST API and Orthanc Explorer will not be available."); rdbtnHttpServerEnabled.addFocusListener(new FocusAdapter() { @Override @@ -267,24 +281,24 @@ public void focusLost(FocusEvent arg0) { } }); rdbtnHttpServerEnabled.setSelected(settings.HttpServerEnabled); - http_bouttons.add(rdbtnHttpServerEnabled); + + JLabel lblHttpPort = new JLabel("HTTP Port"); + http.add(lblHttpPort); + lblHttpPort.setToolTipText("HTTP port for the REST services and for the GUI"); textfield_Http_Port = new JTextField(); + http.add(textfield_Http_Port); textfield_Http_Port.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { settings.HttpPort=Integer.valueOf(textfield_Http_Port.getText()); } }); - - JLabel lblHttpPort = new JLabel("HTTP Port"); - lblHttpPort.setToolTipText("HTTP port for the REST services and for the GUI"); - http_bouttons.add(lblHttpPort); textfield_Http_Port.setText(String.valueOf(settings.HttpPort)); - http_bouttons.add(textfield_Http_Port); textfield_Http_Port.setColumns(10); JCheckBox rdbtnHttpDescribeErrors = new JCheckBox("HTTP Describe errors"); + http.add(rdbtnHttpDescribeErrors); rdbtnHttpDescribeErrors.setToolTipText("When the following option is \"true\", if an error is encountered while calling the REST API, a JSON message describing the error is put in the HTTP answer. "); rdbtnHttpDescribeErrors.addFocusListener(new FocusAdapter() { @Override @@ -293,9 +307,9 @@ public void focusLost(FocusEvent e) { } }); rdbtnHttpDescribeErrors.setSelected(settings.HttpDescribeErrors); - http_bouttons.add(rdbtnHttpDescribeErrors); JCheckBox rdbtnHttpCompression = new JCheckBox("HTTP Compression"); + http.add(rdbtnHttpCompression); rdbtnHttpCompression.setToolTipText("Enable HTTP compression to improve network bandwidth utilization, at the expense of more computations on the server"); rdbtnHttpCompression.addFocusListener(new FocusAdapter() { @Override @@ -304,11 +318,102 @@ public void focusLost(FocusEvent e) { } }); rdbtnHttpCompression.setSelected(settings.HttpCompressionEnabled); - http_bouttons.add(rdbtnHttpCompression); + + JPanel http_security = new JPanel(); + http_bouttons.add(http_security); + http_security.setBorder(new LineBorder(new Color(0, 0, 0))); + http_security.setLayout(new BorderLayout(0, 0)); + + JPanel HTTP_Security_Title = new JPanel(); + http_security.add(HTTP_Security_Title, BorderLayout.NORTH); + + JLabel lblHttpSecurity = new JLabel("HTTP Security"); + HTTP_Security_Title.add(lblHttpSecurity); + + JPanel HTTP_Security_Buttons = new JPanel(); + http_security.add(HTTP_Security_Buttons, BorderLayout.CENTER); + + JCheckBox chckbxAllowRemoteAccess = new JCheckBox("Allow Remote Access"); + chckbxAllowRemoteAccess.setToolTipText("Whether remote hosts can connect to the HTTP server"); + chckbxAllowRemoteAccess.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent arg0) { + settings.RemoteAccessAllowed=chckbxAllowRemoteAccess.isSelected(); + } + }); + chckbxAllowRemoteAccess.setSelected(settings.RemoteAccessAllowed); + HTTP_Security_Buttons.add(chckbxAllowRemoteAccess); + + JCheckBox chckbxSsl = new JCheckBox("SSL"); + chckbxSsl.setToolTipText("Whether or not SSL is enabled"); + chckbxSsl.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent arg0) { + settings.SslEnabled=chckbxSsl.isSelected(); + } + }); + chckbxSsl.setSelected(settings.SslEnabled); + HTTP_Security_Buttons.add(chckbxSsl); + + JButton btnSslCertificate = new JButton("SSL Certificate"); + btnSslCertificate.setToolTipText("Path to the SSL certificate in the PEM format (meaningful only if SSL is enabled)"); + btnSslCertificate.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + //On ouvre le JFileChooser pour selectionner un repertoire et on l'ajoute dans la variable adhoc + JFileChooser fc =new JFileChooser(); + fc.setFileSelectionMode(JFileChooser.FILES_ONLY); + int ouvrir=fc.showOpenDialog(null); + if (ouvrir==JFileChooser.APPROVE_OPTION) { + settings.SslCertificate=fc.getSelectedFile().toString(); + SSL_Certif_String.setText(settings.SslCertificate); + } + + } + }); + HTTP_Security_Buttons.add(btnSslCertificate); + + JCheckBox chckbxEnableAuthentication = new JCheckBox("Enable Authentication"); + chckbxEnableAuthentication.setToolTipText("Whether or not the password protection is enabled"); + chckbxEnableAuthentication.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent e) { + settings.AuthenticationEnabled=chckbxEnableAuthentication.isSelected(); + } + }); + chckbxEnableAuthentication.setSelected(settings.AuthenticationEnabled); + HTTP_Security_Buttons.add(chckbxEnableAuthentication); + + JButton btnUsersLoginpassword = new JButton("Users Login/Password"); + btnUsersLoginpassword.setToolTipText("The list of the registered users"); + btnUsersLoginpassword.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + UserDialog userDialog=new UserDialog(settings); + userDialog.setVisible(true); + Login_pass_String.setText(String.valueOf(settings.users.size())); + } + }); + HTTP_Security_Buttons.add(btnUsersLoginpassword); + + JPanel HTTP_Security_Strings = new JPanel(); + http_security.add(HTTP_Security_Strings, BorderLayout.SOUTH); + HTTP_Security_Strings.setLayout(new GridLayout(0, 2, 0, 0)); + + JLabel lblNewLabel_6 = new JLabel("SSL Certificate"); + HTTP_Security_Strings.add(lblNewLabel_6); + + SSL_Certif_String = new JLabel("New label"); + SSL_Certif_String.setText(settings.SslCertificate); + HTTP_Security_Strings.add(SSL_Certif_String); + + JLabel User_Login_Pass = new JLabel("User Login/Pass"); + HTTP_Security_Strings.add(User_Login_Pass); + + Login_pass_String = new JLabel(String.valueOf(settings.users.size())); + HTTP_Security_Strings.add(Login_pass_String); JPanel dicomServer_config = new JPanel(); + tabbedPane.addTab("dicom", null, dicomServer_config, null); dicomServer_config.setBorder(new LineBorder(new Color(0, 0, 0))); - getContentPane().add(dicomServer_config); dicomServer_config.setLayout(new BorderLayout(0, 0)); JPanel Titre_DicomServer = new JPanel(); @@ -398,21 +503,27 @@ public void focusLost(FocusEvent e) { }); Boutton_DicomServer.add(spinner_SCP_Timeout); + JLabel lblTransferSyntax = new JLabel("Transfer Syntax :"); + lblTransferSyntax.setToolTipText("The transfer syntaxes that are accepted by Orthanc C-Store SCP"); + Boutton_DicomServer.add(lblTransferSyntax); + + JPanel panel_TS = new JPanel(); + panel_TS.setBorder(new LineBorder(new Color(0, 0, 0))); + Boutton_DicomServer.add(panel_TS); + panel_TS.setLayout(new GridLayout(0, 2, 0, 0)); + JCheckBox chckbxDeflatedTs = new JCheckBox("Deflated TS"); + panel_TS.add(chckbxDeflatedTs); chckbxDeflatedTs.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { settings.DeflatedTransferSyntaxAccepted=chckbxDeflatedTs.isSelected(); } }); - - JLabel lblTransferSyntax = new JLabel("Transfer Syntax :"); - lblTransferSyntax.setToolTipText("The transfer syntaxes that are accepted by Orthanc C-Store SCP"); - Boutton_DicomServer.add(lblTransferSyntax); chckbxDeflatedTs.setSelected(settings.DeflatedTransferSyntaxAccepted); - Boutton_DicomServer.add(chckbxDeflatedTs); JCheckBox chckbxJpegTs = new JCheckBox("JPEG TS"); + panel_TS.add(chckbxJpegTs); chckbxJpegTs.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { @@ -420,9 +531,9 @@ public void focusLost(FocusEvent e) { } }); chckbxJpegTs.setSelected(settings.JpegTransferSyntaxAccepted); - Boutton_DicomServer.add(chckbxJpegTs); JCheckBox chckbxJpegTs_1 = new JCheckBox("JPEG 2000 TS"); + panel_TS.add(chckbxJpegTs_1); chckbxJpegTs_1.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { @@ -430,9 +541,9 @@ public void focusLost(FocusEvent e) { } }); chckbxJpegTs_1.setSelected(settings.Jpeg2000TransferSyntaxAccepted); - Boutton_DicomServer.add(chckbxJpegTs_1); JCheckBox chckbxJpegLoselessTs = new JCheckBox("JPEG loseless TS"); + panel_TS.add(chckbxJpegLoselessTs); chckbxJpegLoselessTs.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { @@ -440,9 +551,9 @@ public void focusLost(FocusEvent e) { } }); chckbxJpegLoselessTs.setSelected(settings.JpegLosslessTransferSyntaxAccepted); - Boutton_DicomServer.add(chckbxJpegLoselessTs); JCheckBox chckbxJpipTs = new JCheckBox("JPIP TS"); + panel_TS.add(chckbxJpipTs); chckbxJpipTs.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { @@ -450,9 +561,9 @@ public void focusLost(FocusEvent e) { } }); chckbxJpipTs.setSelected(settings.JpipTransferSyntaxAccepted); - Boutton_DicomServer.add(chckbxJpipTs); JCheckBox chckbxMpegTs = new JCheckBox("MPEG2 TS"); + panel_TS.add(chckbxMpegTs); chckbxMpegTs.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { @@ -460,9 +571,9 @@ public void focusLost(FocusEvent e) { } }); chckbxMpegTs.setSelected(settings.Mpeg2TransferSyntaxAccepted); - Boutton_DicomServer.add(chckbxMpegTs); JCheckBox chckbxRleTs = new JCheckBox("RLE TS"); + panel_TS.add(chckbxRleTs); chckbxRleTs.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { @@ -470,13 +581,13 @@ public void focusLost(FocusEvent e) { } }); chckbxRleTs.setSelected(settings.RleTransferSyntaxAccepted); - Boutton_DicomServer.add(chckbxRleTs); JPanel panel = new JPanel(); dicomServer_config.add(panel, BorderLayout.SOUTH); JComboBox comboBox_Encoding = new JComboBox(); comboBox_Encoding.setToolTipText("the default encoding that is assumed for DICOM files without \"SpecificCharacterSet\" DICOM tag, and that is used when answering C-Find requests (including worklists)."); + if (settings.DefaultEncoding==null) comboBox_Encoding.setSelectedIndex(0); comboBox_Encoding.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { @@ -486,315 +597,301 @@ public void focusLost(FocusEvent e) { panel.add(comboBox_Encoding); comboBox_Encoding.setModel(new DefaultComboBoxModel(new String[] {"Latin1", "Ascii", "Utf8", "Latin2", "Latin3", "Latin4", "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew", "Thai", "Japanese", "Chinese"})); comboBox_Encoding.setSelectedItem(settings.DefaultEncoding); - if (settings.DefaultEncoding==null) comboBox_Encoding.setSelectedIndex(0); - JPanel http_security = new JPanel(); - http_security.setBorder(new LineBorder(new Color(0, 0, 0))); - getContentPane().add(http_security); - http_security.setLayout(new BorderLayout(0, 0)); - - JPanel HTTP_Security_Title = new JPanel(); - http_security.add(HTTP_Security_Title, BorderLayout.NORTH); + JPanel network = new JPanel(); + tabbedPane.addTab("network", null, network, null); + network.setBorder(new LineBorder(new Color(0, 0, 0))); + network.setLayout(new BorderLayout(0, 0)); + + JPanel Network_Title = new JPanel(); + network.add(Network_Title, BorderLayout.NORTH); + + JLabel lblNetworkTopology = new JLabel("Network Topology"); + Network_Title.add(lblNetworkTopology); + + JPanel Network_Buttons = new JPanel(); + network.add(Network_Buttons, BorderLayout.CENTER); + + JButton btnDicomModalities = new JButton("Dicom Modalities"); + btnDicomModalities.setToolTipText("The list of the known DICOM modalities"); + btnDicomModalities.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + // On lance la boite de dialog pour gerer les AET + DicomDialog dicomDialog=new DicomDialog(settings); + dicomDialog.setVisible(true); + Dicom_Modalities_Number.setText(String.valueOf(settings.dicomNode.size())); + + + } + }); + Network_Buttons.add(btnDicomModalities); + + JPanel panel_dcm = new JPanel(); + panel_dcm.setBorder(new LineBorder(new Color(0, 0, 0))); + Network_Buttons.add(panel_dcm); + panel_dcm.setLayout(new GridLayout(0, 2, 0, 0)); + + JCheckBox chckbx_Dicom_Always_Store = new JCheckBox("Dicom Always Store"); + panel_dcm.add(chckbx_Dicom_Always_Store); + chckbx_Dicom_Always_Store.setSelected(settings.DicomAlwaysStore); + chckbx_Dicom_Always_Store.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent arg0) { + settings.DicomAlwaysStore=chckbx_Dicom_Always_Store.isSelected(); + } + }); + chckbx_Dicom_Always_Store.setToolTipText("Whether the Orthanc SCP allows incoming C-Store requests, even from SCU modalities it does not know about (i.e. that are not listed in the \"DicomModalities\" option above)"); + + JCheckBox chckbx_Check_Modality_Store = new JCheckBox("Dicom Check Modality Host"); + panel_dcm.add(chckbx_Check_Modality_Store); + chckbx_Check_Modality_Store.setSelected(settings.CheckModalityHost); + chckbx_Check_Modality_Store.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent e) { + settings.CheckModalityHost=chckbx_Check_Modality_Store.isSelected(); + } + }); + chckbx_Check_Modality_Store.setToolTipText(" Whether Orthanc checks the IP/hostname address of the remote modality initiating a DICOM connection (as listed in the \"DicomModalities\" option above). If this option is set to \"false\", Orthanc only checks the AET of the remote modality."); + + JLabel lblDicomScuTimeout = new JLabel("Dicom SCU timeout"); + panel_dcm.add(lblDicomScuTimeout); + lblDicomScuTimeout.setToolTipText("The timeout (in seconds) after which the DICOM associations are considered as closed by the Orthanc SCU (client) if the remote DICOM SCP (server) does not answer."); + + JSpinner spinner_Dicom_Scu_Timeout = new JSpinner(); + panel_dcm.add(spinner_Dicom_Scu_Timeout); + spinner_Dicom_Scu_Timeout.setPreferredSize(new Dimension(50, 20)); + spinner_Dicom_Scu_Timeout.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); + spinner_Dicom_Scu_Timeout.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent arg0) { + settings.DicomScuTimeout=Integer.valueOf((spinner_Dicom_Scu_Timeout.getValue().toString())); + } + }); + spinner_Dicom_Scu_Timeout.setValue(settings.DicomScuTimeout); + + JPanel panel_peers = new JPanel(); + panel_peers.setBorder(new LineBorder(new Color(0, 0, 0))); + Network_Buttons.add(panel_peers); + panel_peers.setLayout(new GridLayout(0, 2, 0, 0)); + + JLabel lblHttpProxy = new JLabel("HTTP Proxy"); + panel_peers.add(lblHttpProxy); + lblHttpProxy.setToolTipText("Parameters of the HTTP proxy to be used by Orthanc. If set to the empty string, no HTTP proxy is used. (\"proxyUser:proxyPassword@IP:Port\")"); + + textField_HTTP_Proxy = new JTextField(); + panel_peers.add(textField_HTTP_Proxy); + textField_HTTP_Proxy.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent arg0) { + settings.HttpProxy=textField_HTTP_Proxy.toString(); + } + }); + textField_HTTP_Proxy.setText(settings.HttpProxy); + textField_HTTP_Proxy.setColumns(10); + + JLabel lblHttpTimeout = new JLabel("HTTP timeout"); + panel_peers.add(lblHttpTimeout); + lblHttpTimeout.setToolTipText("Set the timeout for HTTP requests issued by Orthanc (in seconds)"); + + JSpinner spinner_Http_Timeout = new JSpinner(); + panel_peers.add(spinner_Http_Timeout); + spinner_Http_Timeout.setPreferredSize(new Dimension(50, 20)); + spinner_Http_Timeout.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); + spinner_Http_Timeout.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent e) { + settings.HttpTimeout=Integer.valueOf(spinner_Http_Timeout.getValue().toString()); + } + }); + spinner_Http_Timeout.setValue(settings.HttpTimeout); + + JCheckBox chckbxHttpsVerifyPeers = new JCheckBox("HTTPS verify Peers"); + panel_peers.add(chckbxHttpsVerifyPeers); + chckbxHttpsVerifyPeers.setToolTipText("Enable the verification of the peers during HTTPS requests. This option must be set to \"false\" if using self-signed certificates. Pay attention that setting this option to \"false\" results in security risks!"); + chckbxHttpsVerifyPeers.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent e) { + settings.HttpsVerifyPeers=chckbxHttpsVerifyPeers.isSelected(); + } + }); + chckbxHttpsVerifyPeers.setSelected(settings.HttpsVerifyPeers); + + Component horizontalStrut = Box.createHorizontalStrut(20); + panel_peers.add(horizontalStrut); + + JButton btnOrthancPeers = new JButton("Orthanc Peers"); + panel_peers.add(btnOrthancPeers); + btnOrthancPeers.setToolTipText("The list of the known Orthanc peers"); + btnOrthancPeers.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + PeersDialog peerDialog=new PeersDialog(settings); + peerDialog.setVisible(true); + peerDialog.setAlwaysOnTop(true); + label_Peer_number.setText(String.valueOf(settings.orthancPeer.size())); + } + }); + + JButton btnHttpsCaCertificates = new JButton("HTTPS CA Certificates"); + panel_peers.add(btnHttpsCaCertificates); + btnHttpsCaCertificates.setToolTipText("Path to the CA (certification authority) certificates to validate peers in HTTPS requests. "); + btnHttpsCaCertificates.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + //On ouvre le JFileChooser pour selectionner un repertoire et on l'ajoute dans la variable adhoc + JFileChooser fc =new JFileChooser(); + fc.setFileSelectionMode(JFileChooser.FILES_ONLY); + int ouvrir=fc.showOpenDialog(null); + if (ouvrir==JFileChooser.APPROVE_OPTION) { + settings.HttpsCACertificates=fc.getSelectedFile().toString(); + HTTPS_CA_Certificates.setText(settings.HttpsCACertificates); + } + + } + }); + + JPanel Network_Strings = new JPanel(); + network.add(Network_Strings, BorderLayout.SOUTH); + Network_Strings.setLayout(new GridLayout(3, 3, 0, 0)); + + JLabel Dicom_Modalities = new JLabel("Dcm Modalities"); + Network_Strings.add(Dicom_Modalities); + + Dicom_Modalities_Number = new JLabel(String.valueOf(settings.dicomNode.size())); + Network_Strings.add(Dicom_Modalities_Number); + + JLabel Orthanc_Peer = new JLabel("Orthanc Peer"); + Network_Strings.add(Orthanc_Peer); + + label_Peer_number = new JLabel(String.valueOf(settings.orthancPeer.size())); + Network_Strings.add(label_Peer_number); + + JLabel lblNewLabel_12 = new JLabel("Certificates"); + Network_Strings.add(lblNewLabel_12); + + HTTPS_CA_Certificates = new JLabel("New label"); + HTTPS_CA_Certificates.setText(settings.HttpsCACertificates); + Network_Strings.add(HTTPS_CA_Certificates); + + JPanel advanced = new JPanel(); + tabbedPane.addTab("advanced", null, advanced, null); + advanced.setBorder(new LineBorder(new Color(0, 0, 0))); + advanced.setLayout(new BorderLayout(0, 0)); + + JPanel Advanced_Title = new JPanel(); + advanced.add(Advanced_Title, BorderLayout.NORTH); + + JLabel lblAdvancedOptions = new JLabel("Advanced Options"); + Advanced_Title.add(lblAdvancedOptions); + + JPanel Advanced_Buttons = new JPanel(); + advanced.add(Advanced_Buttons, BorderLayout.CENTER); + Advanced_Buttons.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5)); - JLabel lblHttpSecurity = new JLabel("HTTP Security"); - HTTP_Security_Title.add(lblHttpSecurity); + JPanel panel_1 = new JPanel(); + Advanced_Buttons.add(panel_1); + panel_1.setLayout(new GridLayout(0, 2, 5, 3)); - JPanel HTTP_Security_Buttons = new JPanel(); - http_security.add(HTTP_Security_Buttons, BorderLayout.CENTER); + JLabel lblStableAge = new JLabel("Stable Age"); + panel_1.add(lblStableAge); + lblStableAge.setToolTipText("Number of seconds without receiving any instance before a patient, a study or a series is considered as stable."); - JCheckBox chckbxAllowRemoteAccess = new JCheckBox("Allow Remote Access"); - chckbxAllowRemoteAccess.setToolTipText("Whether remote hosts can connect to the HTTP server"); - chckbxAllowRemoteAccess.addFocusListener(new FocusAdapter() { - @Override - public void focusLost(FocusEvent arg0) { - settings.RemoteAccessAllowed=chckbxAllowRemoteAccess.isSelected(); - } - }); - chckbxAllowRemoteAccess.setSelected(settings.RemoteAccessAllowed); - HTTP_Security_Buttons.add(chckbxAllowRemoteAccess); - - JCheckBox chckbxSsl = new JCheckBox("SSL"); - chckbxSsl.setToolTipText("Whether or not SSL is enabled"); - chckbxSsl.addFocusListener(new FocusAdapter() { - @Override - public void focusLost(FocusEvent arg0) { - settings.SslEnabled=chckbxSsl.isSelected(); - } - }); - chckbxSsl.setSelected(settings.SslEnabled); - HTTP_Security_Buttons.add(chckbxSsl); - - JButton btnSslCertificate = new JButton("SSL Certificate"); - btnSslCertificate.setToolTipText("Path to the SSL certificate in the PEM format (meaningful only if SSL is enabled)"); - btnSslCertificate.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - //On ouvre le JFileChooser pour selectionner un repertoire et on l'ajoute dans la variable adhoc - JFileChooser fc =new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.FILES_ONLY); - int ouvrir=fc.showOpenDialog(null); - if (ouvrir==JFileChooser.APPROVE_OPTION) { - settings.SslCertificate=fc.getSelectedFile().toString(); - SSL_Certif_String.setText(settings.SslCertificate); - } - - } - }); - HTTP_Security_Buttons.add(btnSslCertificate); - - JCheckBox chckbxEnableAuthentication = new JCheckBox("Enable Authentication"); - chckbxEnableAuthentication.setToolTipText("Whether or not the password protection is enabled"); - chckbxEnableAuthentication.addFocusListener(new FocusAdapter() { + JSpinner spinner_Stable_Age = new JSpinner(); + panel_1.add(spinner_Stable_Age); + spinner_Stable_Age.setPreferredSize(new Dimension(50, 20)); + spinner_Stable_Age.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); + spinner_Stable_Age.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { - settings.AuthenticationEnabled=chckbxEnableAuthentication.isSelected(); - } - }); - chckbxEnableAuthentication.setSelected(settings.AuthenticationEnabled); - HTTP_Security_Buttons.add(chckbxEnableAuthentication); - - JButton btnUsersLoginpassword = new JButton("Users Login/Password"); - btnUsersLoginpassword.setToolTipText("The list of the registered users"); - btnUsersLoginpassword.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - UserDialog userDialog=new UserDialog(settings); - userDialog.setVisible(true); - Login_pass_String.setText(String.valueOf(settings.users.size())); - } - }); - HTTP_Security_Buttons.add(btnUsersLoginpassword); - - JPanel HTTP_Security_Strings = new JPanel(); - http_security.add(HTTP_Security_Strings, BorderLayout.SOUTH); - HTTP_Security_Strings.setLayout(new GridLayout(0, 2, 0, 0)); - - JLabel lblNewLabel_6 = new JLabel("SSL Certificate"); - HTTP_Security_Strings.add(lblNewLabel_6); - - SSL_Certif_String = new JLabel("New label"); - SSL_Certif_String.setText(settings.SslCertificate); - HTTP_Security_Strings.add(SSL_Certif_String); - - JLabel User_Login_Pass = new JLabel("User Login/Pass"); - HTTP_Security_Strings.add(User_Login_Pass); - - Login_pass_String = new JLabel(String.valueOf(settings.users.size())); - HTTP_Security_Strings.add(Login_pass_String); - - JPanel network = new JPanel(); - network.setBorder(new LineBorder(new Color(0, 0, 0))); - getContentPane().add(network); - network.setLayout(new BorderLayout(0, 0)); - - JPanel Network_Title = new JPanel(); - network.add(Network_Title, BorderLayout.NORTH); - - JLabel lblNetworkTopology = new JLabel("Network Topology"); - Network_Title.add(lblNetworkTopology); - - JPanel Network_Buttons = new JPanel(); - network.add(Network_Buttons, BorderLayout.CENTER); - - JButton btnDicomModalities = new JButton("Dicom Modalities"); - btnDicomModalities.setToolTipText("The list of the known DICOM modalities"); - btnDicomModalities.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - // On lance la boite de dialog pour gerer les AET - DicomDialog dicomDialog=new DicomDialog(settings); - dicomDialog.setVisible(true); - Dicom_Modalities_Number.setText(String.valueOf(settings.dicomNode.size())); - - + settings.StableAge=Integer.valueOf(spinner_Stable_Age.getValue().toString()); } }); - Network_Buttons.add(btnDicomModalities); + spinner_Stable_Age.setValue(settings.StableAge); - JCheckBox chckbx_Dicom_Always_Store = new JCheckBox("Dicom Always Store"); - chckbx_Dicom_Always_Store.setSelected(settings.DicomAlwaysStore); - chckbx_Dicom_Always_Store.addFocusListener(new FocusAdapter() { - @Override - public void focusLost(FocusEvent arg0) { - settings.DicomAlwaysStore=chckbx_Dicom_Always_Store.isSelected(); - } - }); - chckbx_Dicom_Always_Store.setToolTipText("Whether the Orthanc SCP allows incoming C-Store requests, even from SCU modalities it does not know about (i.e. that are not listed in the \"DicomModalities\" option above)"); - Network_Buttons.add(chckbx_Dicom_Always_Store); + JLabel lblLimitFindResults = new JLabel("Limit Find Results"); + panel_1.add(lblLimitFindResults); + lblLimitFindResults.setToolTipText("The maximum number of results for a single C-FIND request at the Patient, Study or Series level. Setting this option to \"0\" means no limit."); - JCheckBox chckbx_Check_Modality_Store = new JCheckBox("Dicom Check Modality Host"); - chckbx_Check_Modality_Store.setSelected(settings.CheckModalityHost); - chckbx_Check_Modality_Store.addFocusListener(new FocusAdapter() { + JSpinner spinner_limit_Find_Result = new JSpinner(); + panel_1.add(spinner_limit_Find_Result); + spinner_limit_Find_Result.setPreferredSize(new Dimension(50, 20)); + spinner_limit_Find_Result.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); + spinner_limit_Find_Result.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { - settings.CheckModalityHost=chckbx_Check_Modality_Store.isSelected(); + settings.LimitFindResults=Integer.valueOf(spinner_limit_Find_Result.getValue().toString()); } }); - chckbx_Check_Modality_Store.setToolTipText(" Whether Orthanc checks the IP/hostname address of the remote modality initiating a DICOM connection (as listed in the \"DicomModalities\" option above). If this option is set to \"false\", Orthanc only checks the AET of the remote modality."); - Network_Buttons.add(chckbx_Check_Modality_Store); + spinner_limit_Find_Result.setValue(settings.LimitFindResults); - JLabel lblDicomScuTimeout = new JLabel("Dicom SCU timeout"); - lblDicomScuTimeout.setToolTipText("The timeout (in seconds) after which the DICOM associations are considered as closed by the Orthanc SCU (client) if the remote DICOM SCP (server) does not answer."); - Network_Buttons.add(lblDicomScuTimeout); + JLabel lblDicomAssociationClose = new JLabel("Dcm Assoc. Close Delay"); + lblDicomAssociationClose.setFont(new Font("Dialog", Font.BOLD, 10)); + panel_1.add(lblDicomAssociationClose); + lblDicomAssociationClose.setToolTipText("DICOM associations are kept open as long as new DICOM commands are issued. This option sets the number of seconds of inactivity to wait before automatically closing a DICOM association. If set to 0, the connection is closed immediately."); - JSpinner spinner_Dicom_Scu_Timeout = new JSpinner(); - spinner_Dicom_Scu_Timeout.setPreferredSize(new Dimension(50, 20)); - spinner_Dicom_Scu_Timeout.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); - spinner_Dicom_Scu_Timeout.addFocusListener(new FocusAdapter() { + JSpinner spinner_DICOM_Association_Close_Delay = new JSpinner(); + panel_1.add(spinner_DICOM_Association_Close_Delay); + spinner_DICOM_Association_Close_Delay.setPreferredSize(new Dimension(50, 20)); + spinner_DICOM_Association_Close_Delay.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); + spinner_DICOM_Association_Close_Delay.addFocusListener(new FocusAdapter() { @Override - public void focusLost(FocusEvent arg0) { - settings.DicomScuTimeout=Integer.valueOf((spinner_Dicom_Scu_Timeout.getValue().toString())); - } - }); - spinner_Dicom_Scu_Timeout.setValue(settings.DicomScuTimeout); - Network_Buttons.add(spinner_Dicom_Scu_Timeout); - - JButton btnOrthancPeers = new JButton("Orthanc Peers"); - btnOrthancPeers.setToolTipText("The list of the known Orthanc peers"); - btnOrthancPeers.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - PeersDialog peerDialog=new PeersDialog(settings); - peerDialog.setVisible(true); - peerDialog.setAlwaysOnTop(true); - label_Peer_number.setText(String.valueOf(settings.orthancPeer.size())); + public void focusLost(FocusEvent e) { + settings.DicomAssociationCloseDelay=Integer.valueOf(spinner_DICOM_Association_Close_Delay.getValue().toString()); } }); - Network_Buttons.add(btnOrthancPeers); + spinner_DICOM_Association_Close_Delay.setValue(settings.DicomAssociationCloseDelay); - JLabel lblHttpProxy = new JLabel("HTTP Proxy"); - lblHttpProxy.setToolTipText("Parameters of the HTTP proxy to be used by Orthanc. If set to the empty string, no HTTP proxy is used. (\"proxyUser:proxyPassword@IP:Port\")"); - Network_Buttons.add(lblHttpProxy); + JLabel lblLimitFindInstance = new JLabel("Limit Find Instance"); + panel_1.add(lblLimitFindInstance); + lblLimitFindInstance.setToolTipText("The maximum number of results for a single C-FIND request at the Instance level. Setting this option to \"0\" means no limit."); - textField_HTTP_Proxy = new JTextField(); - textField_HTTP_Proxy.addFocusListener(new FocusAdapter() { - @Override - public void focusLost(FocusEvent arg0) { - settings.HttpProxy=textField_HTTP_Proxy.toString(); - } - }); - Network_Buttons.add(textField_HTTP_Proxy); - textField_HTTP_Proxy.setText(settings.HttpProxy); - textField_HTTP_Proxy.setColumns(10); - - JLabel lblHttpTimeout = new JLabel("HTTP timeout"); - lblHttpTimeout.setToolTipText("Set the timeout for HTTP requests issued by Orthanc (in seconds)"); - Network_Buttons.add(lblHttpTimeout); - - JSpinner spinner_Http_Timeout = new JSpinner(); - spinner_Http_Timeout.setPreferredSize(new Dimension(50, 20)); - spinner_Http_Timeout.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); - spinner_Http_Timeout.addFocusListener(new FocusAdapter() { + JSpinner spinner_limit_Find_Instance = new JSpinner(); + panel_1.add(spinner_limit_Find_Instance); + spinner_limit_Find_Instance.setPreferredSize(new Dimension(50, 20)); + spinner_limit_Find_Instance.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); + spinner_limit_Find_Instance.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { - settings.HttpTimeout=Integer.valueOf(spinner_Http_Timeout.getValue().toString()); + settings.LimitFindInstances=Integer.valueOf(spinner_limit_Find_Instance.getValue().toString()); } }); - spinner_Http_Timeout.setValue(settings.HttpTimeout); - Network_Buttons.add(spinner_Http_Timeout); + spinner_limit_Find_Instance.setValue(settings.LimitFindInstances); + + JLabel lblQueryretrieveSize = new JLabel("Query/Retrieve Size"); + panel_1.add(lblQueryretrieveSize); + lblQueryretrieveSize.setToolTipText("Maximum number of query/retrieve DICOM requests that are maintained by Orthanc. The least recently used requests get deleted as new requests are issued."); - JCheckBox chckbxHttpsVerifyPeers = new JCheckBox("HTTPS verify Peers"); - chckbxHttpsVerifyPeers.setToolTipText("Enable the verification of the peers during HTTPS requests. This option must be set to \"false\" if using self-signed certificates. Pay attention that setting this option to \"false\" results in security risks!"); - chckbxHttpsVerifyPeers.addFocusListener(new FocusAdapter() { + JSpinner spinner_QueryRetrieve_Size = new JSpinner(); + panel_1.add(spinner_QueryRetrieve_Size); + spinner_QueryRetrieve_Size.setPreferredSize(new Dimension(50, 20)); + spinner_QueryRetrieve_Size.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); + spinner_QueryRetrieve_Size.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { - settings.HttpsVerifyPeers=chckbxHttpsVerifyPeers.isSelected(); - } - }); - chckbxHttpsVerifyPeers.setSelected(settings.HttpsVerifyPeers); - Network_Buttons.add(chckbxHttpsVerifyPeers); - - JButton btnHttpsCaCertificates = new JButton("HTTPS CA Certificates"); - btnHttpsCaCertificates.setToolTipText("Path to the CA (certification authority) certificates to validate peers in HTTPS requests. "); - btnHttpsCaCertificates.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - //On ouvre le JFileChooser pour selectionner un repertoire et on l'ajoute dans la variable adhoc - JFileChooser fc =new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.FILES_ONLY); - int ouvrir=fc.showOpenDialog(null); - if (ouvrir==JFileChooser.APPROVE_OPTION) { - settings.HttpsCACertificates=fc.getSelectedFile().toString(); - HTTPS_CA_Certificates.setText(settings.HttpsCACertificates); - } - - } - }); - Network_Buttons.add(btnHttpsCaCertificates); - - JPanel Network_Strings = new JPanel(); - network.add(Network_Strings, BorderLayout.SOUTH); - Network_Strings.setLayout(new GridLayout(3, 3, 0, 0)); - - JLabel Dicom_Modalities = new JLabel("Dcm Modalities"); - Network_Strings.add(Dicom_Modalities); - - Dicom_Modalities_Number = new JLabel(String.valueOf(settings.dicomNode.size())); - Network_Strings.add(Dicom_Modalities_Number); - - JLabel Orthanc_Peer = new JLabel("Orthanc Peer"); - Network_Strings.add(Orthanc_Peer); - - label_Peer_number = new JLabel(String.valueOf(settings.orthancPeer.size())); - Network_Strings.add(label_Peer_number); - - JLabel lblNewLabel_12 = new JLabel("Certificates"); - Network_Strings.add(lblNewLabel_12); - - HTTPS_CA_Certificates = new JLabel("New label"); - HTTPS_CA_Certificates.setText(settings.HttpsCACertificates); - Network_Strings.add(HTTPS_CA_Certificates); - - JPanel advanced = new JPanel(); - advanced.setBorder(new LineBorder(new Color(0, 0, 0))); - getContentPane().add(advanced); - advanced.setLayout(new BorderLayout(0, 0)); - - JPanel Advanced_Title = new JPanel(); - advanced.add(Advanced_Title, BorderLayout.NORTH); - - JLabel lblAdvancedOptions = new JLabel("Advanced Options"); - Advanced_Title.add(lblAdvancedOptions); - - JPanel Advanced_Buttons = new JPanel(); - advanced.add(Advanced_Buttons, BorderLayout.CENTER); - - JButton btnUserContentType = new JButton("User Content Type"); - btnUserContentType.setToolTipText("Dictionary of symbolic names for the user-defined types of attached files."); - btnUserContentType.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - Content_Dialog contentDialog=new Content_Dialog(settings); - contentDialog.setVisible(true); - contentDialog.setAlwaysOnTop(true); - Content_Type_Counter.setText(String.valueOf(settings.contentType.size())); - - } - }); - - JButton btnUserMetadata = new JButton("User Metadata"); - btnUserMetadata.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - MetadataDialog DialogMetadata=new MetadataDialog(settings); - DialogMetadata.setVisible(true); - Metadata_Counter.setText(String.valueOf(settings.userMetadata.size())); + settings.QueryRetrieveSize=Integer.valueOf(spinner_QueryRetrieve_Size.getValue().toString()); } }); - btnUserMetadata.setToolTipText("Dictionary of symbolic names for the user-defined metadata"); - Advanced_Buttons.add(btnUserMetadata); - Advanced_Buttons.add(btnUserContentType); + spinner_QueryRetrieve_Size.setValue(settings.QueryRetrieveSize); - JLabel lblStableAge = new JLabel("Stable Age"); - lblStableAge.setToolTipText("Number of seconds without receiving any instance before a patient, a study or a series is considered as stable."); - Advanced_Buttons.add(lblStableAge); + JLabel lb_limitJob = new JLabel("Limits Job"); + panel_1.add(lb_limitJob); - JSpinner spinner_Stable_Age = new JSpinner(); - spinner_Stable_Age.setPreferredSize(new Dimension(50, 20)); - spinner_Stable_Age.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); - spinner_Stable_Age.addFocusListener(new FocusAdapter() { + JSpinner spinner_limit_Jobs = new JSpinner(); + panel_1.add(spinner_limit_Jobs); + spinner_limit_Jobs.setPreferredSize(new Dimension(50, 20)); + spinner_limit_Jobs.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); + spinner_limit_Jobs.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { - settings.StableAge=Integer.valueOf(spinner_Stable_Age.getValue().toString()); + settings.LimitJobs=Integer.valueOf(spinner_limit_Jobs.getValue().toString()); } }); - spinner_Stable_Age.setValue(settings.StableAge); - Advanced_Buttons.add(spinner_Stable_Age); + spinner_limit_Jobs.setValue(settings.LimitJobs); + + JPanel panel_chkbox = new JPanel(); + Advanced_Buttons.add(panel_chkbox); + panel_chkbox.setLayout(new GridLayout(0, 3, 0, 0)); JCheckBox chckbxStrictAetComparison = new JCheckBox("Strict AET Comparison"); + panel_chkbox.add(chckbxStrictAetComparison); chckbxStrictAetComparison.setToolTipText(" Setting this option to \"true\" will enable case-sensitive matching."); chckbxStrictAetComparison.addFocusListener(new FocusAdapter() { @Override @@ -803,9 +900,9 @@ public void focusLost(FocusEvent e) { } }); chckbxStrictAetComparison.setSelected(settings.StrictAetComparison); - Advanced_Buttons.add(chckbxStrictAetComparison); JCheckBox chckbxStoremd = new JCheckBox("StoreMD5"); + panel_chkbox.add(chckbxStoremd); chckbxStoremd.setToolTipText("When the following option is \"true\", the MD5 of the DICOM files will be computed and stored in the Orthanc database. This information can be used to detect disk corruption, at the price of a small performance overhead."); chckbxStoremd.addFocusListener(new FocusAdapter() { @Override @@ -814,57 +911,9 @@ public void focusLost(FocusEvent e) { } }); chckbxStoremd.setSelected(settings.StoreMD5ForAttachments); - Advanced_Buttons.add(chckbxStoremd); - - JLabel lblLimitFindResults = new JLabel("Limit Find Results"); - lblLimitFindResults.setToolTipText("The maximum number of results for a single C-FIND request at the Patient, Study or Series level. Setting this option to \"0\" means no limit."); - Advanced_Buttons.add(lblLimitFindResults); - - JSpinner spinner_limit_Find_Result = new JSpinner(); - spinner_limit_Find_Result.setPreferredSize(new Dimension(50, 20)); - spinner_limit_Find_Result.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); - spinner_limit_Find_Result.addFocusListener(new FocusAdapter() { - @Override - public void focusLost(FocusEvent e) { - settings.LimitFindResults=Integer.valueOf(spinner_limit_Find_Result.getValue().toString()); - } - }); - spinner_limit_Find_Result.setValue(settings.LimitFindResults); - Advanced_Buttons.add(spinner_limit_Find_Result); - - JLabel lblLimitFindInstance = new JLabel("Limit Find Instance"); - lblLimitFindInstance.setToolTipText("The maximum number of results for a single C-FIND request at the Instance level. Setting this option to \"0\" means no limit."); - Advanced_Buttons.add(lblLimitFindInstance); - - JSpinner spinner_limit_Find_Instance = new JSpinner(); - spinner_limit_Find_Instance.setPreferredSize(new Dimension(50, 20)); - spinner_limit_Find_Instance.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); - spinner_limit_Find_Instance.addFocusListener(new FocusAdapter() { - @Override - public void focusLost(FocusEvent e) { - settings.LimitFindInstances=Integer.valueOf(spinner_limit_Find_Instance.getValue().toString()); - } - }); - spinner_limit_Find_Instance.setValue(settings.LimitFindInstances); - Advanced_Buttons.add(spinner_limit_Find_Instance); - - JLabel lblLimitsJobs = new JLabel("Limits Jobs"); - lblLimitsJobs.setToolTipText("The maximum number of active jobs in the Orthanc scheduler. When this limit is reached, the addition of new jobs is blocked until some job finishes"); - Advanced_Buttons.add(lblLimitsJobs); - - JSpinner spinner_limit_Jobs = new JSpinner(); - spinner_limit_Jobs.setPreferredSize(new Dimension(50, 20)); - spinner_limit_Jobs.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); - spinner_limit_Jobs.addFocusListener(new FocusAdapter() { - @Override - public void focusLost(FocusEvent e) { - settings.LimitJobs=Integer.valueOf(spinner_limit_Jobs.getValue().toString()); - } - }); - spinner_limit_Jobs.setValue(settings.LimitJobs); - Advanced_Buttons.add(spinner_limit_Jobs); JCheckBox chckbxLogExportedRessources = new JCheckBox("Log Exported Ressources"); + panel_chkbox.add(chckbxLogExportedRessources); chckbxLogExportedRessources.setToolTipText("If this option is set to \"false\", Orthanc will not log the resources that are exported to other DICOM modalities of Orthanc peers in the URI \"/exports\". "); chckbxLogExportedRessources.addFocusListener(new FocusAdapter() { @Override @@ -873,9 +922,9 @@ public void focusLost(FocusEvent e) { } }); chckbxLogExportedRessources.setSelected(settings.LogExportedResources); - Advanced_Buttons.add(chckbxLogExportedRessources); JCheckBox chckbxKeepAlive = new JCheckBox("Keep Alive"); + panel_chkbox.add(chckbxKeepAlive); chckbxKeepAlive.setToolTipText("Enable or disable HTTP Keep-Alive (deprecated). Set this option to \"true\" only in the case of high HTTP loads."); chckbxKeepAlive.addFocusListener(new FocusAdapter() { @Override @@ -884,9 +933,9 @@ public void focusLost(FocusEvent e) { } }); chckbxKeepAlive.setSelected(settings.KeepAlive); - Advanced_Buttons.add(chckbxKeepAlive); JCheckBox chckbxStoreDicom = new JCheckBox("Store DICOM"); + panel_chkbox.add(chckbxStoreDicom); chckbxStoreDicom.setToolTipText("If this option is set to \"false\", Orthanc will run in index-only mode. The DICOM files will not be stored on the drive. Note that this option might prevent the upgrade to newer versions of Orthanc."); chckbxStoreDicom.addFocusListener(new FocusAdapter() { @Override @@ -895,88 +944,10 @@ public void focusLost(FocusEvent e) { } }); chckbxStoreDicom.setSelected(settings.StoreDicom); - Advanced_Buttons.add(chckbxStoreDicom); - - JLabel lblDicomAssociationClose = new JLabel("DICOM Association Close Delay"); - lblDicomAssociationClose.setToolTipText("DICOM associations are kept open as long as new DICOM commands are issued. This option sets the number of seconds of inactivity to wait before automatically closing a DICOM association. If set to 0, the connection is closed immediately."); - Advanced_Buttons.add(lblDicomAssociationClose); - - JSpinner spinner_DICOM_Association_Close_Delay = new JSpinner(); - spinner_DICOM_Association_Close_Delay.setPreferredSize(new Dimension(50, 20)); - spinner_DICOM_Association_Close_Delay.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); - spinner_DICOM_Association_Close_Delay.addFocusListener(new FocusAdapter() { - @Override - public void focusLost(FocusEvent e) { - settings.DicomAssociationCloseDelay=Integer.valueOf(spinner_DICOM_Association_Close_Delay.getValue().toString()); - } - }); - spinner_DICOM_Association_Close_Delay.setValue(settings.DicomAssociationCloseDelay); - Advanced_Buttons.add(spinner_DICOM_Association_Close_Delay); - - JPanel Options_Strings = new JPanel(); - advanced.add(Options_Strings, BorderLayout.SOUTH); - Options_Strings.setLayout(new GridLayout(2, 2, 0, 0)); - - JPanel Advanced_String = new JPanel(); - advanced.add(Advanced_String, BorderLayout.SOUTH); - Advanced_String.setLayout(new GridLayout(3, 2, 0, 0)); - - JLabel label_3 = new JLabel("User Content Type"); - Advanced_String.add(label_3); - - Content_Type_Counter = new JLabel(String.valueOf(settings.contentType.size())); - Advanced_String.add(Content_Type_Counter); - - JLabel label_5 = new JLabel("Dictionnary"); - Advanced_String.add(label_5); - - Dictionnary_Counter = new JLabel(String.valueOf(settings.dictionary.size())); - Advanced_String.add(Dictionnary_Counter); - - JLabel lblMetadata = new JLabel("Metadata"); - Advanced_String.add(lblMetadata); - - Metadata_Counter = new JLabel(String.valueOf(settings.userMetadata.size())); - Advanced_String.add(Metadata_Counter); - - JPanel about = new JPanel(); - about.setBorder(new LineBorder(new Color(0, 0, 0))); - getContentPane().add(about); - about.setLayout(new BorderLayout(0, 0)); - - JPanel About_About = new JPanel(); - about.add(About_About, BorderLayout.SOUTH); - About_About.setLayout(new GridLayout(2, 2, 0, 0)); - - JPanel About_Title = new JPanel(); - about.add(About_Title, BorderLayout.NORTH); - - JLabel lblAbout = new JLabel("Advanced Options (2)"); - About_Title.add(lblAbout); - - JPanel About_Buttons = new JPanel(); - about.add(About_Buttons, BorderLayout.CENTER); - About_Buttons.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5)); - - JLabel lblQueryretrieveSize = new JLabel("Query/Retrieve Size"); - lblQueryretrieveSize.setToolTipText("Maximum number of query/retrieve DICOM requests that are maintained by Orthanc. The least recently used requests get deleted as new requests are issued."); - About_Buttons.add(lblQueryretrieveSize); - - JSpinner spinner_QueryRetrieve_Size = new JSpinner(); - spinner_QueryRetrieve_Size.setPreferredSize(new Dimension(50, 20)); - spinner_QueryRetrieve_Size.setModel(new SpinnerNumberModel (0.0, 0.0, null, 1.0)); - About_Buttons.add(spinner_QueryRetrieve_Size); - spinner_QueryRetrieve_Size.addFocusListener(new FocusAdapter() { - @Override - public void focusLost(FocusEvent e) { - settings.QueryRetrieveSize=Integer.valueOf(spinner_QueryRetrieve_Size.getValue().toString()); - } - }); - spinner_QueryRetrieve_Size.setValue(settings.QueryRetrieveSize); JCheckBox chckbxCaseSensitivePatient = new JCheckBox("Case Sensitive Patient Name"); + panel_chkbox.add(chckbxCaseSensitivePatient); chckbxCaseSensitivePatient.setToolTipText("When handling a C-Find SCP request, setting this flag to \"true\" will enable case-sensitive match for PN value representation (such as PatientName). By default, the search is case-insensitive, which does not follow the DICOM standard."); - About_Buttons.add(chckbxCaseSensitivePatient); chckbxCaseSensitivePatient.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { @@ -986,8 +957,8 @@ public void focusLost(FocusEvent e) { chckbxCaseSensitivePatient.setSelected(settings.CaseSensitivePN); JCheckBox chckbxAllowFindSop = new JCheckBox("Allow Find SOP classe in study"); + panel_chkbox.add(chckbxAllowFindSop); chckbxAllowFindSop.setToolTipText("If set to \"true\", Orthanc will still handle \"SOP Classes in Study\" (0008,0062) in C-FIND requests, even if the \"SOP Class UID\" metadata is not available in the database.This option is turned off by default, as it requires intensive accesses to the hard drive."); - About_Buttons.add(chckbxAllowFindSop); chckbxAllowFindSop.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { @@ -997,8 +968,8 @@ public void focusLost(FocusEvent e) { chckbxAllowFindSop.setSelected(settings.AllowFindSopClassesInStudy); JCheckBox chckbxLoadPrivateDictionary = new JCheckBox("Load Private Dictionary"); + panel_chkbox.add(chckbxLoadPrivateDictionary); chckbxLoadPrivateDictionary.setToolTipText("If set to \"false\", Orthanc will not load its default dictionary of private tags."); - About_Buttons.add(chckbxLoadPrivateDictionary); chckbxLoadPrivateDictionary.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { @@ -1007,7 +978,27 @@ public void focusLost(FocusEvent e) { }); chckbxLoadPrivateDictionary.setSelected(settings.LoadPrivateDictionary); + JPanel panel_btn = new JPanel(); + Advanced_Buttons.add(panel_btn); + panel_btn.setLayout(new GridLayout(0, 2, 0, 0)); + + JButton btnUserMetadata = new JButton("User Metadata"); + panel_btn.add(btnUserMetadata); + btnUserMetadata.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + MetadataDialog DialogMetadata=new MetadataDialog(settings); + DialogMetadata.setVisible(true); + Metadata_Counter.setText(String.valueOf(settings.userMetadata.size())); + } + }); + btnUserMetadata.setToolTipText("Dictionary of symbolic names for the user-defined metadata"); + + JButton btnUserContentType = new JButton("User Content Type"); + panel_btn.add(btnUserContentType); + btnUserContentType.setToolTipText("Dictionary of symbolic names for the user-defined types of attached files."); + JButton btnDictionnary = new JButton("Dictionnary"); + panel_btn.add(btnDictionnary); btnDictionnary.setToolTipText("Register a new tag in the dictionary of DICOM tags that are known to Orthanc."); btnDictionnary.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -1017,64 +1008,47 @@ public void actionPerformed(ActionEvent e) { Dictionnary_Counter.setText(String.valueOf(settings.dictionary.size())); } }); - About_Buttons.add(btnDictionnary); - - JPanel panel_1 = new JPanel(); - panel_1.setBorder(new LineBorder(new Color(0, 0, 0))); - getContentPane().add(panel_1); - panel_1.setLayout(new BorderLayout(0, 0)); - - JPanel panel_4 = new JPanel(); - panel_1.add(panel_4, BorderLayout.CENTER); - panel_4.setLayout(new GridLayout(0, 1, 0, 0)); + btnUserContentType.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Content_Dialog contentDialog=new Content_Dialog(settings); + contentDialog.setVisible(true); + contentDialog.setAlwaysOnTop(true); + Content_Type_Counter.setText(String.valueOf(settings.contentType.size())); + + } + }); - JLabel label_1 = new JLabel("GPL v.3"); - panel_4.add(label_1); + JPanel Advanced_String = new JPanel(); + advanced.add(Advanced_String, BorderLayout.SOUTH); + Advanced_String.setLayout(new GridLayout(3, 2, 0, 0)); - JLabel label_2 = new JLabel("Developper : Salim Kanoun"); - panel_4.add(label_2); + JLabel label_3 = new JLabel("User Content Type"); + Advanced_String.add(label_3); - JLabel lblContributionFromPetctviewerorg = new JLabel("Contribution from petctviewer.org"); - panel_4.add(lblContributionFromPetctviewerorg); + Content_Type_Counter = new JLabel(String.valueOf(settings.contentType.size())); + Advanced_String.add(Content_Type_Counter); - JLabel lblNewLabel_4 = new JLabel(" Free and open source PET/CT Viewer"); - panel_4.add(lblNewLabel_4); + JLabel label_5 = new JLabel("Dictionnary"); + Advanced_String.add(label_5); - JPanel panel_5 = new JPanel(); - panel_1.add(panel_5, BorderLayout.NORTH); + Dictionnary_Counter = new JLabel(String.valueOf(settings.dictionary.size())); + Advanced_String.add(Dictionnary_Counter); - JLabel label = new JLabel("Orthanc JSON Editor"); - panel_5.add(label); + JLabel lblMetadata = new JLabel("Metadata"); + Advanced_String.add(lblMetadata); - JPanel panel_2 = new JPanel(); - panel_1.add(panel_2, BorderLayout.WEST); + Metadata_Counter = new JLabel(String.valueOf(settings.userMetadata.size())); + Advanced_String.add(Metadata_Counter); JPanel buttons = new JPanel(); buttons.setBorder(new LineBorder(new Color(0, 0, 0))); - getContentPane().add(buttons); + getContentPane().add(buttons, BorderLayout.SOUTH); buttons.setLayout(new BorderLayout(0, 0)); - JPanel Bouttons_Title = new JPanel(); - buttons.add(Bouttons_Title, BorderLayout.NORTH); - - JLabel lblLoadSave = new JLabel("Load / Save JSON"); - Bouttons_Title.add(lblLoadSave); - JPanel Bouttons_Bouttons = new JPanel(); buttons.add(Bouttons_Bouttons, BorderLayout.CENTER); Bouttons_Bouttons.setLayout(new GridLayout(0, 2, 0, 0)); - JPanel Orthanc_Version_Panel = new JPanel(); - Bouttons_Bouttons.add(Orthanc_Version_Panel); - Orthanc_Version_Panel.setLayout(new BorderLayout(0, 0)); - - JLabel lblNewLabel_5 = new JLabel("For Orthanc 1.3.0"); - lblNewLabel_5.setHorizontalAlignment(SwingConstants.CENTER); - Orthanc_Version_Panel.add(lblNewLabel_5, BorderLayout.SOUTH); - - JPanel panel_6 = new JPanel(); - Bouttons_Bouttons.add(panel_6); - JButton btnLoadJson = new JButton("Load JSON"); btnLoadJson.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { @@ -1103,9 +1077,9 @@ public void actionPerformed(ActionEvent arg0) { } } }); - Bouttons_Bouttons.add(btnLoadJson); JButton btnSaveJson = new JButton("Save JSON"); + Bouttons_Bouttons.add(btnSaveJson); btnSaveJson.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { //On ecrit le JSON defini dans Index Orthanc @@ -1122,20 +1096,19 @@ public void actionPerformed(ActionEvent arg0) { } } }); - Bouttons_Bouttons.add(btnSaveJson); - JPanel Orthanc_Connection = new JPanel(); - buttons.add(Orthanc_Connection, BorderLayout.SOUTH); + JLabel lblNewLabel_5 = new JLabel("For Orthanc 1.3.2"); + Bouttons_Bouttons.add(lblNewLabel_5); + lblNewLabel_5.setHorizontalAlignment(SwingConstants.CENTER); + Bouttons_Bouttons.add(btnLoadJson); JButton btnRestartOrthancServer = new JButton("Restart Orthanc Server"); + Bouttons_Bouttons.add(btnRestartOrthancServer); btnRestartOrthancServer.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { connexion.restartOrthanc(); } }); - Orthanc_Connection.setLayout(new GridLayout(0, 2, 0, 0)); - - Orthanc_Connection.add(btnRestartOrthancServer); } public static void main(String[] args) { @@ -1146,5 +1119,4 @@ public static void main(String[] args) { gui.setSize(gui.getPreferredSize()); gui.setVisible(true); } - } diff --git a/src/org/petctviewer/orthanc/setup/ConnectionSetup.java b/src/org/petctviewer/orthanc/setup/ConnectionSetup.java index 1208e526..960fb3d2 100644 --- a/src/org/petctviewer/orthanc/setup/ConnectionSetup.java +++ b/src/org/petctviewer/orthanc/setup/ConnectionSetup.java @@ -40,6 +40,13 @@ import javax.swing.JTextField; import ij.plugin.PlugIn; +import java.awt.GridLayout; +import java.awt.BorderLayout; +import javax.swing.SwingConstants; +import javax.swing.border.LineBorder; +import java.awt.Color; +import java.awt.Component; +import javax.swing.Box; public class ConnectionSetup extends JDialog implements PlugIn{ @@ -55,12 +62,149 @@ public ConnectionSetup(Run_Orthanc orthanc){ this.setLocationRelativeTo(null); this.setAlwaysOnTop(true); this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); + JPanel mainPanel = new JPanel(); - mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.PAGE_AXIS)); - JPanel setupPanel = new JPanel(new GridBagLayout()); - GridBagConstraints gbc = new GridBagConstraints(); - JPanel disclaimerPanel = new JPanel(new FlowLayout()); + + + + + + Image image = new ImageIcon(ClassLoader.getSystemResource("logos/OrthancIcon.png")).getImage(); + this.setIconImage(image); + + this.getContentPane().add(mainPanel); + mainPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5)); + JPanel setupPanel = new JPanel(); + mainPanel.add(setupPanel); + setupPanel.setBorder(new LineBorder(new Color(0, 0, 0))); + setupPanel.setLayout(new BorderLayout(0, 0)); + + + JLabel lblExistingOrthancServer = new JLabel("Existing Orthanc Server"); + setupPanel.add(lblExistingOrthancServer, BorderLayout.NORTH); + lblExistingOrthancServer.setHorizontalAlignment(SwingConstants.CENTER); + + JPanel panel_http_settings = new JPanel(); + panel_http_settings.setLayout(new GridLayout(0, 2, 0, 0)); + + JLabel label = new JLabel("Address"); + panel_http_settings.add(label); + + JTextField ipTxt = new JTextField(); + panel_http_settings.add(ipTxt); + ipTxt.setPreferredSize(new Dimension(100,18)); + ipTxt.setText(jpreferPerso.get("ip", "http://")); + + + JLabel label_1 = new JLabel("Port"); + JTextField portTxt = new JTextField(); + portTxt.setPreferredSize(new Dimension(100,18)); + portTxt.setText(jpreferPerso.get("port", "")); + + + JLabel label_2 = new JLabel("Username"); + JTextField usernameTxt = new JTextField(); + usernameTxt.setPreferredSize(new Dimension(100,18)); + usernameTxt.setText(jpreferPerso.get("username", "")); + + JLabel label_3 = new JLabel("Password"); + JPasswordField passwordTxt = new JPasswordField(); + passwordTxt.setPreferredSize(new Dimension(100,18)); + passwordTxt.setText(jpreferPerso.get("password", "")); + + + panel_http_settings.add(label_1); + panel_http_settings.add(portTxt); + panel_http_settings.add(label_2); + panel_http_settings.add(usernameTxt); + panel_http_settings.add(label_3); + panel_http_settings.add(passwordTxt); + + setupPanel.add(panel_http_settings); + + JButton submit = new JButton("Submit"); + setupPanel.add(submit, BorderLayout.SOUTH); + submit.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + if (ipTxt.getText().toLowerCase().startsWith("http://") || ipTxt.getText().toLowerCase().startsWith("https://")) { + jpreferPerso.put("ip", ipTxt.getText()); + jpreferPerso.put("port", portTxt.getText()); + jpreferPerso.put("password", new String(passwordTxt.getPassword())); + jpreferPerso.put("username", usernameTxt.getText()); + JOptionPane.showMessageDialog(gui, + "please restart app"); + dispose(); + } + else { + JOptionPane.showMessageDialog(gui, + "IP should start with http:// or https://"); + + } + + + } + }); + + JPanel panel_non_install = new JPanel(); + mainPanel.add(panel_non_install); + panel_non_install.setBorder(new LineBorder(new Color(0, 0, 0))); + panel_non_install.setLayout(new BorderLayout(0, 0)); + + JLabel lblStartOrthancWithout = new JLabel("Start Orthanc without Install"); + lblStartOrthancWithout.setHorizontalAlignment(SwingConstants.CENTER); + panel_non_install.add(lblStartOrthancWithout, BorderLayout.NORTH); + + JPanel button_non_install = new JPanel(); + panel_non_install.add(button_non_install, BorderLayout.SOUTH); + + //Display start or stop button depending on local run of orthanc + JButton runOrthancLocal= new JButton("Run Local Orthanc"); + if(orthanc.getIsStarted()) { + runOrthancLocal.setText("Stop Orthanc Local"); + } + + runOrthancLocal.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + String os=System.getProperty("os.name"); + if(os.startsWith("Windows")) { + if(runOrthancLocal.getText()=="Run Local Orthanc") { + try { + orthanc.start(); + dispose(); + } catch (Exception e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + }else { + orthanc.stopOrthanc(); + dispose(); + } + } + else { + JOptionPane.showMessageDialog(gui, "Only available for Windows", "Error", JOptionPane.ERROR_MESSAGE); + } + + + + + } + + + }); + + JButton btnReusableRun = new JButton("Re-usable Run"); + button_non_install.add(btnReusableRun); + button_non_install.add(runOrthancLocal); + + FlowLayout fl_disclaimerPanel = new FlowLayout(); + fl_disclaimerPanel.setVgap(10); + JPanel disclaimerPanel = new JPanel(fl_disclaimerPanel); + getContentPane().add(disclaimerPanel, BorderLayout.NORTH); JLabel disclaimer = new JLabel("This service needs the installation of the Orthanc Server, see our"); disclaimerPanel.add(disclaimer); JButton link = new JButton("documentation"); @@ -77,126 +221,9 @@ public void actionPerformed(ActionEvent e) openWebPage("http://petctviewer.org/images/QuickSetupGuide_Networking_DICOM.pdf"); } }); - disclaimerPanel.add(link); - JTextField ipTxt = new JTextField(); - ipTxt.setPreferredSize(new Dimension(100,18)); - JTextField portTxt = new JTextField(); - portTxt.setPreferredSize(new Dimension(100,18)); - JTextField usernameTxt = new JTextField(); - usernameTxt.setPreferredSize(new Dimension(100,18)); - JPasswordField passwordTxt = new JPasswordField(); - passwordTxt.setPreferredSize(new Dimension(100,18)); - - ipTxt.setText(jpreferPerso.get("ip", "http://")); - portTxt.setText(jpreferPerso.get("port", "")); - usernameTxt.setText(jpreferPerso.get("username", "")); - passwordTxt.setText(jpreferPerso.get("password", "")); - - - gbc.anchor = GridBagConstraints.WEST; - gbc.insets = new Insets(10, 10, 10, 10); - gbc.gridx = 0; - gbc.gridy = 0; - setupPanel.add(new JLabel("Address"), gbc); - gbc.gridx = 1; - setupPanel.add(ipTxt, gbc); - - gbc.gridx = 0; - gbc.gridy = 1; - setupPanel.add(new JLabel("Port"), gbc); - gbc.gridx = 1; - setupPanel.add(portTxt, gbc); - - gbc.gridx = 0; - gbc.gridy = 2; - setupPanel.add(new JLabel("Username"), gbc); - gbc.gridx = 1; - setupPanel.add(usernameTxt, gbc); - - gbc.gridx = 0; - gbc.gridy = 3; - setupPanel.add(new JLabel("Password"), gbc); - gbc.gridx = 1; - setupPanel.add(passwordTxt, gbc); - - JButton submit = new JButton("Submit"); - submit.addActionListener(new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - if (ipTxt.getText().toLowerCase().startsWith("http://") || ipTxt.getText().toLowerCase().startsWith("https://")) { - jpreferPerso.put("ip", ipTxt.getText()); - jpreferPerso.put("port", portTxt.getText()); - jpreferPerso.put("password", new String(passwordTxt.getPassword())); - jpreferPerso.put("username", usernameTxt.getText()); - JOptionPane.showMessageDialog(gui, - "please restart app"); - dispose(); - } - else { - JOptionPane.showMessageDialog(gui, - "IP should start with http:// or https://"); - - } - - - } - }); - - - //Display start or stop button depending on local run of orthanc - JButton runOrthancLocal; - if(orthanc.getIsStarted()) { - runOrthancLocal = new JButton("Stop Orthanc Local"); - } - else { - runOrthancLocal = new JButton("Run Local Orthanc"); - } - - - - runOrthancLocal.addActionListener(new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - String os=System.getProperty("os.name"); - if(os.startsWith("Windows")) { - if(runOrthancLocal.getText()=="Run Local Orthanc") { - try { - orthanc.start(); - dispose(); - } catch (Exception e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - }else { - orthanc.stopOrthanc(); - dispose(); - } - } - else { - JOptionPane.showMessageDialog(gui, "Only available for Windows", "Error", JOptionPane.ERROR_MESSAGE); - } - - - - - } - - - }); - - gbc.gridy = 4; - setupPanel.add(submit, gbc); - - Image image = new ImageIcon(ClassLoader.getSystemResource("logos/OrthancIcon.png")).getImage(); - this.setIconImage(image); - mainPanel.add(disclaimerPanel); - mainPanel.add(setupPanel); - mainPanel.add(runOrthancLocal); - this.getContentPane().add(mainPanel); + disclaimerPanel.add(link); setSize(1200, 400); pack(); } From 97b6b70553a6975a9130674cb0b31e19a67930c9 Mon Sep 17 00:00:00 2001 From: salim Date: Sat, 23 Jun 2018 17:45:12 +0200 Subject: [PATCH 08/10] debug --- .../orthanc/setup/ConnectionSetup.java | 121 +++++++++--------- 1 file changed, 58 insertions(+), 63 deletions(-) diff --git a/src/org/petctviewer/orthanc/setup/ConnectionSetup.java b/src/org/petctviewer/orthanc/setup/ConnectionSetup.java index 960fb3d2..17306532 100644 --- a/src/org/petctviewer/orthanc/setup/ConnectionSetup.java +++ b/src/org/petctviewer/orthanc/setup/ConnectionSetup.java @@ -64,12 +64,7 @@ public ConnectionSetup(Run_Orthanc orthanc){ this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); JPanel mainPanel = new JPanel(); - - - - - Image image = new ImageIcon(ClassLoader.getSystemResource("logos/OrthancIcon.png")).getImage(); this.setIconImage(image); @@ -86,67 +81,67 @@ public ConnectionSetup(Run_Orthanc orthanc){ lblExistingOrthancServer.setHorizontalAlignment(SwingConstants.CENTER); JPanel panel_http_settings = new JPanel(); - panel_http_settings.setLayout(new GridLayout(0, 2, 0, 0)); + panel_http_settings.setLayout(new GridLayout(0, 2, 0, 0)); + + JLabel label = new JLabel("Address"); + panel_http_settings.add(label); - JLabel label = new JLabel("Address"); - panel_http_settings.add(label); - - JTextField ipTxt = new JTextField(); - panel_http_settings.add(ipTxt); - ipTxt.setPreferredSize(new Dimension(100,18)); - ipTxt.setText(jpreferPerso.get("ip", "http://")); - - - JLabel label_1 = new JLabel("Port"); - JTextField portTxt = new JTextField(); - portTxt.setPreferredSize(new Dimension(100,18)); - portTxt.setText(jpreferPerso.get("port", "")); - - - JLabel label_2 = new JLabel("Username"); - JTextField usernameTxt = new JTextField(); - usernameTxt.setPreferredSize(new Dimension(100,18)); - usernameTxt.setText(jpreferPerso.get("username", "")); - - JLabel label_3 = new JLabel("Password"); - JPasswordField passwordTxt = new JPasswordField(); - passwordTxt.setPreferredSize(new Dimension(100,18)); - passwordTxt.setText(jpreferPerso.get("password", "")); - - - panel_http_settings.add(label_1); - panel_http_settings.add(portTxt); - panel_http_settings.add(label_2); - panel_http_settings.add(usernameTxt); - panel_http_settings.add(label_3); - panel_http_settings.add(passwordTxt); + JTextField ipTxt = new JTextField(); + panel_http_settings.add(ipTxt); + ipTxt.setPreferredSize(new Dimension(100,18)); + ipTxt.setText(jpreferPerso.get("ip", "http://")); + + + JLabel label_1 = new JLabel("Port"); + JTextField portTxt = new JTextField(); + portTxt.setPreferredSize(new Dimension(100,18)); + portTxt.setText(jpreferPerso.get("port", "")); + + + JLabel label_2 = new JLabel("Username"); + JTextField usernameTxt = new JTextField(); + usernameTxt.setPreferredSize(new Dimension(100,18)); + usernameTxt.setText(jpreferPerso.get("username", "")); + + JLabel label_3 = new JLabel("Password"); + JPasswordField passwordTxt = new JPasswordField(); + passwordTxt.setPreferredSize(new Dimension(100,18)); + passwordTxt.setText(jpreferPerso.get("password", "")); + + + panel_http_settings.add(label_1); + panel_http_settings.add(portTxt); + panel_http_settings.add(label_2); + panel_http_settings.add(usernameTxt); + panel_http_settings.add(label_3); + panel_http_settings.add(passwordTxt); + + setupPanel.add(panel_http_settings); + + JButton submit = new JButton("Submit"); + setupPanel.add(submit, BorderLayout.SOUTH); + submit.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + if (ipTxt.getText().toLowerCase().startsWith("http://") || ipTxt.getText().toLowerCase().startsWith("https://")) { + jpreferPerso.put("ip", ipTxt.getText()); + jpreferPerso.put("port", portTxt.getText()); + jpreferPerso.put("password", new String(passwordTxt.getPassword())); + jpreferPerso.put("username", usernameTxt.getText()); + JOptionPane.showMessageDialog(gui, + "please restart app"); + dispose(); + } + else { + JOptionPane.showMessageDialog(gui, + "IP should start with http:// or https://"); + + } - setupPanel.add(panel_http_settings); - JButton submit = new JButton("Submit"); - setupPanel.add(submit, BorderLayout.SOUTH); - submit.addActionListener(new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - if (ipTxt.getText().toLowerCase().startsWith("http://") || ipTxt.getText().toLowerCase().startsWith("https://")) { - jpreferPerso.put("ip", ipTxt.getText()); - jpreferPerso.put("port", portTxt.getText()); - jpreferPerso.put("password", new String(passwordTxt.getPassword())); - jpreferPerso.put("username", usernameTxt.getText()); - JOptionPane.showMessageDialog(gui, - "please restart app"); - dispose(); - } - else { - JOptionPane.showMessageDialog(gui, - "IP should start with http:// or https://"); - - } - - - } - }); + } + }); JPanel panel_non_install = new JPanel(); mainPanel.add(panel_non_install); From 6019d9dae8d54adc19a21fc4682ff0f01d2d43a1 Mon Sep 17 00:00:00 2001 From: salim Date: Sat, 23 Jun 2018 17:51:21 +0200 Subject: [PATCH 09/10] debug --- src/org/petctviewer/orthanc/monitoring/monitoring.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/petctviewer/orthanc/monitoring/monitoring.sql b/src/org/petctviewer/orthanc/monitoring/monitoring.sql index 4474da1a..bad63fe9 100644 --- a/src/org/petctviewer/orthanc/monitoring/monitoring.sql +++ b/src/org/petctviewer/orthanc/monitoring/monitoring.sql @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Client : localhost --- Généré le : Sam 23 Juin 2018 à 14:31 +-- Généré le : Sam 23 Juin 2018 à 17:50 -- Version du serveur : 5.7.22-0ubuntu0.16.04.1 -- Version de PHP : 7.0.30-0ubuntu0.16.04.1 From 4c3f3c5ad0855736ee678504b2efbebb93acb975 Mon Sep 17 00:00:00 2001 From: salim Date: Sat, 23 Jun 2018 18:26:11 +0200 Subject: [PATCH 10/10] debug --- .../orthanc/Jsonsettings/SettingsGUI.java | 52 ++++++++----------- .../orthanc/anonymize/VueAnon.java | 2 - 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/src/org/petctviewer/orthanc/Jsonsettings/SettingsGUI.java b/src/org/petctviewer/orthanc/Jsonsettings/SettingsGUI.java index 7716fae0..1511dc53 100644 --- a/src/org/petctviewer/orthanc/Jsonsettings/SettingsGUI.java +++ b/src/org/petctviewer/orthanc/Jsonsettings/SettingsGUI.java @@ -14,44 +14,36 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -import javax.swing.JFrame; -import java.awt.GridLayout; - -import javax.swing.JPanel; -import javax.swing.JTextField; -import javax.swing.JLabel; -import javax.swing.JOptionPane; -import javax.swing.JButton; -import javax.swing.JSpinner; import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.GridLayout; +import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; import java.io.File; -import java.io.IOException; -import java.security.KeyManagementException; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.awt.event.ActionEvent; -import java.awt.Dimension; -import javax.swing.border.LineBorder; -import org.json.simple.parser.ParseException; -import org.petctviewer.orthanc.ParametreConnexionHttp; - -import java.awt.Color; -import javax.swing.JComboBox; -import javax.swing.JFileChooser; +import javax.swing.Box; import javax.swing.DefaultComboBoxModel; +import javax.swing.JButton; import javax.swing.JCheckBox; +import javax.swing.JComboBox; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JSpinner; +import javax.swing.JTabbedPane; +import javax.swing.JTextField; import javax.swing.SpinnerNumberModel; - -import java.awt.event.FocusAdapter; -import java.awt.event.FocusEvent; -import java.awt.FlowLayout; import javax.swing.SwingConstants; -import javax.swing.JTabbedPane; -import java.awt.Component; -import javax.swing.Box; -import java.awt.Font; +import javax.swing.border.LineBorder; + +import org.petctviewer.orthanc.ParametreConnexionHttp; public class SettingsGUI extends JFrame { diff --git a/src/org/petctviewer/orthanc/anonymize/VueAnon.java b/src/org/petctviewer/orthanc/anonymize/VueAnon.java index c9e355df..bad96869 100644 --- a/src/org/petctviewer/orthanc/anonymize/VueAnon.java +++ b/src/org/petctviewer/orthanc/anonymize/VueAnon.java @@ -88,8 +88,6 @@ import com.michaelbaranov.microba.calendar.DatePicker; -import ij.IJ; -import ij.WindowManager; import ij.plugin.PlugIn; import org.petctviewer.orthanc.*;