]> Creatis software - creaMaracasVisu.git/commitdiff
BUG MACOS
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 30 Mar 2009 15:31:08 +0000 (15:31 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 30 Mar 2009 15:31:08 +0000 (15:31 +0000)
bbtk/src/bbmaracasvisuViewerMPR.cxx
bbtk/src/bbmaracasvisuViewerNV.cxx
bbtk/src/bbmaracasvisuViewerNV.h
lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourVOIWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx

index b260443c583206812d3c387bdfa95cb82814487a..246ae620dc8ccfba782b19c47bdaf44aac9aa238 100644 (file)
@@ -122,12 +122,19 @@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ViewerMPR)
 BBTK_BLACK_BOX_IMPLEMENTATION(ViewerMPR,bbtk::WxBlackBox);
 void ViewerMPR::Process()
 {
+printf("EED ViewerMPR::Process 01\n"); 
        if (wxwidget!=NULL){
+               wxBusyCursor wait;         
                if(marimagedata==NULL){
                        wxwidget->setMarImage(new marImageData(bbGetInputIn() ));
                        wxwidget->ConfigureVTK();
+                       
+                       
+printf("EED ViewerMPR::Process 02\n"); 
+                       wxwidget->wxPanel::Refresh();
+                       wxwidget->Show();
+//                     wxwidget->Refresh();
                }
-               wxBusyCursor wait;         
                bbSetOutputPoint( wxwidget->GetPoint() );
                bbSetOutputRenderer( wxwidget->GetRenderer() );  
        } // wxwidget
@@ -135,6 +142,7 @@ void ViewerMPR::Process()
 
 void ViewerMPR::CreateWidget(wxWindow* parent)
 {
+printf("EED ViewerMPR::CreateWidget \n");      
        bbtkDebugMessageInc("Core",9,"ViewerMPR::CreateWidget() " <<std::endl);
        //JCP 10 - 03 - 09 marImageData *marimagedata = new marImageData(bbGetInputIn() );
        bbtkDebugDecTab("Core",9);
index bdce092c9dd96fa61f88503c2ae4ecdf6d9aec48..13444aa1e9d9220c17ba661b39e9127639c5c5cf 100644 (file)
@@ -106,7 +106,7 @@ void ViewerNV::CreateWidget(wxWindow* parent)
     bbSetOutputWidget( mwxwidget );    
 
        
-       this->bbSignalOutputModification();
+       //this->bbSignalOutputModification();
        //Process();
 }
 
index 69ab166681ad99b3330564018b3beb2b5a9e0c86..f2ae6d5a10aea6846cf7e793636195b7273f2271 100644 (file)
@@ -85,7 +85,7 @@ BBTK_DESCRIPTION("Viewer : N view configuration 2D and 3D");
   BBTK_CATEGORY("viewer");
   BBTK_INPUT(ViewerNV,Title,"Title prepended to the text",std::string,"");
        BBTK_INPUT(ViewerNV,In,"Input image",vtkImageData*,"");
-       BBTK_INPUT(ViewerNV,nTypeView,"vector of viewer types (default 5 0 1 3 ): -1=Z_2DwithOutAxis 0=Z_2D 1=X_2D 2=Y_2D 3=Plane 4=Sphere 5=3D ",std::vector<int>,"");
+       BBTK_INPUT(ViewerNV,nTypeView,"vector of viewer types (default 5 0 1 3 ): -1=Z_2DwithOutAxis 0=Z_2D 1=X_2D 2=Y_2D 3=Plane 4=Sphere 5=3D 6=3Dplane",std::vector<int>,"");
        BBTK_OUTPUT(ViewerNV,wxVtkBaseView1,"wxVtkBaseView 1",wxVtkBaseView  *,"");
        BBTK_OUTPUT(ViewerNV,wxVtkBaseView2,"wxVtkBaseView 2",wxVtkBaseView  *,"");
        BBTK_OUTPUT(ViewerNV,wxVtkBaseView3,"wxVtkBaseView 3",wxVtkBaseView  *,"");
index 854ab1d992eb5f4d2e8c397a1d6c311abafcde8e..efe28c358cde23b07800d0da339ea32fee1ad043 100644 (file)
@@ -133,7 +133,7 @@ std::cout << "wxWidgetSliderMinMaxVOI ::onEndChange_Bar" << std::endl;
        
        // Rectangulo
        _manRoiControl  = new manualRoiControler();
-       _mContourModel  = new manualContourModel();
+       _mContourModel  = new manualContourModelRoi();
        _mViewRoi               = new manualViewRoi();
        _mViewRoi->SetModel( _mContourModel );
        _mViewRoi->SetWxVtkBaseView( this->wxvtkbaseview );
index 5ebf7d8ee79c4586fe529766c92910f4fe005f66..de7d18f196b66fc9b06b0e96c54d83ae3dfa9090 100644 (file)
@@ -2162,6 +2162,8 @@ void manualViewRoi::RefreshContour() // virtual
 {
     unsigned int i,ii, np;
     np = GetNumberOfPoints( );
+//EED01        
+       printf("EED manualViewRoi::RefreshContour np %d \n", np);       
        if ( np > 0)
        {
                if (np>=2)
@@ -2178,6 +2180,7 @@ void manualViewRoi::RefreshContour() // virtual
 
        //EED 27 sep 2007
        //                      _pts->SetPoint(i, XX,YY,ZZ );
+printf("EED manualViewRoi::RefreshContour ZZ %f   _spc%f \n", ZZ, _spc[2] );   
                                _pts->SetPoint(i, XX*_spc[0] , YY*_spc[1] , ZZ*_spc[2] );
                        } //  rof
 
@@ -2878,6 +2881,7 @@ void manualViewBaseContour::ConstructVTKObjects()
        //int i , nps = _sizePointsContour;
        int i;
        int nps = _manContModel->GetNumberOfPointsSpline();
+printf("EED01 manualViewBaseContour::ConstructVTKObjects nps %d\n ",nps);      
 //-------------------------------------------------------------
        DeleteVtkObjects();
        _pts = vtkPoints::New();
@@ -2887,8 +2891,11 @@ void manualViewBaseContour::ConstructVTKObjects()
                _pts->SetPoint(i,       0       , 0     , 0 );
        }
        // This is for the boundaring inicialisation
-       _pts->SetPoint(0,       -1000   , -1000 , -1000 );
-       _pts->SetPoint(1,       1000    , 1000  , 1000 );
+//EED 29Mars2009       
+       _pts->SetPoint(0,       0       , 0     , -1000 );
+       _pts->SetPoint(1,       0       , 0     ,  1000 );
+//     _pts->SetPoint(0, -1000 , -1000 , -1000 );
+//     _pts->SetPoint(1, 1000  , 1000  , 1000  );
 
        vtkCellArray *lines = vtkCellArray::New();
        lines->InsertNextCell( nps /* +1 */ );
index 38720c05fa171d1f1687f091a58fc50a80cdc41c..13a93481dc55c866945757aca37fef6aa73b0d69 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMPRWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/03/24 10:49:21 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2009/03/30 15:31:15 $
+  Version:   $Revision: 1.6 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -2474,7 +2474,7 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
        ckBoxX->SetValue(false);
        ckBoxY->SetValue(false);
        ckBoxZ->SetValue(false);
-       _ckBoxXYZ->SetValue(true);
+       _ckBoxXYZ->SetValue(false);
        _ckBoxPlane->SetValue(false);
 
        _positionX->SetSize(400,20);
@@ -3574,7 +3574,6 @@ void wxVtkMPR3DView::Configure(){
        _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
 
 
-
        // vtkPointWidget
        _myCallback = vtkmyPWCallback_3DPointWidget::New();
        _myCallback->SetWxVtkMPR3DView(this);
@@ -3583,10 +3582,16 @@ void wxVtkMPR3DView::Configure(){
        _myCallback->SetVtkPointWidget(_pointWidget);
        _pointWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() ); 
        _pointWidget->SetInput( GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData() );
+       
        _pointWidget->AllOff();
+       
        _pointWidget->PlaceWidget();
 //     _pointWidget->SetPosition( x,y,z ); 
-       _pointWidget->On();
+       
+//EED01 29Mars2009
+// MACOS probleme vtk-window out of wx-window  
+//     _pointWidget->On();
+       
        _pointWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback);
 
 
@@ -3619,10 +3624,12 @@ void wxVtkMPR3DView::Configure(){
     contourMapper->SetScalarRange( imageData->GetScalarRange() );
        _contourPlaneActor = vtkActor::New();
        _contourPlaneActor->SetMapper(contourMapper);
+
        _contourPlaneActor->VisibilityOff();
 
        _planeWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() );
        _planeWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback);
+
        _planeWidget->Off();
        _wxvtk3Dbaseview->GetRenderer()->AddActor( _contourPlaneActor );                        
 }
@@ -4017,7 +4024,10 @@ void wxVtkClipping3DView::Configure(){
        VisibleActor(3, false );
 
        _boxWidgetS1->HandlesOn ();
-       _boxWidgetS1->On();
+       
+//EED 29Mars2009       
+//     _boxWidgetS1->On();
+       
        _boxWidgetS1->Off();
 
        _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(0) );
@@ -4037,7 +4047,10 @@ void wxVtkClipping3DView::Configure(){
        _boxWidgetVolume->AddObserver( vtkCommand::InteractionEvent              , _vtkclipping3Ddataviewer->GetObserverV() );
 
        _boxWidgetVolume->HandlesOn ();
-       _boxWidgetVolume->On();
+       
+//EED 29Mars2009       
+//     _boxWidgetVolume->On();
+       
        _boxWidgetVolume->Off();
 
 
@@ -5936,8 +5949,10 @@ void wxMPRWidget::ConfigureVTK(){
        {
                _wxvtk3Dbaseview_Clipping3D_BB->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( vtkinteractorstyle3Dview );
        }
-
-       RefreshView(true);
+       
+//EED 29Mars2009
+//     RefreshView(true);
+       
 }
 
 //----------------------------------------------------------------------------
index e93c05d1ec4536f439234c4951dd8adac96d5e8a..cf83734180310faa211ba60bfaeff29c9ae215e9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_N_ViewersWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/03/24 10:49:21 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2009/03/30 15:31:15 $
+  Version:   $Revision: 1.4 $
 
   Copyright: (c) 2002, 2003
   License:
                
                this->Layout();
                this->Refresh();
-
  }
 
  void wxMaracas_N_ViewersWidget::SetType(std::vector<int>* type){
index dd6b80cf5d8c455295ab7de2ade80fae77ef488e..63ebc509c655fedf56ee9b54446d1f97e278a492 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ViewerWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/03/24 10:49:21 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/03/30 15:31:15 $
+  Version:   $Revision: 1.5 $
 
   Copyright: (c) 2002, 2003
   License:
                        mvtkmprbasedata->SetY( y );
                        mvtkmprbasedata->SetZ( z );
                }
-               RefreshView();
+//             RefreshView();
        }
 
        //-------------------------------------------------------------------------
        //-------------------------------------------------------------------------
        void wxMaracas_ViewerWidget::RefreshView()
        {
+               
                        if (mvtk2Dbaseview                              !=NULL ){ mvtk2Dbaseview                                -> Refresh();           }
                        if (mvtkmpr2Dview_X                             !=NULL ){ mvtkmpr2Dview_X                               -> Refresh();           }
                        if (mvtkmpr2Dview_Y                             !=NULL ){ mvtkmpr2Dview_Y                               -> Refresh();           }
                        if (mwxvtkmpr3Dview                             !=NULL ){ mwxvtkmpr3Dview                               -> RefreshView();       }
                        if (mwxvtkclipping3Dview                !=NULL ){ mwxvtkclipping3Dview                  -> Refresh();           }
                        if (mwxvtk3Dbaseview_Clipping3D !=NULL ){ mwxvtk3Dbaseview_Clipping3D   -> Refresh();           }
+
        }
 
        //-------------------------------------------------------------------------
 
        void wxMaracas_ViewerWidget::SetImage( vtkImageData *image      )
        {
-               //printf("EED wxMaracas_ViewerWidget::SetImage   IMPORTANT this methode is missing \n");
                marImageData* mar = mvtkmprbasedata->GetMarImageData();
                mar->removeImageData(0);
                mar->AddImageData(image);