creaContours_lib
interfConfigurationPanel Class Reference

#include <interfToolsPanels.h>

Inheritance diagram for interfConfigurationPanel:
Collaboration diagram for interfConfigurationPanel:

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 34 of file interfToolsPanels.h.

Constructor & Destructor Documentation

interfConfigurationPanel::interfConfigurationPanel ( wxWindow *  parent)

Definition at line 29 of file interfToolsPanels.cxx.

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

30 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
31 {
32 // wxPanel *panel = new wxPanel(parent,-1,wxDefaultPosition, wxDefaultSize,wxNO_BORDER, wxString(_T("")));
33  _withOfContourLine = new wxSlider(this, -1, 1 , 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
34 
35  double range[2];
37  //this->_theViewPanel->getSceneManager()->GetImageDataRange(range);
38 
39  //wxVtk2DBaseView *wxvtk2dbaseview = (wxVtk2DBaseView*)this->_theViewPanel->getWxVtkBaseView();
40  //vtkImageViewer2 *imageviewer = wxvtk2dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();
41  //int colorwindow = (int)imageviewer->GetWindowLevel()->GetLevel();
42  //int windowlevel = (int)imageviewer->GetWindowLevel()->GetWindow();
43 
44  int colorwindow = interfMainPanel::getInstance()->getColorWindow();
45  int windowlevel = interfMainPanel::getInstance()->getWindowLevel();
46 
47  int min = (int)floor (range[0]);
48  int max = (int)ceil (range[1]);
49 
50 
51  _brithtnessWindowLevel = new wxSlider(this, -1, windowlevel , min, max, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
52  _brithtnessColorLevel = new wxSlider(this, -1, colorwindow , min, max, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
53 
54  _interpolationCheckBox = new wxCheckBox(this, -1, _T("Image interpolation") );
55  _interpolationCheckBox->SetValue(true);
56 
57  Connect( _withOfContourLine->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction) &interfConfigurationPanel::onWidthOfContour);
58  Connect( _withOfContourLine->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction) &interfConfigurationPanel::onWidthOfContour);
59 
60  Connect( _brithtnessWindowLevel->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
61  Connect( _brithtnessWindowLevel->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
62  Connect( _brithtnessColorLevel->GetId() , wxEVT_SCROLL_CHANGED, (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
63  Connect( _brithtnessColorLevel->GetId() , wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
64  Connect( _interpolationCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &interfConfigurationPanel::OnInterpolation);
65 
66  wxFlexGridSizer * sizer = new wxFlexGridSizer(1);
67  sizer -> Add( new wxStaticText(this,-1, _T("Contour width")) , 1, wxGROW );
68  sizer -> Add( _withOfContourLine , 1, wxGROW );
69  sizer -> Add( new wxStaticText(this,-1, _T(" ")) , 1, wxGROW );
70  sizer -> Add( new wxStaticText(this,-1, _T(" ")) , 1, wxGROW );
71  sizer -> Add( new wxStaticText(this,-1, _T("Brightness of the image")) , 1, wxGROW );
72  sizer -> Add( new wxStaticText(this,-1, _T("--Window level--")) , 1, wxGROW );
73  sizer -> Add( _brithtnessWindowLevel , 1, wxGROW );
74  sizer -> Add( new wxStaticText(this,-1, _T("--Color level--")) , 1, wxGROW );
75  sizer -> Add( _brithtnessColorLevel, 1, wxGROW );
76  sizer -> Add( new wxStaticText(this,-1, _T(" ")) , 1, wxGROW );
77  sizer -> Add( new wxStaticText(this,-1, _T(" ")) , 1, wxGROW );
78  sizer -> Add( _interpolationCheckBox , 1, wxGROW );
79 
80  this->SetSizer( sizer );
81  //JCP 13-10-08
82  //panel->SetSize( sizepanel );
83  //13-10-08
84  this->SetAutoLayout( true );
85  this->Layout();
86 
87 }

Here is the call graph for this function:

interfConfigurationPanel::~interfConfigurationPanel ( )

Definition at line 90 of file interfToolsPanels.cxx.

91 {
92 }

Member Function Documentation

void interfConfigurationPanel::onBrigthnessColorWindowLevel ( wxScrollEvent &  event)
private

Definition at line 100 of file interfToolsPanels.cxx.

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

Referenced by interfConfigurationPanel().

100  {
101  int colorwindow = _brithtnessColorLevel->GetValue();
102  int windowlevel = _brithtnessWindowLevel->GetValue();
103 
104  interfMainPanel::getInstance()->onBrigthnessColorWindowLevel(colorwindow, windowlevel);
105 
106 }

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 108 of file interfToolsPanels.cxx.

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

Referenced by interfConfigurationPanel().

109 {
110 
112 
113 
114 }

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 94 of file interfToolsPanels.cxx.

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

Referenced by interfConfigurationPanel().

94  {
95 
96  double width = (double)_withOfContourLine->GetValue() / 2.0;
98 }

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

wxSlider* interfConfigurationPanel::_brithtnessColorLevel
private

Definition at line 54 of file interfToolsPanels.h.

Referenced by interfConfigurationPanel(), and onBrigthnessColorWindowLevel().

wxSlider* interfConfigurationPanel::_brithtnessWindowLevel
private

Definition at line 53 of file interfToolsPanels.h.

Referenced by interfConfigurationPanel(), and onBrigthnessColorWindowLevel().

wxCheckBox* interfConfigurationPanel::_interpolationCheckBox
private

Definition at line 55 of file interfToolsPanels.h.

Referenced by interfConfigurationPanel(), and OnInterpolation().

wxSlider* interfConfigurationPanel::_withOfContourLine
private

Definition at line 52 of file interfToolsPanels.h.

Referenced by interfConfigurationPanel(), and onWidthOfContour().


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