Program: wxMaracas
Module: $RCSfile: wxMaracasSuperposition.cxx,v $
Language: C++
- Date: $Date: 2009/06/03 13:47:07 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2009/06/05 16:44:25 $
+ Version: $Revision: 1.4 $
Copyright: (c) 2002, 2003
License:
wxMaracasSuperposition::~wxMaracasSuperposition()
{
_notebook->Destroy();
- m_mgr.UnInit();
+ instance = NULL;
+ m_mgr.UnInit();
}
wxMaracasSuperposition* wxMaracasSuperposition :: getInstance ( wxWindow* parent, std::vector<vtkImageData*> imgs)
{
if( _superposition1==NULL )
{
- createSuperpositionPanel(1);
+ _superposition1 = new wxMaracasSuperpositionPanel ( _images, 1, _notebook );
}
else if( _superposition1!=NULL )
if( _superposition2==NULL )
{
- createSuperpositionPanel(2);
+ _superposition2 = new wxMaracasSuperpositionPanel ( _images, 2, _notebook );
}
else if( _superposition2!=NULL )
if( _superposition3==NULL )
{
- createSuperpositionPanel(3);
+ _superposition3 = new wxMaracasSuperpositionPanel ( _images, 3, _notebook );
}
else if( _superposition3!=NULL )
}
}
-
-void wxMaracasSuperposition :: createSuperpositionPanel(int type)
-{
- if (type=1)
- {
- _superposition1 = new wxMaracasSuperpositionPanel ( _images, _notebook );
- }
- if (type=2)
- {
- _superposition2 = new wxMaracasSuperpositionPanel ( _images, _notebook );
- }
- if (type=3)
- {
- _superposition3 = new wxMaracasSuperpositionPanel ( _images, _notebook );
- }
-}
void wxMaracasSuperposition :: changeImages(std::vector<vtkImageData*> imgs)
{
Program: wxMaracas
Module: $RCSfile: wxMaracasSuperposition.h,v $
Language: C++
- Date: $Date: 2009/06/03 13:47:07 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2009/06/05 16:44:25 $
+ Version: $Revision: 1.4 $
Copyright: (c) 2002, 2003
License:
wxAuiNotebook * createNotebook();
void createPanels();
-
- void createSuperpositionPanel(int type);
void configurePanels();
// Constructors & Destructors
//------------------------------------------------------------------------------------------------------------
- wxMaracasSuperpositionPanel :: wxMaracasSuperpositionPanel ( std::vector<vtkImageData*> imgs, wxWindow *parent, const wxPoint& pos, const wxSize& size,long style, int vertStart, int vertEnd, int horzStart, int horzEnd )
+ wxMaracasSuperpositionPanel :: wxMaracasSuperpositionPanel ( std::vector<vtkImageData*> imgs, int type, wxWindow *parent, const wxPoint& pos, const wxSize& size,long style, int vertStart, int vertEnd, int horzStart, int horzEnd )
:wxPanel(parent, -1, pos, size, style)
{
_images = imgs;
+ _type = type;
int gapH = 20;
int gapV = 10;
createSuperpositionPanel();
std::vector<int> * numViews = new std::vector<int> ();
numViews->push_back(0);
- theViewPanel = new wxMaracas_N_ViewersWidget( this, _images[0], numViews );
+
+ if (_type==1 || _type==3)
+ {
+ theViewPanel = new wxMaracas_N_ViewersWidget( this, _images[0], numViews );
+ }
+ else if (_type==2)
+ {
+ theViewPanel = new wxMaracas_N_ViewersWidget( this, _images[1], numViews );
+ }
+
SetVisibleAxis(false);
theViewPanel->SetBackgroundColour(wxColour(0,0,0));
public:
- wxMaracasSuperpositionPanel( std::vector<vtkImageData*> imgs, wxWindow *parent, const wxPoint& pos=wxDefaultPosition,
+ wxMaracasSuperpositionPanel( std::vector<vtkImageData*> imgs, int type, 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 );
std::vector<vtkImageData*> _images;
+
+ int _type;
+
/*
* Represents the panel for viewing
*/
}
//-------------------------------------------------------------------
-void wxVtkMPR2DView::TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type) // virtual
+//EED 5 juin 2009
+//void wxVtkMPR2DView::TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type) // virtual
+void wxVtkMPR2DView::TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type) // virtual
{
wxVtkBaseView::TransfromeCoordScreenToWorld(X,Y,Z,_direction);
void MoveY(double x, double y, double z);
void MoveZ(double x, double y, double z);
void ChangeAxisColor(double x, double y, double z);
-// virtual void TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type);
- virtual void TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type);
+ virtual void TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type);
+// virtual void TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type);
void SetVisibleAxis(bool ok);