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
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);
bbSetOutputWidget( mwxwidget );
- this->bbSignalOutputModification();
+ //this->bbSignalOutputModification();
//Process();
}
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 *,"");
// Rectangulo
_manRoiControl = new manualRoiControler();
- _mContourModel = new manualContourModel();
+ _mContourModel = new manualContourModelRoi();
_mViewRoi = new manualViewRoi();
_mViewRoi->SetModel( _mContourModel );
_mViewRoi->SetWxVtkBaseView( this->wxvtkbaseview );
{
unsigned int i,ii, np;
np = GetNumberOfPoints( );
+//EED01
+ printf("EED manualViewRoi::RefreshContour np %d \n", np);
if ( np > 0)
{
if (np>=2)
//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
//int i , nps = _sizePointsContour;
int i;
int nps = _manContModel->GetNumberOfPointsSpline();
+printf("EED01 manualViewBaseContour::ConstructVTKObjects nps %d\n ",nps);
//-------------------------------------------------------------
DeleteVtkObjects();
_pts = vtkPoints::New();
_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 */ );
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:
ckBoxX->SetValue(false);
ckBoxY->SetValue(false);
ckBoxZ->SetValue(false);
- _ckBoxXYZ->SetValue(true);
+ _ckBoxXYZ->SetValue(false);
_ckBoxPlane->SetValue(false);
_positionX->SetSize(400,20);
_wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
-
// vtkPointWidget
_myCallback = vtkmyPWCallback_3DPointWidget::New();
_myCallback->SetWxVtkMPR3DView(this);
_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);
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 );
}
VisibleActor(3, false );
_boxWidgetS1->HandlesOn ();
- _boxWidgetS1->On();
+
+//EED 29Mars2009
+// _boxWidgetS1->On();
+
_boxWidgetS1->Off();
_boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(0) );
_boxWidgetVolume->AddObserver( vtkCommand::InteractionEvent , _vtkclipping3Ddataviewer->GetObserverV() );
_boxWidgetVolume->HandlesOn ();
- _boxWidgetVolume->On();
+
+//EED 29Mars2009
+// _boxWidgetVolume->On();
+
_boxWidgetVolume->Off();
{
_wxvtk3Dbaseview_Clipping3D_BB->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( vtkinteractorstyle3Dview );
}
-
- RefreshView(true);
+
+//EED 29Mars2009
+// RefreshView(true);
+
}
//----------------------------------------------------------------------------
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){
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);