From: donadio Date: Wed, 15 Apr 2009 09:53:49 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: EED.02Oct2009~48 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=5940ba0f3739ac136ec5ffbdb1e24518915a4664;p=creaContours.git *** empty log message *** --- diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index d21f9a5..c126f7c 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -225,6 +225,20 @@ void wxContourMainFrame::setVectImages( std::vector images ){ return configured; } + + bool wxContourMainFrame::addNewPanel(wxPanel* panel) + { + bool configured = panel!=NULL; + configured &= panel!=NULL; + + if( configured ) + { + notebook->AddPage( panel, wxT(" Viewer "), true ); + m_mgr.Update(); + } + return configured; + } + //------------------------------------------------------------------------------------------------------------ // Attributes getters and setters //------------------------------------------------------------------------------------------------------------ @@ -1705,8 +1719,6 @@ void wxContourMainFrame::onThreshold(int minVal, int maxVal) //Assign a fake color for the upper image, and set the white as transparent for(int i = range[0]; i < range[1]; i++) { - //std::cout<<"Int equal: " << i << std::endl; - if( i >= minVal && i <= maxVal ) { lookup->SetTableValue(i, 1.0, 0.0, 0.0, 1); @@ -1739,30 +1751,10 @@ void wxContourMainFrame::onThreshold(int minVal, int maxVal) viewer->GetRenderer()->AddActor( upperImageActor ); viewer->Render(); - //wxThresholdPanel * panel = new wxThresholdPanel( viewer, notebook ); - - //onThresholdPanel(panel); - RefreshInterface(); - - //baseImageActor = vtkImageActor::New( ); - //baseImageActor->SetInput( mBox->bbGetInputImage1() ); } -bool wxContourMainFrame::onThresholdPanel(wxPanel* panel) - { - bool configured = panel!=NULL; - configured &= panel!=NULL; - - if( configured ) - { - notebook->AddPage( panel, wxT(" Threshold "), true ); - m_mgr.Update(); - } - return configured; -} - void wxContourMainFrame::showAxis(bool show) { _theViewPanel->SetVisibleAxis(show); diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h index 981eb92..ffad5e3 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h @@ -27,9 +27,6 @@ //#include "wxVtkBaseView_SceneManager.h" #include "wxInstantChooserPanel.h" #include "wxContourViewPanel.h" -#include "wxThresholdPanel.h" - - //#include "ContourWorkspace.h" #include "ContourExtractData.h" @@ -139,6 +136,8 @@ class wxContourMainFrame : public wxPanel { bool configurePanels( ); + bool addNewPanel(wxPanel* panel); + wxAuiNotebook * createNotebook(); void createInstantChooserPanel(wxAuiNotebook * parent); @@ -258,11 +257,8 @@ class wxContourMainFrame : public wxPanel { //AD void onMirror(); - void onThreshold(int minVal, int maxVal); - bool onThresholdPanel(wxPanel* panel); - //==================================================================================================== void showAxis(bool show); diff --git a/lib/Interface_ManagerContour_NDimensions/wxThresholdPanel.cxx b/lib/Interface_ManagerContour_NDimensions/wxThresholdPanel.cxx deleted file mode 100644 index 9914cee..0000000 --- a/lib/Interface_ManagerContour_NDimensions/wxThresholdPanel.cxx +++ /dev/null @@ -1,40 +0,0 @@ -//---------------------------------------------------------------------------------------------------------------- -// Class definition include -//---------------------------------------------------------------------------------------------------------------- -#include "wxThresholdPanel.h" - - -//---------------------------------------------------------------------------------------------------------------- -// Other includes -//---------------------------------------------------------------------------------------------------------------- - - //------------------------------------------------------------------------------------------------------------ - // Constructors & Destructors - //------------------------------------------------------------------------------------------------------------ - - wxThresholdPanel :: wxThresholdPanel ( vtkImageViewer2 * theViewer, wxWindow *parent, const wxPoint& pos, const wxSize& size,long style, int vertStart, int vertEnd, int horzStart, int horzEnd ) - :wxPanel(parent, -1, pos, size, style) - { - //wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL); - - vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); - theViewer->SetupInteractor(iren); - - //crea::creawxVTKRenderWindowInteractor * mInteractor = new crea::creawxVTKRenderWindowInteractor(this,-1); - //mInteractor->UseCaptureMouseOn(); - //theViewer->SetupInteractor ( mInteractor ); - - //theViewer->Render(); - //theViewer->GetRenderer()->ResetCamera(); - - //topsizer-> Add( iren ,1,wxGROW ,0); - SetAutoLayout( true ); - //SetSizer( topsizer ); - Layout(); - } - - - wxThresholdPanel :: ~wxThresholdPanel() - { - - } \ No newline at end of file diff --git a/lib/Interface_ManagerContour_NDimensions/wxThresholdPanel.h b/lib/Interface_ManagerContour_NDimensions/wxThresholdPanel.h deleted file mode 100644 index 4815a25..0000000 --- a/lib/Interface_ManagerContour_NDimensions/wxThresholdPanel.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef __wxThresholdPanel_INCLUDED_H__ -#define __wxThresholdPanel_INCLUDED_H__ - - -// ----------------------------------------------------------------------------------------------------------- -// WX headers inclusion. -// For compilers that support precompilation, includes . -// ----------------------------------------------------------------------------------------------------------- - -#include -#ifdef __BORLANDC__ -#pragma hdrstop -#endif -#ifndef WX_PRECOMP -#include -#endif - - -//------------------------------------------------------------------------------------------------------------ -// Includes -//------------------------------------------------------------------------------------------------------------ - -#include "creawxVTKRenderWindowInteractor.h" -#include "vtkImageViewer2.h" -#include "vtkRenderWindowInteractor.h" - -//------------------------------------------------------------------------------------------------------------ -// Class definition -//------------------------------------------------------------------------------------------------------------ - -class wxThresholdPanel : public wxPanel -{ -public: - - //------------------------------------------------------------------------------------------------------------ - // Constructors & Destructors - //------------------------------------------------------------------------------------------------------------ - - wxThresholdPanel( vtkImageViewer2 * theViewer, wxWindow *parent, const wxPoint& pos=wxDefaultPosition, const wxSize& size = wxDefaultSize,long style= wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER, int vertStart=1, int vertEnd=1, int horzStart=1, int horzEnd=1 ); - - ~wxThresholdPanel(); - - //------------------------------------------------------------------------------------------------------------ - // Creational and initialization methods - //------------------------------------------------------------------------------------------------------------ - - - //------------------------------------------------------------------------------------------------------------ - // Methods for capturing events from the horizontal bar - //------------------------------------------------------------------------------------------------------------ - - - - //------------------------------------------------------------------------------------------------------------ - // Other functional methods - //------------------------------------------------------------------------------------------------------------ - - - - //------------------------------------------------------------------------------------------------------------ - // Attributtes - //------------------------------------------------------------------------------------------------------------ -private: - - //------------------------------------------------------------------------------------------------------------ - // Private methods - //------------------------------------------------------------------------------------------------------------ - -}; -#endif