36 #include <QFileDialog>
37 #include <QPushButton>
38 #include <QVBoxLayout>
43 #include <vtkImageData.h>
58 mPatientModelService(patientModelService)
60 this->setAttribute(Qt::WA_DeleteOnClose);
62 QVBoxLayout* layout =
new QVBoxLayout(
this);
63 this->setWindowTitle(
"Export Patient Data");
65 mNiftiFormatCheckBox =
new QCheckBox(
"Use RAS NIfTI-1/ITK-Snap axis definition",
this);
66 mNiftiFormatCheckBox->setToolTip(
""
67 "Use RAS (X=Left->Right Y=Posterior->Anterior Z=Inferior->Superior), as in ITK-Snap.\n"
68 "This is different from LPS (DICOM).");
69 mNiftiFormatCheckBox->setChecked(
true);
70 mNiftiFormatCheckBox->setEnabled(
true);
72 layout->addWidget(mNiftiFormatCheckBox);
74 QHBoxLayout* buttons =
new QHBoxLayout;
75 layout->addLayout(buttons);
76 mOkButton =
new QPushButton(
"OK",
this);
77 buttons->addStretch();
78 buttons->addWidget(mOkButton);
79 connect(mOkButton, SIGNAL(clicked()),
this, SLOT(accept()));
80 connect(
this, SIGNAL(accepted()),
this, SLOT(acceptedSlot()));
81 mOkButton->setDefault(
true);
82 mOkButton->setFocus();
91 PATIENT_COORDINATE_SYSTEM ExportDataDialog::getExternalSpace()
93 return mNiftiFormatCheckBox->isChecked() ?
pcsRAS :
pcsLPS;
96 void ExportDataDialog::acceptedSlot()
98 mPatientModelService->exportPatient(this->getExternalSpace());
pcsRAS
Right-Anterior-Superior, used by Slicer3D, ITK-Snap, nifti.
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
virtual ~ExportDataDialog()
pcsLPS
Left-Posterior-Superior, used internally by CustusX, also DICOM, ITK.
ExportDataDialog(PatientModelServicePtr patientModelService, QWidget *parent=NULL)