creaImageIO_lib
creaImageIO::WxGimmickTools Class Reference

#include <creaImageIOWxGimmickTools.h>

Inheritance diagram for creaImageIO::WxGimmickTools:
Collaboration diagram for creaImageIO::WxGimmickTools:

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
 

Detailed Description

Definition at line 45 of file creaImageIOWxGimmickTools.h.

Constructor & Destructor Documentation

creaImageIO::WxGimmickTools::WxGimmickTools ( wxWindow *  parent,
wxString  mCurrentDirectory 
)

Begin of the threshold panel

Definition at line 37 of file creaImageIOWxGimmickTools.cpp.

References _addCheckBox, _addFiles, _currentDir, _inputPath, _mhd, _mhdCheckBox, _outputPath, onAddToDatabase(), onInputDir(), onMHD(), and onOutputDir().

38  : wxPanel(parent, -1, wxDefaultPosition, wxSize(300,250), wxBORDER_SUNKEN)
39  {
40  _currentDir = mCurrentDirectory;
41  _addFiles = true;
42  _mhd = false;
43 
44  _inputPath = new wxTextCtrl(this, wxID_ANY, _T(""), wxDefaultPosition, wxSize(400,30));
45  _outputPath = new wxTextCtrl(this, wxID_ANY, _T(""), wxDefaultPosition, wxSize(400,30));
46  _addCheckBox = new wxCheckBox(this, -1, _T("Add Images to Database?") );
47  _mhdCheckBox = new wxCheckBox(this, -1, _T("Convert to MHD?") );
48  _addCheckBox->SetValue(_addFiles);
49  _mhdCheckBox->SetValue(_mhd);
50 
51  wxButton *inputDir = new wxButton(this, wxID_ANY,_T("Input Directory"), wxDefaultPosition, wxSize(140,30) );
52  wxButton *outputDir = new wxButton(this, wxID_ANY,_T("Output Directory"), wxDefaultPosition, wxSize(140,30) );
53 
54  Connect( inputDir->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxGimmickTools::onInputDir );
55  Connect( outputDir->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxGimmickTools::onOutputDir );
56  Connect( _addCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &WxGimmickTools::onAddToDatabase );
57  Connect( _mhdCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &WxGimmickTools::onMHD );
58 
59  wxFlexGridSizer *textSizer = new wxFlexGridSizer(1,2);
60  textSizer->Add( new wxStaticText(this, -1, _T("Transform a Bruker 'Serie'/'Study'/'set of Studies' directory into Dicom / MHD format.")), 1, wxGROW );
61  textSizer->Add( new wxStaticText(this, -1, _T("If checkbox is selected images will be loaded into the DB.")), 1, wxGROW );
62 
63  wxFlexGridSizer *sizer = new wxFlexGridSizer(2,5);
64  sizer->Add( new wxStaticText(this, -1, _T(" ")), 1, wxGROW );
65  sizer->Add( new wxStaticText(this, -1, _T(" ")), 1, wxGROW );
66  sizer->Add( _inputPath, 1, wxGROW );
67  sizer->Add( inputDir, 1, wxGROW );
68  sizer->Add( _outputPath, 1, wxGROW );
69  sizer->Add( outputDir, 1, wxGROW );
70  sizer->Add( new wxStaticText(this, -1, _T(" ")), 1, wxGROW );
71  sizer->Add( new wxStaticText(this, -1, _T(" ")), 1, wxGROW );
72  sizer->Add( _addCheckBox, 1, wxGROW );
73  sizer->Add( _mhdCheckBox, 1, wxGROW );
74 
75  wxFlexGridSizer *topSizer = new wxFlexGridSizer(1, 2);
76  topSizer->Add( textSizer, 1, wxGROW );
77  topSizer->Add( sizer, 1, wxGROW );
78  this->SetSizer( topSizer );
79  this->SetAutoLayout( true );
80  this->Layout();
81  }

Here is the call graph for this function:

creaImageIO::WxGimmickTools::~WxGimmickTools ( )

Definition at line 83 of file creaImageIOWxGimmickTools.cpp.

84  {
85 
86  }

Member Function Documentation

bool creaImageIO::WxGimmickTools::getAddToDBCheckBoxValue ( )

Definition at line 98 of file creaImageIOWxGimmickTools.cpp.

References _addCheckBox.

Referenced by creaImageIO::WxGimmickView::OnTools().

99  {
100  return _addCheckBox->GetValue();
101  }

Here is the caller graph for this function:

wxString creaImageIO::WxGimmickTools::getInputDir ( )

Definition at line 88 of file creaImageIOWxGimmickTools.cpp.

References _inputPath.

Referenced by creaImageIO::WxGimmickView::OnTools().

89  {
90  return _inputPath->GetValue();
91  }

Here is the caller graph for this function:

bool creaImageIO::WxGimmickTools::getMHDCheckBoxValue ( )

Definition at line 103 of file creaImageIOWxGimmickTools.cpp.

References _mhdCheckBox.

104  {
105  return _mhdCheckBox->GetValue();
106  }
wxString creaImageIO::WxGimmickTools::getOutputDir ( )

Definition at line 93 of file creaImageIOWxGimmickTools.cpp.

References _outputPath.

Referenced by creaImageIO::WxGimmickView::OnTools().

94  {
95  return _outputPath->GetValue();
96  }

Here is the caller graph for this function:

void creaImageIO::WxGimmickTools::onAddToDatabase ( wxCommandEvent &  event)
private

Definition at line 130 of file creaImageIOWxGimmickTools.cpp.

References _addCheckBox, and _addFiles.

Referenced by WxGimmickTools().

131  {
132  _addFiles = _addCheckBox->GetValue();
133  }

Here is the caller graph for this function:

void creaImageIO::WxGimmickTools::onInputDir ( wxCommandEvent &  event)
private

Definition at line 108 of file creaImageIOWxGimmickTools.cpp.

References _currentDir, and _inputPath.

Referenced by WxGimmickTools().

109  {
110  long style = wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST;
111  wxDirDialog* FD = new wxDirDialog( 0, _T("Select the Input Directory"), _currentDir, style);
112 
113  if (FD->ShowModal()==wxID_OK)
114  {
115  _inputPath->SetValue(FD->GetPath());
116  }
117  }

Here is the caller graph for this function:

void creaImageIO::WxGimmickTools::onMHD ( wxCommandEvent &  event)
private

Definition at line 135 of file creaImageIOWxGimmickTools.cpp.

References _mhd, and _mhdCheckBox.

Referenced by WxGimmickTools().

136  {
137  _mhd = _mhdCheckBox->GetValue();
138  }

Here is the caller graph for this function:

void creaImageIO::WxGimmickTools::onOutputDir ( wxCommandEvent &  event)
private

Definition at line 119 of file creaImageIOWxGimmickTools.cpp.

References _currentDir, and _outputPath.

Referenced by WxGimmickTools().

120  {
121  long style = wxDD_DEFAULT_STYLE;
122  wxDirDialog* FD = new wxDirDialog( 0, _T("Select the Output Directory"), _currentDir, style);
123 
124  if (FD->ShowModal()==wxID_OK)
125  {
126  _outputPath->SetValue(FD->GetPath());
127  }
128  }

Here is the caller graph for this function:

Member Data Documentation

wxCheckBox* creaImageIO::WxGimmickTools::_addCheckBox
private
bool creaImageIO::WxGimmickTools::_addFiles
private

Definition at line 61 of file creaImageIOWxGimmickTools.h.

Referenced by onAddToDatabase(), and WxGimmickTools().

wxString creaImageIO::WxGimmickTools::_currentDir
private

Definition at line 60 of file creaImageIOWxGimmickTools.h.

Referenced by onInputDir(), onOutputDir(), and WxGimmickTools().

wxTextCtrl* creaImageIO::WxGimmickTools::_inputPath
private

Definition at line 58 of file creaImageIOWxGimmickTools.h.

Referenced by getInputDir(), onInputDir(), and WxGimmickTools().

bool creaImageIO::WxGimmickTools::_mhd
private

Definition at line 62 of file creaImageIOWxGimmickTools.h.

Referenced by onMHD(), and WxGimmickTools().

wxCheckBox* creaImageIO::WxGimmickTools::_mhdCheckBox
private

Definition at line 57 of file creaImageIOWxGimmickTools.h.

Referenced by getMHDCheckBoxValue(), onMHD(), and WxGimmickTools().

wxTextCtrl* creaImageIO::WxGimmickTools::_outputPath
private

Definition at line 59 of file creaImageIOWxGimmickTools.h.

Referenced by getOutputDir(), onOutputDir(), and WxGimmickTools().


The documentation for this class was generated from the following files: