vvMainWindow::vvMainWindow():vvMainWindowBase()
{
setupUi(this); // this sets up the GUI
-
+ setDicomClient();
mInputPathName = "";
mMenuTools = menuTools;
// mMenuSegmentation = menuSegmentation;
gdcm::SmartPointer<gdcm::BaseRootQuery> theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, m_level ,fillMoveKeys(), true);
- bool didItWork = gdcm::CompositeNetworkFunctions::CMove(m_adress.c_str(),atoi(m_port.c_str()), theQuery, 1234,
- "VVCREATIS", m_aetitle.c_str(),"D:\\move" );
+ bool didItWork = gdcm::CompositeNetworkFunctions::CMove(m_adress.c_str(),atoi(m_port.c_str()), theQuery, getDicomClientPort(),
+ getDicomClientAETitle().c_str(), m_aetitle.c_str(),"D:\\move" );
gdcm::Directory theDir;
theDir.Load("D:\\move");
m_files = theDir.GetFilenames();
return result;
}
+// Set parameters for VV (AETITLE, port-scu) to allow c-move.
+void setDicomClient()
+{
+ QSettings settings(getVVSettingsPath(), getSettingsOptionFormat());
+ settings.beginGroup(QString::fromStdString("DICOMCLIENT"));
+ settings.setValue("AETITLE",QString::fromStdString("VVDICOMSCU"));
+ settings.setValue("port",QString::number(1234));
+ settings.endGroup();
+}
+
+// get VV-AETITLE for c-move. parameters
+std::string getDicomClientAETitle()
+{
+ std::string result ="";
+ QSettings settings(getVVSettingsPath(), getSettingsOptionFormat());
+ settings.beginGroup(QString::fromStdString("DICOMCLIENT"));
+ result = settings.value("AETITLE").toString().toStdString();
+ settings.endGroup();
+ return result;
+}
+
+
+// get VV-PORT-SCU for c-move. parameters
+int getDicomClientPort()
+{
+ int result;
+ QSettings settings(getVVSettingsPath(), getSettingsOptionFormat());
+ settings.beginGroup(QString::fromStdString("DICOMCLIENT"));
+ result = settings.value("port").toString().toInt();
+ settings.endGroup();
+ return result;
+}
+
/// Add a new Dicom Server
void AddDicomServer(std::string nickname, std::string aetitle, std::string adress, std::string port)
{
// get List of Dicom Servers
QStringList getDicomServers();
+// Set parameters for VV (AETITLE, port-scu) to allow c-move.
+void setDicomClient();
+
+// get VV-AETITLE for c-move parameters.
+std::string getDicomClientAETitle();
+
+// get VV-PORT-SCU for c-move parameters.
+int getDicomClientPort();
+
std::map <std::string,std::string > getDicomServer(QString nickname);
#endif