if(!compareVectors(type, _currenttype))
{
_mwxwidget->SetType(&type);
+ _mwxwidget->SetTDxWindow( bbGetInputTDxWindow() );
_mwxwidget->UpdateLayout(img);
}else if (img != _currentimg){
_mwxwidget->SetImage(img);
vecNTypeViwer.push_back(2);
vecNTypeViwer.push_back(0);
bbSetInputnTypeView(vecNTypeViwer);
+ bbSetInputTDxWindow( -1 );
bbSetOutputwxVtkBaseView1( NULL );
bbSetOutputwxVtkBaseView2( NULL );
BBTK_DECLARE_INPUT(Obs4, vtkInteractorObserver *);
BBTK_DECLARE_INPUT(Obs5, vtkInteractorObserver *);
BBTK_DECLARE_INPUT(Interpolate, bool);
+ BBTK_DECLARE_INPUT(TDxWindow, int);
BBTK_DECLARE_OUTPUT(wxVtkBaseView1,wxVtkBaseView*);
BBTK_INPUT(ViewerNV,Obs4,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,"");
BBTK_INPUT(ViewerNV,Obs5,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,"");
BBTK_INPUT(ViewerNV,Interpolate,"Interpolate true/false (default true)",bool,"");
+ BBTK_INPUT(ViewerNV,TDxWindow,"(default -1) -1:No TDx [0..3]:window",int,"");
BBTK_OUTPUT(ViewerNV,wxVtkBaseView1,"wxVtkBaseView 1",wxVtkBaseView *,"");
BBTK_OUTPUT(ViewerNV,wxVtkBaseView2,"wxVtkBaseView 2",wxVtkBaseView *,"");
//std::cout<<"size "<<nTypeView->size()<<std::endl;
if (nTypeView->size()==1)
{
- wxwindow1 = new wxMaracas_ViewerWidget(this, imagedata, (*nTypeView)[0], mvtkmprbasedata);
+ wxwindow1 = new wxMaracas_ViewerWidget(this, imagedata, (*nTypeView)[0], mvtkmprbasedata, nTDxWindow==0 );
wxwindow = wxwindow1;
}else if (nTypeView->size()==2) {
wxSplitterWindow *spliter = new wxSplitterWindow( this , -1);
spliter->SetMinimumPaneSize(1);
//RaC Nov2012 Correctly resize internal panels with the window resize event
spliter->SetSashGravity(0.5);
- wxwindow1 = new wxMaracas_ViewerWidget(spliter, imagedata, (*nTypeView)[0], mvtkmprbasedata);
- wxwindow2 = new wxMaracas_ViewerWidget(spliter, imagedata, (*nTypeView)[1], mvtkmprbasedata);
+ wxwindow1 = new wxMaracas_ViewerWidget(spliter, imagedata, (*nTypeView)[0], mvtkmprbasedata,nTDxWindow==0);
+ wxwindow2 = new wxMaracas_ViewerWidget(spliter, imagedata, (*nTypeView)[1], mvtkmprbasedata,nTDxWindow==1);
spliter -> SplitHorizontally( wxwindow1 , wxwindow2 );
wxwindow = spliter;
}else if (nTypeView->size()==3)
//RaC Nov2012 Correctly resize internal panels with the window resize event
spliter->SetSashGravity(0.5);
spliterA->SetSashGravity(0.5);
- wxwindow1 = new wxMaracas_ViewerWidget(spliter , imagedata, (*nTypeView)[0], mvtkmprbasedata);
- wxwindow2 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[1], mvtkmprbasedata);
- wxwindow3 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[2], mvtkmprbasedata);
+ wxwindow1 = new wxMaracas_ViewerWidget(spliter , imagedata, (*nTypeView)[0], mvtkmprbasedata,nTDxWindow==0);
+ wxwindow2 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[1], mvtkmprbasedata,nTDxWindow==1);
+ wxwindow3 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[2], mvtkmprbasedata,nTDxWindow==2);
spliter -> SplitVertically( wxwindow1 , spliterA );
spliterA-> SplitHorizontally( wxwindow2 , wxwindow3 );
wxwindow = spliter;
// spliterA-> SplitHorizontally( wxwindow1 , wxwindow2 );
// spliterB-> SplitHorizontally( wxwindow3 , wxwindow4 );
- wxwindow1 = new wxMaracas_ViewerWidget(spliterB, imagedata, (*nTypeView)[0], mvtkmprbasedata);
- wxwindow2 = new wxMaracas_ViewerWidget(spliterB, imagedata, (*nTypeView)[1], mvtkmprbasedata);
- wxwindow3 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[2], mvtkmprbasedata);
- wxwindow4 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[3], mvtkmprbasedata);
+ wxwindow1 = new wxMaracas_ViewerWidget(spliterB, imagedata, (*nTypeView)[0], mvtkmprbasedata,nTDxWindow==0);
+ wxwindow2 = new wxMaracas_ViewerWidget(spliterB, imagedata, (*nTypeView)[1], mvtkmprbasedata,nTDxWindow==1);
+ wxwindow3 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[2], mvtkmprbasedata,nTDxWindow==2);
+ wxwindow4 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[3], mvtkmprbasedata,nTDxWindow==3);
spliterA-> SplitHorizontally( wxwindow3 , wxwindow4 );
spliterB-> SplitHorizontally( wxwindow2 , wxwindow1 );
//-----------------------------------------------------------------------------------
- void wxMaracas_N_ViewersWidget::SetType(std::vector<int>* type){
+void wxMaracas_N_ViewersWidget::SetType(std::vector<int>* type)
+{
nTypeView = type;
- }
+}
+
+//-----------------------------------------------------------------------------------
+void wxMaracas_N_ViewersWidget::SetTDxWindow(int tdxwindow)
+{
+ nTDxWindow = tdxwindow;
+}
void SetImage( vtkImageData *image );
void ConfigureVTK();
void SetType(std::vector<int>* type);
+ void SetTDxWindow(int tdxwindow);
+
void UpdateLayout(vtkImageData* imagedata);
// double GetZ(int iWin);
double GetX();
wxMaracas_ViewerWidget *wxwindow2;
wxMaracas_ViewerWidget *wxwindow3;
wxMaracas_ViewerWidget *wxwindow4;
-
wxWindow *_currentwxw;
-
-
std::vector<int> *nTypeView;
-
+ int nTDxWindow;
vtkMPRBaseData* mvtkmprbasedata;
void invariant();
// Constructors & Destructors
//------------------------------------------------------------------------------------------------------------
- wxMaracas_ViewerWidget::wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type, vtkMPRBaseData *vtkmprbasedata)
+ wxMaracas_ViewerWidget::wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type, vtkMPRBaseData *vtkmprbasedata,bool TDxWindow)
: wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
{
wxPanel *panel = this;
if (type==-1)
{
- mvtk2Dbaseview = new wxVtk2DBaseView(panel);
+ mvtk2Dbaseview = new wxVtk2DBaseView(panel,TDxWindow);
mvtk2Dbaseview->SetVtkBaseData(mvtkmprbasedata);
wxwindow = mvtk2Dbaseview->GetWxVTKRenderWindowInteractor();
}else if (type==0)
{
- mvtkmpr2Dview_Z = new wxVtkMPR2DView(panel,2);
+ mvtkmpr2Dview_Z = new wxVtkMPR2DView(panel,2,TDxWindow);
mvtkmpr2Dview_Z->SetVtkBaseData(mvtkmprbasedata);
wxwindow = mvtkmpr2Dview_Z->GetWxVTKRenderWindowInteractor();
}else if (type==1)
{
- mvtkmpr2Dview_X = new wxVtkMPR2DView(panel,0);
+ mvtkmpr2Dview_X = new wxVtkMPR2DView(panel,0,TDxWindow);
mvtkmpr2Dview_X->SetVtkBaseData(mvtkmprbasedata);
wxwindow = mvtkmpr2Dview_X->GetWxVTKRenderWindowInteractor();
}else if (type==2)
{
- mvtkmpr2Dview_Y = new wxVtkMPR2DView(panel,1);
+ mvtkmpr2Dview_Y = new wxVtkMPR2DView(panel,1,TDxWindow);
mvtkmpr2Dview_Y->SetVtkBaseData(mvtkmprbasedata);
wxwindow = mvtkmpr2Dview_Y->GetWxVTKRenderWindowInteractor();
}else if (type==3)
}else if (type==5)
{
panelClipping3D = new wxSplitterWindow( panel , -1);
- mwxvtk3Dbaseview_Clipping3D = new wxVtk3DBaseView( panelClipping3D , vtkmprbasedata);
+ mwxvtk3Dbaseview_Clipping3D = new wxVtk3DBaseView( panelClipping3D , vtkmprbasedata,TDxWindow);
mwxvtkclipping3Dview = new wxVtkClipping3DView(mwxvtk3Dbaseview_Clipping3D);
vtkClipping3DDataViewer *vtkclipping3Ddataviewer= new vtkClipping3DDataViewer();
vtkclipping3Ddataviewer->SetVtkMPRBaseData(mvtkmprbasedata);
} else if (type==6) {
panelClipping3D = new wxSplitterWindow( panel , -1);
- mwxvtk3Dbaseview_Clipping3D = new wxVtk3DBaseView( panelClipping3D , vtkmprbasedata);
+ mwxvtk3Dbaseview_Clipping3D = new wxVtk3DBaseView( panelClipping3D , vtkmprbasedata,TDxWindow);
mwxvtkmpr3Dview = new wxVtkMPR3DView( mwxvtk3Dbaseview_Clipping3D );
vtkmpr3Ddataviewer = new vtkMPR3DDataViewer();
wxWindow *window3D = mwxvtk3Dbaseview_Clipping3D->GetWxVTKRenderWindowInteractor();
// Constructors & Destructors
//------------------------------------------------------------------------------------------------------------
- wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type, vtkMPRBaseData *vtkmprbasedata=NULL);
+ wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type, vtkMPRBaseData *vtkmprbasedata=NULL,bool TDxWindow=false);
~wxMaracas_ViewerWidget();
//------------------------------------------------------------------------------------------------------------
#include "vtkImageActor.h"
-wxVtk2DBaseView::wxVtk2DBaseView(wxWindow *parent)
-:wxVtkBaseView(parent)
+wxVtk2DBaseView::wxVtk2DBaseView(wxWindow *parent,bool TDxWindow)
+:wxVtkBaseView(parent,TDxWindow)
{
_imageViewer2XYZ = NULL;
_vtkIinfoTextImage = NULL;
class creaMaracasVisu_EXPORT wxVtk2DBaseView: public wxVtkBaseView{
public:
- wxVtk2DBaseView(wxWindow *parent);
+ wxVtk2DBaseView(wxWindow *parent,bool TDxWindow=false);
virtual ~wxVtk2DBaseView();
virtual void Configure(bool okimage=true);
vtkImageViewer2_XYZ* _imageViewer2XYZ;
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
-wxVtk3DBaseView::wxVtk3DBaseView(wxWindow *parent, vtkBaseData* vtkbasedata)
-:wxVtkBaseView( parent )
+wxVtk3DBaseView::wxVtk3DBaseView(wxWindow *parent, vtkBaseData* vtkbasedata,bool TDxWindow)
+:wxVtkBaseView( parent , TDxWindow)
{
SetVtkBaseData( vtkbasedata );
_configure = false;
class creaMaracasVisu_EXPORT wxVtk3DBaseView: public wxVtkBaseView
{
public:
- wxVtk3DBaseView( wxWindow *parent, vtkBaseData* vtkbasedata );
+ wxVtk3DBaseView( wxWindow *parent, vtkBaseData* vtkbasedata, bool TDxWindow=false );
virtual ~wxVtk3DBaseView();
vtkCamera* GetCamera();
virtual vtkRenderer* GetRenderer();
//-------------------------------------------------------------------
-wxVtkBaseView::wxVtkBaseView(wxWindow *parent)
+wxVtkBaseView::wxVtkBaseView(wxWindow *parent,bool TDxWindow)
{
_parent = parent;
_iren = (crea::wxVTKRenderWindowInteractor*)new wxVTKRenderWindowInteractorPlus(_parent,this);
//EED 2021-10-12
#ifdef VTK_USE_TDX
- _iren->SetUseTDx(true);
+ if (TDxWindow==true)
+ {
+ _iren->SetUseTDx(true);
+ } // if TDX
#endif
//-------------------------------------------------------------------
void wxVtkBaseView::RefreshView() // virtual
{
-printf("EED wxVtkBaseView::RefreshView Start\n");
// EED 10 Oct 2007
#if defined(WIN32)
GetRenWin()->Render();
#else
//GetRenWin()->Render();
#endif
-printf("EED wxVtkBaseView::RefreshView End\n");
}
//---------------------------------------------------------------------------
vtkRenderer* wxVtkBaseView::GetRenderer() // virtual
class creaMaracasVisu_EXPORT wxVtkBaseView{
public:
wxVtkBaseView( );
- wxVtkBaseView( wxWindow *parent );
+ wxVtkBaseView( wxWindow *parent, bool TDxWindow=false );
virtual ~wxVtkBaseView();
crea::wxVTKRenderWindowInteractor *GetWxVTKRenderWindowInteractor() throw (char*);
virtual void Configure();
using namespace gtm;
#endif
-wxVtkMPR2DView::wxVtkMPR2DView( wxWindow *parent, int direction)
- :wxVtk2DBaseView(parent)
+wxVtkMPR2DView::wxVtkMPR2DView( wxWindow *parent, int direction, bool TDxWindow)
+ :wxVtk2DBaseView(parent, TDxWindow)
{
_backX = -99999;
_backY = -99999;
class creaMaracasVisu_EXPORT wxVtkMPR2DView : public wxVtk2DBaseView
{
public:
- wxVtkMPR2DView( wxWindow *parent, int direction );
+ wxVtkMPR2DView( wxWindow *parent, int direction ,bool TDxWindow=false );
~wxVtkMPR2DView();
void Configure();
virtual void Refresh();