2 #include "ui_cctwqtsetupimportdialog.h"
15 setAttribute(Qt::WA_DeleteOnClose);
17 connect(
ui->m_AppendImages, SIGNAL(clicked()),
this, SLOT(
doAppendImages()));
18 connect(
ui->m_ClearImages, SIGNAL(clicked()),
this, SLOT(
doClearImages()));
20 connect(
ui->m_MatchImages, SIGNAL(clicked()),
this, SLOT(
doMatchImages()));
21 connect(
ui->m_DarkImageBrowse, SIGNAL(clicked()),
this, SLOT(
doBrowseDark()));
22 connect(
ui->m_ClearDark, SIGNAL(clicked()),
this, SLOT(
doClearDark()));
23 connect(
ui->m_OutputFileBrowse, SIGNAL(clicked()),
this, SLOT(
doBrowseOutput()));
26 ui->m_DarkImagePath->setText(
m_Data->get_DarkImagePath());
28 ui->m_DataImages->addItems(
m_Data->get_ImagePaths());
29 ui->m_DataPattern->setText(
m_Data->get_ImagePattern());
30 ui->m_OutputPath->setText(
m_Data->get_OutputPath());
31 ui->m_OutputDataset->setText(
m_Data->get_OutputDataset());
33 ui->m_InputImageBuffering->setValue(
m_Data->get_InputDataBuffering());
34 ui->m_OutputChunkX->setValue(
m_Data->get_ChunkSize().x());
35 ui->m_OutputChunkY->setValue(
m_Data->get_ChunkSize().y());
36 ui->m_OutputChunkZ->setValue(
m_Data->get_ChunkSize().z());
37 ui->m_OutputCompression->setValue(
m_Data->get_Compression());
49 m_Data->set_DarkImagePath(
ui->m_DarkImagePath->text());
54 int ct =
ui->m_DataImages->count();
56 for (
int i=0; i<ct; i++) {
57 QListWidgetItem *item =
ui->m_DataImages->item(i);
60 res.append(item->text());
64 m_Data->set_ImagePaths(res);
65 m_Data->set_ImagePattern(
ui->m_DataPattern->text());
66 m_Data->set_OutputPath(
ui->m_OutputPath->text());
67 m_Data->set_OutputDataset(
ui->m_OutputDataset->text());
69 m_Data->set_InputDataBuffering(
ui->m_InputImageBuffering->value());
71 ui->m_OutputChunkY->value(),
72 ui->m_OutputChunkZ->value()));
74 m_Data->set_Compression(
ui->m_OutputCompression->value());
82 QStringList paths = QFileDialog::getOpenFileNames(
this,
"Additional images...",
85 ui->m_DataImages->addItems(paths);
90 ui->m_DataImages->clear();
95 QString path = QFileDialog::getExistingDirectory(
this,
"Image Directory",
98 if (path.length() > 0) {
105 QString path = QFileDialog::getOpenFileName(
this,
"Dark Image",
106 ui->m_DarkImagePath->text());
108 if (path.length() > 0) {
109 ui->m_DarkImagePath->setText(path);
115 ui->m_DarkImagePath->setText(
"");
120 QString path = QFileDialog::getSaveFileName(
this,
"Output File",
121 ui->m_OutputPath->text());
123 if (path.length() > 0) {
124 ui->m_OutputPath->setText(path);
130 QString patt =
ui->m_DataPattern->text();
133 d.setFilter(QDir::Files);
135 QStringList patts(patt);
136 d.setNameFilters(patts);
138 QStringList newFiles = d.entryList();
140 ui->m_DataImages->addItems(newFiles);
145 return ui->m_DataDirectory->currentText();
152 if (dir.length() > 0) {
154 QString p1 = d.absolutePath();
157 QString p = d.absolutePath();
159 if ((p.length() > 0) && (p != p1)) {
164 ui->m_DataDirectory->addItem(p1);
173 ui->m_DataDirectory->clear();
180 ui->m_DataDirectory->setCurrentIndex(
ui->m_DataDirectory->count()-1);
void appendDirectoryPaths(QString dir)
Ui::CctwqtSetupImportDialog * ui
void setCurrentDirectory(QString dir)
void doBrowseDirectoryChanged(int n)
CctwVector3D< int > CctwIntVector3D
QString currentDirectory()
~CctwqtSetupImportDialog()
CctwqtSetupImportDialog(CctwqtMainWindow *parent, CctwImporter *data)