19 #include <ctkXnatExperiment.h>
38 void QmitkXnatExperimentWidget::Init()
43 if (m_Mode == Mode::INFO)
49 if (m_Mode == Mode::CREATE)
55 QStringList xsiTypeList;
56 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_CR_SESSION;
57 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_CT_SESSION;
58 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_DX_SESSION;
59 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_DX3DCRANIOFACIAL_SESSION;
60 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_ECG_SESSION;
61 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_EEG_SESSION;
62 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_EPS_SESSION;
63 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_ES_SESSION;
64 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_ESV_SESSION;
65 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_GM_SESSION;
66 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_GMV_SESSION;
67 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_HD_SESSION;
68 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_IO_SESSION;
69 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_MEG_SESSION;
70 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_MG_SESSION;
71 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_MR_SESSION;
72 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_OP_SESSION;
73 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_OPT_SESSION;
74 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_OTHER_DICOM_SESSION;
75 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_PET_SESSION;
76 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_RF_SESSION;
77 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_RT_SESSION;
78 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_SM_SESSION;
79 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_US_SESSION;
80 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_XA_SESSION;
81 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_XA3D_SESSION;
82 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_XC_SESSION;
83 xsiTypeList << ctkXnatDefaultSchemaTypes::XSI_XCV_SESSION;
86 QCompleter *completer =
new QCompleter(xsiTypeList,
this);
87 m_Controls.modalityLineEdit->setCompleter(completer);
88 m_Controls.modalityLineEdit->setPlaceholderText(
"Start with \"xnat::\"");
94 m_Experiment = experiment;
97 if (m_Experiment->parent())
99 m_Controls.breadcrumbLabel->setText(
"Project:" + m_Experiment->parent()->parent()->property(
"name") +
100 " > Subject:" + m_Experiment->parent()->property(
"label"));
102 m_Controls.labelLineEdit->setText(m_Experiment->property(
"label"));
103 m_Controls.modalityLineEdit->setText(m_Experiment->property(
"modality"));
104 m_Controls.dateLineEdit->setText(m_Experiment->property(
"date"));
105 m_Controls.timeLineEdit->setText(m_Experiment->property(
"time"));
106 m_Controls.scannerLineEdit->setText(m_Experiment->property(
"scanner"));
111 if (m_Mode == Mode::CREATE)
113 if (!
m_Controls.labelLineEdit->text().isEmpty())
115 m_Experiment->setProperty(
"label",
m_Controls.labelLineEdit->text());
117 if (!
m_Controls.modalityLineEdit->text().isEmpty())
119 m_Experiment->setProperty(
"xsiType",
m_Controls.modalityLineEdit->text());
121 if (!
m_Controls.dateLineEdit->text().isEmpty())
123 m_Experiment->setProperty(
"date",
m_Controls.dateLineEdit->text());
125 if (!
m_Controls.timeLineEdit->text().isEmpty())
127 m_Experiment->setProperty(
"time",
m_Controls.dateLineEdit->text());
129 if (!
m_Controls.scannerLineEdit->text().isEmpty())
131 m_Experiment->setProperty(
"scanner",
m_Controls.scannerLineEdit->text());