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
//------------------------------------------------------------------------------------------------------------
//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);
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);
//#include "wxVtkBaseView_SceneManager.h"
#include "wxInstantChooserPanel.h"
#include "wxContourViewPanel.h"
-#include "wxThresholdPanel.h"
-
-
//#include "ContourWorkspace.h"
#include "ContourExtractData.h"
bool configurePanels( );
+ bool addNewPanel(wxPanel* panel);
+
wxAuiNotebook * createNotebook();
void createInstantChooserPanel(wxAuiNotebook * parent);
//AD
void onMirror();
-
void onThreshold(int minVal, int maxVal);
- bool onThresholdPanel(wxPanel* panel);
-
//====================================================================================================
void showAxis(bool show);
+++ /dev/null
-//----------------------------------------------------------------------------------------------------------------
-// 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
+++ /dev/null
-#ifndef __wxThresholdPanel_INCLUDED_H__
-#define __wxThresholdPanel_INCLUDED_H__
-
-
-// -----------------------------------------------------------------------------------------------------------
-// WX headers inclusion.
-// For compilers that support precompilation, includes <wx/wx.h>.
-// -----------------------------------------------------------------------------------------------------------
-
-#include <wx/wxprec.h>
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-#ifndef WX_PRECOMP
-#include <wx/wx.h>
-#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