Temporary storage directory in settings.
//std::cout << "dicomSeriesSelector " << std::endl;
if (PacsConnection->exec() == QDialog::Accepted) {
- files = PacsConnection->getFileNames();
- LoadImages(files, vvImageReader::DICOM);
+ for (int i = 0; i < PacsConnection->getSeriesCount(); i++)
+ {
+ files = PacsConnection->getFileNames(i);
+ LoadImages(files, vvImageReader::DICOM);
+ }
PacsConnection->clearMove();
}
}
void vvQPacsConnection::on_importButton_clicked()
{
setCursor(QCursor(Qt::WaitCursor));
- QString path = QDir::homePath() +QString::fromStdString("/.move");
+ QString path = QString::fromStdString(getCMoveDirectory());
QDir dirpath (path);
if (dirpath.exists())
{
std::map<std::string, std::vector<std::string>* > mListOfSeriesFilenames;
+ m_fileseries.clear();
+
for (unsigned int i=0; i<seriesUID.size(); i++) {
-
- // store filenames
- std::vector<std::string> * filenames = new std::vector<std::string>;
- m_files = nameGenerator->GetFileNames(seriesUID[i]);
- /* for (unsigned int j=0; j<temp.size(); j++) {
- m_files->push_back(temp[j]);
- }*/
-
- }
+ m_fileseries.push_back( nameGenerator->GetFileNames(seriesUID[i]));
+ }
accept();
setCursor(QCursor(Qt::ArrowCursor));
-std::vector <std::string> vvQPacsConnection::getFileNames()
+std::vector <std::string> vvQPacsConnection::getFileNames(int i_series)
{
std::vector <std::string> filenames;
- gdcm::Directory::FilenamesType::iterator it = m_files.begin();
- for (;it != m_files.end(); it++)
+ gdcm::Directory::FilenamesType::iterator it = m_fileseries[i_series].begin();
+ for (;it != m_fileseries[i_series].end(); it++)
filenames.push_back(it->c_str());
return filenames;
}
~vvQPacsConnection(){}
void refreshNetworks();
- std::vector <std::string> getFileNames();
+ std::vector <std::string> getFileNames(int i_series);
+ int getSeriesCount() { return m_fileseries.size();}
void clearMove();
public slots:
vvQuery m_query;
vvQuery f_query;
gdcm::Directory::FilenamesType m_files;
+ std::vector < gdcm::Directory::FilenamesType> m_fileseries;
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();
+ if (! settings.childGroups().contains("DICOMCLIENT"))
+ {
+ settings.beginGroup(QString::fromStdString("DICOMCLIENT"));
+ settings.setValue("AETITLE",QString::fromStdString("VVDICOMSCU"));
+ settings.setValue("port",QString::number(1234));
+ settings.setValue("directory",QDir::homePath() +QString::fromStdString("/.move"));
+ settings.endGroup();
+ }
}
// get VV-AETITLE for c-move. parameters
return result;
}
+// get the directory where the dicom files will be stored during c-move action.
+std::string getCMoveDirectory()
+{
+ std::string result ="";
+ QSettings settings(getVVSettingsPath(), getSettingsOptionFormat());
+ settings.beginGroup(QString::fromStdString("DICOMCLIENT"));
+ result = settings.value("directory").toString().toStdString();
+ settings.endGroup();
+ return result;
+}
// get VV-PORT-SCU for c-move. parameters
int getDicomClientPort()
// get VV-PORT-SCU for c-move parameters.
int getDicomClientPort();
+// get the directory where the dicom files will be stored during c-move action.
+std::string getCMoveDirectory()
+
std::map <std::string,std::string > getDicomServer(QString nickname);
#endif