7 #include "fwDicomIOFilterQt/splitter/TagValueConfigurableSplitter.hpp" 8 #include "fwDicomIOFilterQt/widget/QTagSelectorWidget.hpp" 10 #include <fwDicomIOFilter/registry/macros.hpp> 12 #include <QApplication> 14 #include <QDialogButtonBox> 15 #include <QPushButton> 16 #include <QVBoxLayout> 19 #include <dcmtk/dcmdata/dcdeftag.h> 30 "Split instances using a tag value.";
78 QDialog* dialog =
new QDialog(qApp->activeWindow());
79 dialog->setWindowTitle(QString(
"Configure"));
80 QVBoxLayout* mainLayout =
new QVBoxLayout();
81 dialog->setLayout(mainLayout);
82 dialog->setMinimumWidth(500);
86 new ::fwDicomIOFilterQt::widget::QTagSelectorWidget();
88 mainLayout->addWidget(tagSelector);
91 QDialogButtonBox* buttonBox =
new QDialogButtonBox(dialog);
92 mainLayout->addWidget(buttonBox);
93 QPushButton* okButton = buttonBox->addButton(QDialogButtonBox::Ok);
94 QPushButton* cancelButton = buttonBox->addButton(QDialogButtonBox::Cancel);
96 QObject::connect(okButton, SIGNAL(clicked(
void)), dialog, SLOT(accept(
void)));
97 QObject::connect(cancelButton, SIGNAL(clicked(
void)), dialog, SLOT(reject(
void)));
100 int result = dialog->exec();
101 if(result == QDialog::Accepted)
virtual FWDICOMIOFILTERQT_API void configureWithGUI() override
Configure the filter using GUI dialog.
Filter that uses a tag to split the instances.
fwDicomIOFilter contains filters used to pre-process images before reading.
virtual FWDICOMIOFILTERQT_API bool isConfigurationRequired() const override
Return true if a configuration is required.
virtual FWDICOMIOFILTERQT_API std::string getDescription() const override
Return the description of the filter.
virtual FWDICOMIOFILTERQT_API std::string getName() const override
Return the name of the filter.
virtual FWDICOMIOFILTERQT_API ~TagValueConfigurableSplitter()
Destructor.
Key class used to restrict access to Filter construction. See http://www.drdobbs.com/184402053.
static FWDICOMIOFILTERQT_API const std::string s_FILTER_NAME
Filter name.
virtual FWDICOMIOFILTERQT_API bool isConfigurableWithGUI() const override
Return true if the filter is configurable using GUI.
FWDICOMIOFILTERQT_API TagValueConfigurableSplitter(::fwDicomIOFilter::IFilter::Key key)
Constructor.
DcmTagKey m_tag
Tag used to sort instances.
fwDicomIOFilterQt contains filters used to pre-process images before reading.
static FWDICOMIOFILTERQT_API const std::string s_FILTER_DESCRIPTION
Filter description.