wxWidgetVOI::wxWidgetVOI(wxWindow* parent, wxVtkBaseView *wxvtkbaseview, vtkImageData *imagedata)
: wxPanel( parent, -1 )
{
- wxPanel *panel = this;
+// wxPanel *panel = this;
if(wxvtkbaseview!=NULL&&imagedata!=NULL){
//--------------------------------------------------------------------------
void wxWidgetVOI::Refresh()
{
- printf("EED wxWidgetVOI::Refresh \n");
// wxwidget->RefreshView();
}
//---------------
void wxWidgetVOI::OnRefreshView(wxCommandEvent &event)
{
- printf("EED wxWidgetVOI::OnRefreshView \n");
/*
if((wxwidget!=NULL) && (mbbViewerMPR!=NULL))
{
//--------------------------------------------------------------------------
void wxWidgetVOI::OnDClickLeft(wxCommandEvent & event)
{
- printf("EED wxWidgetVOI::OnDClickLeft \n");
// wxwidget->RefreshView();
}
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();
//-------------------------------------------
createAndSendEvent( wxEVT_TSBAR_ACTUAL );
// createAndSendEvent( 98765 );
-printf("EED creaMaracasVisu mBarRange::OnMouseMove XXXXXXX \n");
}
else if( validPos_ActualTri && _in_rangeProperty )
Program: wxMaracas
Module: $RCSfile: wxMPRWidget.cxx,v $
Language: C++
- Date: $Date: 2009/03/30 15:31:15 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2009/04/01 08:41:35 $
+ Version: $Revision: 1.7 $
Copyright: (c) 2002, 2003
License:
void wxVtkMPR2DView::Configure(){
wxVtk2DBaseView::Configure();
-
_interactorstylemprview = new vtkInteractorStyleMPRView();
GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _interactorstylemprview );
_lineAMapper->SetInput(_pdA);
_lineAMapper->ImmediateModeRenderingOn();
_lineAActor->SetMapper(_lineAMapper);
- _lineAActor->GetProperty()->BackfaceCullingOn();
+// _lineAActor->GetProperty()->BackfaceCullingOn();
_lineAActor->GetProperty()->SetDiffuseColor(1,0,0);
_lineAActor->GetProperty()->SetLineWidth(2);
_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
_lineBMapper->SetInput(_pdB);
_lineBMapper->ImmediateModeRenderingOn();
_lineBActor->SetMapper(_lineBMapper);
- _lineBActor->GetProperty()->BackfaceCullingOn();
+// _lineBActor->GetProperty()->BackfaceCullingOn();
_lineBActor->GetProperty()->SetDiffuseColor(1,0,0);
_lineBActor->GetProperty()->SetLineWidth(2);
_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor );
+
vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera();
if (_direction==0) {
camera->SetViewUp ( 0 , -1 , 0 );
camera->SetFocalPoint ((x1+x2)/2 , (y1+y2)/2 , 0 );
camera->SetParallelScale( (x2-x1)/3.0 );
}
+
}
-
// _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow (160);
// _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel (800);
Program: wxMaracas
Module: $RCSfile: wxMaracas_ViewerWidget.cxx,v $
Language: C++
- Date: $Date: 2009/03/30 15:31:15 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2009/04/01 08:41:35 $
+ Version: $Revision: 1.6 $
Copyright: (c) 2002, 2003
License:
if (type==0)
{
- mvtkmpr2Dview_Z = new wxVtkMPR2DView(panel,0);
+ mvtkmpr2Dview_Z = new wxVtkMPR2DView(panel,2);
mvtkmpr2Dview_Z->SetVtkBaseData(mvtkmprbasedata);
wxwindow = mvtkmpr2Dview_Z->GetWxVTKRenderWindowInteractor();
}
if (type==1)
{
- mvtkmpr2Dview_X = new wxVtkMPR2DView(panel,1);
+ mvtkmpr2Dview_X = new wxVtkMPR2DView(panel,0);
mvtkmpr2Dview_X->SetVtkBaseData(mvtkmprbasedata);
wxwindow = mvtkmpr2Dview_X->GetWxVTKRenderWindowInteractor();
}
if (type==2)
{
- mvtkmpr2Dview_Y = new wxVtkMPR2DView(panel,2);
+ mvtkmpr2Dview_Y = new wxVtkMPR2DView(panel,1);
mvtkmpr2Dview_Y->SetVtkBaseData(mvtkmprbasedata);
wxwindow = mvtkmpr2Dview_Y->GetWxVTKRenderWindowInteractor();
}
wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL );
wxSplitterWindow *pnlSplitter = new wxSplitterWindow( this , -1);
wxPanel *viewPanel = CreateViewPanel(pnlSplitter);
-printf("EED wxSTLWidget_03::wxSTLWidget_03 01\n");
wxPanel *controlPanel = CreateControlPanel(pnlSplitter);
-printf("EED wxSTLWidget_03::wxSTLWidget_03 02\n");
sizer -> Add( pnlSplitter ,1,wxGROW ,0);
pnlSplitter -> SetMinimumPaneSize( 150 );
joinMarchingCubes = NULL;
joinMapper = NULL;
joinActor = NULL;
-printf("EED wxSTLWidget_03::wxSTLWidget_03 03\n");
}
//vtkImageData *imagedata;
//imagedata = _mar->_experiment->getDynData( )->getVolume( )->castVtk();
//imagedata->Update();
-printf("EED wxSTLWidget_03::CreateViewPanel 01 \n");
_wxMaracasMPR = new wxMaracasMPR( panel);//JCP 10-03-2009, new marImageData(imagedata), 1 );
-printf("EED wxSTLWidget_03::CreateViewPanel 02 \n");
_wxMaracasMPR->ConfigureVTK();
-printf("EED wxSTLWidget_03::CreateViewPanel 03 \n");
sizer->Add( _wxMaracasMPR , 1, wxEXPAND, 0);
panel->SetSizer(sizer);
panel->SetAutoLayout(true);
panel->SetSize(400,400);
panel->Layout();
-printf("EED wxSTLWidget_03::CreateViewPanel 04 \n");
return panel;
}
//-------------------------------------------------------------------
wxWindow* wxSTLWidget_03::CreateSelectAPointPanel(wxWindow *parent)
{
-printf("EED wxSTLWidget_03::CreateSelectAPointPanel 01\n");
wxPanel *panel = new wxPanel(parent,-1);
-printf("EED wxSTLWidget_03::CreateSelectAPointPanel 02\n");
wxFlexGridSizer *sizer = new wxFlexGridSizer(2);
-printf("EED wxSTLWidget_03::CreateSelectAPointPanel 03\n");
sizer->Add(new wxStaticText(panel,-1,_T(" ")));
sizer->Add(new wxStaticText(panel,-1,_T(" ")));
-printf("EED wxSTLWidget_03::CreateSelectAPointPanel 04\n");
sizer->Add(new wxStaticText(panel,-1,_T(" ")));
sizer->Add(new wxStaticText(panel,-1,_T(" ")));
-printf("EED wxSTLWidget_03::CreateSelectAPointPanel 05\n");
sizer->Add(new wxStaticText(panel,-1,_T(" Select a 3D Point...")));
sizer->Add(new wxStaticText(panel,-1,_T(" ")));
-printf("EED wxSTLWidget_03::CreateSelectAPointPanel 06\n");
panel->SetSizer(sizer);
panel->SetAutoLayout(true);
panel->SetSize(400,600);
panel->Layout();
-printf("EED wxSTLWidget_03::CreateSelectAPointPanel 07\n");
return panel;
//-------------------------------------------------------------------
wxPanel* wxSTLWidget_03::CreateControlPanel(wxWindow *parent)
{
-printf("EED wxSTLWidget_03::CreateControlPanel 01\n");
wxPanel *panel = new wxPanel(parent,-1);
wxNotebook *noteBook = new wxNotebook(panel, -1);
-printf("EED wxSTLWidget_03::CreateControlPanel 02\n");
noteBook->AddPage(CreateSelectAPointPanel(noteBook),_T("0 ->") );
-printf("EED wxSTLWidget_03::CreateControlPanel 03\n");
noteBook->AddPage(CreateSegmentationPanel(noteBook),_T("1 ->") );
-printf("EED wxSTLWidget_03::CreateControlPanel 04\n");
noteBook->AddPage(CreateSmoothingPanel(noteBook) ,_T("2 ->") );
-printf("EED wxSTLWidget_03::CreateControlPanel 05\n");
noteBook->AddPage(CreateReadSTLFilePanel(noteBook) ,_T("3 " ) );
-printf("EED wxSTLWidget_03::CreateControlPanel 06\n");
noteBook->SetSelection(0);
noteBook->SetSize(350,250);
wxFlexGridSizer *sizer = new wxFlexGridSizer(2);
panel->SetSize(400,600);
panel->Layout();
-printf("EED wxSTLWidget_03::CreateControlPanel 07\n");
return panel;
}
//------------------------------------------------------------------------
char zTzxt[20];
char resultText[50];
- strcpy(resultText,"NG: ");
+ strcpy(resultText,"GL: ");
if (ok==true) {
unsigned short *pOrg=(unsigned short*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
// itoa (*pOrg,zTzxt,10);
camera->SetClippingRange( 0.01 , 1000000 );
camera->ComputeViewPlaneNormal();
camera->SetParallelScale( spx*(x2-x1)/3.0 );
-
+
// text information over the graphic window
_vtkIinfoTextImage = new vtkInfoTextImage();
_vtkIinfoTextImageInteractor = new vtkInfoTextImageInteractor();