Skip to content

Commit

Permalink
Merge pull request #28 from salimkanoun/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
salimkanoun authored Mar 25, 2019
2 parents 8504b74 + 01a9905 commit beaad53
Show file tree
Hide file tree
Showing 146 changed files with 10,731 additions and 11,612 deletions.
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,6 @@
<version>2.0.1</version>
</dependency>

<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
Expand Down
Binary file removed src/Orthanc_Standalone/Orthanc-1.5.1-Release.exe
Binary file not shown.
Binary file removed src/Orthanc_Standalone/Orthanc-1.5.1-ReleaseLinux
Binary file not shown.
Binary file removed src/Orthanc_Standalone/Orthanc-1.5.1-ReleaseMac
Binary file not shown.
Binary file removed src/Orthanc_Standalone/Orthanc-1.5.1-Release_32.exe
Binary file not shown.
Binary file added src/Orthanc_Standalone/Orthanc-1.5.6-ReleaseLinux
Binary file not shown.
Binary file added src/Orthanc_Standalone/Orthanc-1.5.6-ReleaseMac
Binary file not shown.
Binary file not shown.
Binary file added src/Orthanc_Standalone/OrthancTransfers.dll
Binary file not shown.
Binary file removed src/Orthanc_Standalone/OrthancWebViewer-2.4_32.dll
Binary file not shown.
Binary file modified src/Orthanc_Standalone/OrthancWebViewer.dll
Binary file not shown.
Binary file added src/Orthanc_Standalone/libOrthancTransfers.dylib
Binary file not shown.
Binary file modified src/Orthanc_Standalone/libOrthancTransfers.so
Binary file not shown.
Binary file modified src/Orthanc_Standalone/libOrthancWebViewer.so
Binary file not shown.
Binary file removed src/logos/chu.png
Binary file not shown.
Binary file removed src/logos/claudiusregaud.png
Binary file not shown.
Binary file removed src/logos/iut.png
Binary file not shown.
Binary file removed src/logos/logo.png
Binary file not shown.
Binary file added src/logos/orthanc-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
203 changes: 0 additions & 203 deletions src/org/petctviewer/orthanc/CTP/CTP.java

This file was deleted.

35 changes: 10 additions & 25 deletions src/org/petctviewer/orthanc/Jsonsettings/Connection_Dialog.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
package org.petctviewer.orthanc.Jsonsettings;
import java.awt.EventQueue;

import javax.swing.JDialog;
import javax.swing.JPanel;
import java.awt.BorderLayout;
Expand All @@ -20,23 +18,6 @@ public class Connection_Dialog extends JDialog {
private String login;
private String password;

/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Connection_Dialog dialog = new Connection_Dialog();
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}

/**
* Create the dialog.
*/
Expand Down Expand Up @@ -99,13 +80,17 @@ public void actionPerformed(ActionEvent arg0) {
panel_2.add(lblEnterCorrectSettings);

}
protected String getAddress(){
return address;

protected String getAddress(){
return address;
}
protected String getLogin(){
return login;

protected String getLogin(){
return login;
}
protected String getPassword(){
return password;

protected String getPassword(){
return password;
}

}
20 changes: 4 additions & 16 deletions src/org/petctviewer/orthanc/Jsonsettings/Content_Dialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

import org.json.simple.JSONArray;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
Expand All @@ -38,19 +39,6 @@ public class Content_Dialog extends JDialog {
private JTable table;
private DefaultTableModel model;

/**
* Launch the application.
*/
public static void main(String[] args) {
try {
Content_Dialog dialog = new Content_Dialog(new Json_Settings());
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}

/**
* Create the dialog.
*/
Expand All @@ -71,7 +59,7 @@ public Content_Dialog(Json_Settings settings) {
settings.contentType.keySet().toArray(contentType);
for (int i=0 ; i<contentType.length;i++){
model.addRow(new Object[]{"Name", "0", "MIME"});
JSONArray content=settings.contentType.get(contentType[i]);
JsonArray content=settings.contentType.get(contentType[i]).getAsJsonArray();
table.setValueAt(contentType[i], i, 0);
table.setValueAt(Integer.valueOf(content.get(0).toString()), i, 1);
table.setValueAt(content.get(1).toString(), i, 2);
Expand Down Expand Up @@ -128,7 +116,7 @@ public void actionPerformed(ActionEvent e) {
okButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//On vide les ancienne content
settings.contentType.clear();
settings.contentType=new JsonObject();
for (int i=0; i<table.getRowCount(); i++){
settings.addContentType(table.getValueAt(i, 0).toString(), Integer.valueOf(table.getValueAt(i, 1).toString()), table.getValueAt(i, 2).toString());
}
Expand Down
30 changes: 10 additions & 20 deletions src/org/petctviewer/orthanc/Jsonsettings/DicomDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,16 @@
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumn;

import com.google.gson.JsonObject;

import javax.swing.JScrollPane;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

@SuppressWarnings("serial")
public class DicomDialog extends JDialog {
private JTable table;
/**
* Launch the application.
*/
public static void main(String[] args) {
try {
DicomDialog dialog = new DicomDialog(new Json_Settings());
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setAlwaysOnTop(true);
dialog.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}

/**
* Create the dialog.
Expand Down Expand Up @@ -80,12 +70,12 @@ public DicomDialog(Json_Settings settings) {
model.addRow(new Object[]{"Name", "AET", "IP", "0", "GenericNoUniversalWildcard"});
//On recupere les variable des arrays de la Hasmap des dicomNode
table.setValueAt(aetDispo[i], i, 0);
table.setValueAt(settings.dicomNode.get(aetDispo[i]).get(0).toString(), i, 1);
table.setValueAt(settings.dicomNode.get(aetDispo[i]).get(1).toString(), i, 2);
table.setValueAt(settings.dicomNode.get(aetDispo[i]).get(2).toString(), i, 3);
table.setValueAt(settings.dicomNode.get(aetDispo[i]).getAsJsonArray().get(0).getAsString(), i, 1);
table.setValueAt(settings.dicomNode.get(aetDispo[i]).getAsJsonArray().get(1).getAsString(), i, 2);
table.setValueAt(settings.dicomNode.get(aetDispo[i]).getAsJsonArray().get(2).getAsString(), i, 3);
//Le manifacturer n'est pas obligatoire
if (settings.dicomNode.get(aetDispo[i]).size()==3) table.setValueAt("Generic", i, 4);
if (settings.dicomNode.get(aetDispo[i]).size()==4) table.setValueAt(settings.dicomNode.get(aetDispo[i]).get(3).toString(), i, 4);
if (settings.dicomNode.get(aetDispo[i]).getAsJsonArray().size()==3) table.setValueAt("Generic", i, 4);
if (settings.dicomNode.get(aetDispo[i]).getAsJsonArray().size()==4) table.setValueAt(settings.dicomNode.get(aetDispo[i]).getAsJsonArray().get(3).getAsString(), i, 4);
}


Expand All @@ -104,7 +94,7 @@ public DicomDialog(Json_Settings settings) {
okButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
//On vide l'ancienne variable des dicom node (pour effacer ceux qui aurait ete supprimee)
settings.dicomNode.clear();
settings.dicomNode=new JsonObject();
//On en construit une nouvelle à partir des valeurs du tableau
for (int i=0; i<table.getRowCount();i++)
{
Expand Down Expand Up @@ -157,7 +147,7 @@ public void actionPerformed(ActionEvent arg0) {
okButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//On vide la liste des dicomnodes avant de la reconstruire
settings.dicomNode.clear();
settings.dicomNode=new JsonObject();
for (int i=0; i<table.getRowCount(); i++){
settings.addDicomNode(table.getValueAt(i, 0).toString(), table.getValueAt(i, 1).toString(), table.getValueAt(i, 2).toString(), Integer.valueOf(table.getValueAt(i, 3).toString()), table.getValueAt(i, 4).toString());
}
Expand Down
Loading

0 comments on commit beaad53

Please sign in to comment.