Procházet zdrojové kódy

Add options for Storage AE title and port

Support for dicom retrieves where remote server needs to
know where to send images (to our local instance)
Steve Pieper před 14 roky
rodič
revize
641ca57264

+ 1 - 1
Libs/DICOM/Widgets/Resources/UI/ctkDICOMQueryRetrieveWidget.ui

@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>843</width>
-    <height>530</height>
+    <height>613</height>
    </rect>
   </property>
   <property name="windowTitle">

+ 51 - 7
Libs/DICOM/Widgets/Resources/UI/ctkDICOMServerNodeWidget.ui

@@ -15,16 +15,28 @@
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
-    <widget class="QLabel" name="label_2">
-     <property name="text">
-      <string>Calling AETitle</string>
+    <widget class="QFrame" name="frame_2">
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
      </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <item>
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>Calling AETitle</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="CallingAETitle"/>
+      </item>
+     </layout>
     </widget>
    </item>
    <item>
-    <widget class="QLineEdit" name="CallingAETitle"/>
-   </item>
-   <item>
     <widget class="QLabel" name="label">
      <property name="text">
       <string>Servers</string>
@@ -42,7 +54,7 @@
         <x>0</x>
         <y>0</y>
         <width>565</width>
-        <height>392</height>
+        <height>342</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_2">
@@ -106,6 +118,38 @@
      </layout>
     </widget>
    </item>
+   <item>
+    <widget class="QFrame" name="frame_3">
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_3">
+      <item>
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>Storage AETitle</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="StorageAETitle"/>
+      </item>
+      <item>
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>Storage Port</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="StoragePort"/>
+      </item>
+     </layout>
+    </widget>
+   </item>
   </layout>
  </widget>
  <resources/>

+ 10 - 0
Libs/DICOM/Widgets/ctkDICOMServerNodeWidget.cpp

@@ -73,6 +73,10 @@ ctkDICOMServerNodeWidget::ctkDICOMServerNodeWidget(QWidget* _parent):Superclass(
 
   connect(d->CallingAETitle, SIGNAL(textChanged(const QString&)),
     this, SLOT(saveSettings()));
+  connect(d->StorageAETitle, SIGNAL(textChanged(const QString&)),
+    this, SLOT(saveSettings()));
+  connect(d->StoragePort, SIGNAL(textChanged(const QString&)),
+    this, SLOT(saveSettings()));
   connect(d->AddButton, SIGNAL(clicked()),
     this, SLOT(addNode()));
   connect(d->RemoveButton, SIGNAL(clicked()),
@@ -156,6 +160,8 @@ void ctkDICOMServerNodeWidget::saveSettings()
     settings.setValue(QString("ServerNodes/%1").arg(row), QVariant(node));
     }
   settings.setValue("CallingAETitle", d->CallingAETitle->text());
+  settings.setValue("StorageAETitle", d->StorageAETitle->text());
+  settings.setValue("StoragePort", d->StoragePort->text());
   settings.sync();
 }
 
@@ -170,6 +176,8 @@ void ctkDICOMServerNodeWidget::readSettings()
   if (settings.status() == QSettings::AccessError ||
       settings.value("ServerNodeCount").toInt() == 0)
     {
+    d->StorageAETitle->setText("CTKSTORE");
+    d->StoragePort->setText("11112");
     d->CallingAETitle->setText("FINDSCU");
     d->NodeTable->setRowCount(1);
     d->NodeTable->setItem(0, NameColumn, new QTableWidgetItem("ExampleHost"));
@@ -180,6 +188,8 @@ void ctkDICOMServerNodeWidget::readSettings()
     return;
     }
 
+  d->StorageAETitle->setText(settings.value("StorageAETitle").toString());
+  d->StoragePort->setText(settings.value("StoragePort").toString());
   d->CallingAETitle->setText(settings.value("CallingAETitle").toString());
   const int count = settings.value("ServerNodeCount").toInt();
   d->NodeTable->setRowCount(count);