#include <creaImageIOWxGimmickTools.h>
Public Member Functions | |
WxGimmickTools (wxWindow *parent, wxString mCurrentDirectory) | |
~WxGimmickTools () | |
wxString | getInputDir () |
wxString | getOutputDir () |
bool | getAddToDBCheckBoxValue () |
bool | getMHDCheckBoxValue () |
Private Member Functions | |
void | onInputDir (wxCommandEvent &event) |
void | onOutputDir (wxCommandEvent &event) |
void | onAddToDatabase (wxCommandEvent &event) |
void | onMHD (wxCommandEvent &event) |
Private Attributes | |
wxCheckBox * | _addCheckBox |
wxCheckBox * | _mhdCheckBox |
wxTextCtrl * | _inputPath |
wxTextCtrl * | _outputPath |
wxString | _currentDir |
bool | _addFiles |
bool | _mhd |
Definition at line 17 of file creaImageIOWxGimmickTools.h.
creaImageIO::WxGimmickTools::WxGimmickTools | ( | wxWindow * | parent, | |
wxString | mCurrentDirectory | |||
) |
Begin of the threshold panel
Definition at line 9 of file creaImageIOWxGimmickTools.cpp.
References _addCheckBox, _addFiles, _currentDir, _inputPath, _mhd, _mhdCheckBox, _outputPath, onAddToDatabase(), onInputDir(), onMHD(), and onOutputDir().
: wxPanel(parent, -1, wxDefaultPosition, wxSize(300,250), wxBORDER_SUNKEN) { _currentDir = mCurrentDirectory; _addFiles = true; _mhd = false; _inputPath = new wxTextCtrl(this, wxID_ANY, _T(""), wxDefaultPosition, wxSize(400,30)); _outputPath = new wxTextCtrl(this, wxID_ANY, _T(""), wxDefaultPosition, wxSize(400,30)); _addCheckBox = new wxCheckBox(this, -1, _T("Add Images to Database?") ); _mhdCheckBox = new wxCheckBox(this, -1, _T("Convert to MHD?") ); _addCheckBox->SetValue(_addFiles); _mhdCheckBox->SetValue(_mhd); wxButton *inputDir = new wxButton(this, wxID_ANY,_T("Input Directory"), wxDefaultPosition, wxSize(140,30) ); wxButton *outputDir = new wxButton(this, wxID_ANY,_T("Output Directory"), wxDefaultPosition, wxSize(140,30) ); Connect( inputDir->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxGimmickTools::onInputDir ); Connect( outputDir->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxGimmickTools::onOutputDir ); Connect( _addCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &WxGimmickTools::onAddToDatabase ); Connect( _mhdCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &WxGimmickTools::onMHD ); wxFlexGridSizer *textSizer = new wxFlexGridSizer(1,2); textSizer->Add( new wxStaticText(this, -1, _T("Transform a Bruker 'Serie'/'Study'/'set of Studies' directory into Dicom / MHD format.")), 1, wxGROW ); textSizer->Add( new wxStaticText(this, -1, _T("If checkbox is selected images will be loaded into the DB.")), 1, wxGROW ); wxFlexGridSizer *sizer = new wxFlexGridSizer(2,5); sizer->Add( new wxStaticText(this, -1, _T(" ")), 1, wxGROW ); sizer->Add( new wxStaticText(this, -1, _T(" ")), 1, wxGROW ); sizer->Add( _inputPath, 1, wxGROW ); sizer->Add( inputDir, 1, wxGROW ); sizer->Add( _outputPath, 1, wxGROW ); sizer->Add( outputDir, 1, wxGROW ); sizer->Add( new wxStaticText(this, -1, _T(" ")), 1, wxGROW ); sizer->Add( new wxStaticText(this, -1, _T(" ")), 1, wxGROW ); sizer->Add( _addCheckBox, 1, wxGROW ); sizer->Add( _mhdCheckBox, 1, wxGROW ); wxFlexGridSizer *topSizer = new wxFlexGridSizer(1, 2); topSizer->Add( textSizer, 1, wxGROW ); topSizer->Add( sizer, 1, wxGROW ); this->SetSizer( topSizer ); this->SetAutoLayout( true ); this->Layout(); }
creaImageIO::WxGimmickTools::~WxGimmickTools | ( | ) |
Definition at line 55 of file creaImageIOWxGimmickTools.cpp.
{ }
bool creaImageIO::WxGimmickTools::getAddToDBCheckBoxValue | ( | ) |
Definition at line 70 of file creaImageIOWxGimmickTools.cpp.
References _addCheckBox.
{ return _addCheckBox->GetValue(); }
wxString creaImageIO::WxGimmickTools::getInputDir | ( | ) |
Definition at line 60 of file creaImageIOWxGimmickTools.cpp.
References _inputPath.
{ return _inputPath->GetValue(); }
bool creaImageIO::WxGimmickTools::getMHDCheckBoxValue | ( | ) |
Definition at line 75 of file creaImageIOWxGimmickTools.cpp.
References _mhdCheckBox.
{ return _mhdCheckBox->GetValue(); }
wxString creaImageIO::WxGimmickTools::getOutputDir | ( | ) |
Definition at line 65 of file creaImageIOWxGimmickTools.cpp.
References _outputPath.
{ return _outputPath->GetValue(); }
void creaImageIO::WxGimmickTools::onAddToDatabase | ( | wxCommandEvent & | event | ) | [private] |
Definition at line 102 of file creaImageIOWxGimmickTools.cpp.
References _addCheckBox, and _addFiles.
Referenced by WxGimmickTools().
{ _addFiles = _addCheckBox->GetValue(); }
void creaImageIO::WxGimmickTools::onInputDir | ( | wxCommandEvent & | event | ) | [private] |
Definition at line 80 of file creaImageIOWxGimmickTools.cpp.
References _currentDir, and _inputPath.
Referenced by WxGimmickTools().
{ long style = wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST; wxDirDialog* FD = new wxDirDialog( 0, _T("Select the Input Directory"), _currentDir, style); if (FD->ShowModal()==wxID_OK) { _inputPath->SetValue(FD->GetPath()); } }
void creaImageIO::WxGimmickTools::onMHD | ( | wxCommandEvent & | event | ) | [private] |
Definition at line 107 of file creaImageIOWxGimmickTools.cpp.
References _mhd, and _mhdCheckBox.
Referenced by WxGimmickTools().
{ _mhd = _mhdCheckBox->GetValue(); }
void creaImageIO::WxGimmickTools::onOutputDir | ( | wxCommandEvent & | event | ) | [private] |
Definition at line 91 of file creaImageIOWxGimmickTools.cpp.
References _currentDir, and _outputPath.
Referenced by WxGimmickTools().
{ long style = wxDD_DEFAULT_STYLE; wxDirDialog* FD = new wxDirDialog( 0, _T("Select the Output Directory"), _currentDir, style); if (FD->ShowModal()==wxID_OK) { _outputPath->SetValue(FD->GetPath()); } }
wxCheckBox* creaImageIO::WxGimmickTools::_addCheckBox [private] |
Definition at line 28 of file creaImageIOWxGimmickTools.h.
Referenced by getAddToDBCheckBoxValue(), onAddToDatabase(), and WxGimmickTools().
bool creaImageIO::WxGimmickTools::_addFiles [private] |
Definition at line 33 of file creaImageIOWxGimmickTools.h.
Referenced by onAddToDatabase(), and WxGimmickTools().
wxString creaImageIO::WxGimmickTools::_currentDir [private] |
Definition at line 32 of file creaImageIOWxGimmickTools.h.
Referenced by onInputDir(), onOutputDir(), and WxGimmickTools().
wxTextCtrl* creaImageIO::WxGimmickTools::_inputPath [private] |
Definition at line 30 of file creaImageIOWxGimmickTools.h.
Referenced by getInputDir(), onInputDir(), and WxGimmickTools().
bool creaImageIO::WxGimmickTools::_mhd [private] |
Definition at line 34 of file creaImageIOWxGimmickTools.h.
Referenced by onMHD(), and WxGimmickTools().
wxCheckBox* creaImageIO::WxGimmickTools::_mhdCheckBox [private] |
Definition at line 29 of file creaImageIOWxGimmickTools.h.
Referenced by getMHDCheckBoxValue(), onMHD(), and WxGimmickTools().
wxTextCtrl* creaImageIO::WxGimmickTools::_outputPath [private] |
Definition at line 31 of file creaImageIOWxGimmickTools.h.
Referenced by getOutputDir(), onOutputDir(), and WxGimmickTools().