interfConfigurationPanel Class Reference

#include <interfToolsPanels.h>

List of all members.

Public Member Functions

 interfConfigurationPanel (wxWindow *parent)
 ~interfConfigurationPanel ()

Private Member Functions

void onWidthOfContour (wxScrollEvent &event)
void onBrigthnessColorWindowLevel (wxScrollEvent &event)
void OnInterpolation (wxCommandEvent &event)

Private Attributes

wxSlider * _withOfContourLine
wxSlider * _brithtnessWindowLevel
wxSlider * _brithtnessColorLevel
wxCheckBox * _interpolationCheckBox


Detailed Description

Definition at line 9 of file interfToolsPanels.h.


Constructor & Destructor Documentation

interfConfigurationPanel::interfConfigurationPanel ( wxWindow *  parent  ) 

Definition at line 4 of file interfToolsPanels.cxx.

References _brithtnessColorLevel, _brithtnessWindowLevel, _interpolationCheckBox, _withOfContourLine, interfMainPanel::getColorWindow(), interfMainPanel::getImageRange(), interfMainPanel::getInstance(), interfMainPanel::getWindowLevel(), onBrigthnessColorWindowLevel(), OnInterpolation(), and onWidthOfContour().

00005 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
00006 {
00007 //      wxPanel *panel                                                  = new wxPanel(parent,-1,wxDefaultPosition, wxDefaultSize,wxNO_BORDER, wxString(_T("")));
00008         _withOfContourLine                                              = new wxSlider(this, -1, 1 , 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
00009 
00010         double range[2];
00011         interfMainPanel::getInstance()->getImageRange(range);
00012         //this->_theViewPanel->getSceneManager()->GetImageDataRange(range);
00013 
00014         //wxVtk2DBaseView *wxvtk2dbaseview = (wxVtk2DBaseView*)this->_theViewPanel->getWxVtkBaseView();
00015         //vtkImageViewer2 *imageviewer = wxvtk2dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();
00016         //int colorwindow = (int)imageviewer->GetWindowLevel()->GetLevel();
00017         //int windowlevel = (int)imageviewer->GetWindowLevel()->GetWindow();
00018 
00019         int colorwindow = interfMainPanel::getInstance()->getColorWindow();
00020         int windowlevel = interfMainPanel::getInstance()->getWindowLevel();
00021 
00022         int min = (int)floor (range[0]);
00023         int max = (int)ceil (range[1]);
00024 
00025 
00026         _brithtnessWindowLevel                                  = new wxSlider(this, -1, windowlevel , min, max, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
00027         _brithtnessColorLevel                                   = new wxSlider(this, -1, colorwindow , min, max, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
00028 
00029         _interpolationCheckBox = new wxCheckBox(this, -1, _T("Image interpolation") );
00030         _interpolationCheckBox->SetValue(true);
00031 
00032         Connect( _withOfContourLine->GetId(),     wxEVT_SCROLL_CHANGED,           (wxObjectEventFunction) &interfConfigurationPanel::onWidthOfContour);
00033         Connect( _withOfContourLine->GetId(),     wxEVT_SCROLL_THUMBTRACK,        (wxObjectEventFunction) &interfConfigurationPanel::onWidthOfContour);
00034 
00035         Connect( _brithtnessWindowLevel->GetId(), wxEVT_SCROLL_CHANGED,           (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
00036         Connect( _brithtnessWindowLevel->GetId(), wxEVT_SCROLL_THUMBTRACK,        (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
00037         Connect( _brithtnessColorLevel->GetId() , wxEVT_SCROLL_CHANGED,           (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
00038         Connect( _brithtnessColorLevel->GetId() , wxEVT_SCROLL_THUMBTRACK,        (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
00039         Connect( _interpolationCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &interfConfigurationPanel::OnInterpolation);
00040 
00041         wxFlexGridSizer * sizer                                 = new wxFlexGridSizer(1);
00042         sizer -> Add( new wxStaticText(this,-1, _T("Contour width"))  , 1, wxGROW );
00043         sizer -> Add( _withOfContourLine                , 1, wxGROW );
00044         sizer -> Add( new wxStaticText(this,-1, _T(" "))  , 1, wxGROW );
00045         sizer -> Add( new wxStaticText(this,-1, _T(" "))  , 1, wxGROW );
00046         sizer -> Add( new wxStaticText(this,-1, _T("Brightness of the image"))  , 1, wxGROW );
00047         sizer -> Add( new wxStaticText(this,-1, _T("--Window level--"))  , 1, wxGROW );
00048         sizer -> Add( _brithtnessWindowLevel            , 1, wxGROW );
00049         sizer -> Add( new wxStaticText(this,-1, _T("--Color level--"))  , 1, wxGROW );
00050         sizer -> Add( _brithtnessColorLevel, 1, wxGROW );
00051         sizer -> Add( new wxStaticText(this,-1, _T(" "))  , 1, wxGROW );
00052         sizer -> Add( new wxStaticText(this,-1, _T(" "))  , 1, wxGROW );
00053         sizer -> Add( _interpolationCheckBox            , 1, wxGROW );
00054 
00055         this->SetSizer( sizer );
00056         //JCP 13-10-08
00057         //panel->SetSize( sizepanel );
00058         //13-10-08
00059         this->SetAutoLayout( true );
00060         this->Layout();
00061 
00062 }

Here is the call graph for this function:

interfConfigurationPanel::~interfConfigurationPanel (  ) 

Definition at line 65 of file interfToolsPanels.cxx.

00066 {
00067 }


Member Function Documentation

void interfConfigurationPanel::onBrigthnessColorWindowLevel ( wxScrollEvent &  event  )  [private]

Definition at line 75 of file interfToolsPanels.cxx.

References _brithtnessColorLevel, _brithtnessWindowLevel, interfMainPanel::getInstance(), and interfMainPanel::onBrigthnessColorWindowLevel().

Referenced by interfConfigurationPanel().

00075                                                                                {
00076         int colorwindow                         = _brithtnessColorLevel->GetValue();
00077         int windowlevel                         = _brithtnessWindowLevel->GetValue();
00078 
00079         interfMainPanel::getInstance()->onBrigthnessColorWindowLevel(colorwindow, windowlevel);
00080 
00081 }

Here is the call graph for this function:

Here is the caller graph for this function:

void interfConfigurationPanel::OnInterpolation ( wxCommandEvent &  event  )  [private]

Definition at line 83 of file interfToolsPanels.cxx.

References _interpolationCheckBox, interfMainPanel::getInstance(), and interfMainPanel::onInterpolation().

Referenced by interfConfigurationPanel().

00084 {
00085 
00086         interfMainPanel::getInstance()->onInterpolation(_interpolationCheckBox->GetValue());
00087 
00088 
00089 }

Here is the call graph for this function:

Here is the caller graph for this function:

void interfConfigurationPanel::onWidthOfContour ( wxScrollEvent &  event  )  [private]

Definition at line 69 of file interfToolsPanels.cxx.

References _withOfContourLine, interfMainPanel::getInstance(), and interfMainPanel::onWidthOfContour().

Referenced by interfConfigurationPanel().

00069                                                                    {
00070 
00071     double width = (double)_withOfContourLine->GetValue() / 2.0;
00072         interfMainPanel::getInstance()->onWidthOfContour(width);
00073 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 29 of file interfToolsPanels.h.

Referenced by interfConfigurationPanel(), and onBrigthnessColorWindowLevel().

Definition at line 28 of file interfToolsPanels.h.

Referenced by interfConfigurationPanel(), and onBrigthnessColorWindowLevel().

Definition at line 30 of file interfToolsPanels.h.

Referenced by interfConfigurationPanel(), and OnInterpolation().

Definition at line 27 of file interfToolsPanels.h.

Referenced by interfConfigurationPanel(), and onWidthOfContour().


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

Generated on Wed Jun 27 23:28:33 2012 for creaContours_lib by  doxygen 1.5.7.1