Public Member Functions | Private Member Functions | Private Attributes

creaImageIO::WxGimmickTools Class Reference

#include <creaImageIOWxGimmickTools.h>

List of all members.

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 17 of file creaImageIOWxGimmickTools.h.


Constructor & Destructor Documentation

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();
        }

Here is the call graph for this function:

creaImageIO::WxGimmickTools::~WxGimmickTools (  ) 

Definition at line 55 of file creaImageIOWxGimmickTools.cpp.

        {

        }


Member Function Documentation

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();
        }

Here is the caller graph for this function:

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());
                }
        }

Here is the caller graph for this function:

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();
        }       

Here is the caller graph for this function:

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());
                }
        }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 33 of file creaImageIOWxGimmickTools.h.

Referenced by onAddToDatabase(), and WxGimmickTools().

Definition at line 32 of file creaImageIOWxGimmickTools.h.

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

Definition at line 30 of file creaImageIOWxGimmickTools.h.

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

Definition at line 34 of file creaImageIOWxGimmickTools.h.

Referenced by onMHD(), and WxGimmickTools().

Definition at line 29 of file creaImageIOWxGimmickTools.h.

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

Definition at line 31 of file creaImageIOWxGimmickTools.h.

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


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