#include <wxEmptyPanelWidget_2.h>
Public Member Functions | |
wxEmptyPanelWidget_2 (wxWindow *parentmar, marInterface *mar) | |
~wxEmptyPanelWidget_2 () | |
void | ConfigureVTK () |
void | Refresh () |
void | OnOpacity_OrigVol (wxScrollEvent &event) |
void | OnOpacity_Res1VolJF (wxScrollEvent &event) |
void | OnOpacity_Res2VolJF (wxScrollEvent &event) |
void | OnIsoValue (wxScrollEvent &event) |
void | OnBtnExtractTree1_JF (wxCommandEvent &event) |
void | OnBtnExtractTree2_JF (wxCommandEvent &event) |
void | OnBtnEraseTree1_JF (wxCommandEvent &event) |
void | OnBtnEraseTree2_JF (wxCommandEvent &event) |
void | OnBtnExtractTree_MH_JFC (wxCommandEvent &event) |
void | OnBtnEraseTree_MH_JFC (wxCommandEvent &event) |
void | OnOpacity_ResVolMHJF (wxScrollEvent &event) |
void | OnBranchLevel (wxScrollEvent &event) |
void | OnIsoValue_MH_JFC (wxScrollEvent &event) |
void | OnCleanTree_MH_JFC (wxScrollEvent &event) |
void | OnSensibility (wxScrollEvent &event) |
Private Member Functions | |
wxPanel * | CreateControlPanel (wxWindow *parent) |
wxPanel * | CreateViewPanel (wxWindow *parent) |
void | ResetTree1_JF () |
void | ResetTree2_JF () |
void | ExtractTree1_JF (int x, int y, int z) |
void | ExtractTree2_JF (int x, int y, int z) |
void | ResetTree_MH_JFC () |
void | PaintVascularTree_MH_JFC (marExperiment *newExperiment) |
void | PaintVascularVolume_MH_JFC (vtkImageData *image) |
void | WriteSignals (marExperiment *newExperiment) |
Private Attributes | |
TreeExtraction_MH_JFC * | _treeExtraction |
vtkMarchingCubes * | _mCubes |
vtkPolyDataMapper * | _surfMapper |
vtkActor * | _surfActor |
axisExtractor * | _1_prgov |
vtkPolyDataMapper * | _1_mapfinal |
vtkActor * | _1_stripfinal |
vtkPolyDataMapper * | _1_isoMapperMC6 |
vtkActor * | _1_isoActorMC6 |
vtkMarchingCubes * | _1_isoMC6 |
axisExtractor02 * | _2_prgov |
vtkPolyDataMapper * | _2_mapfinal |
vtkActor * | _2_stripfinal |
vtkPolyDataMapper * | _2_isoMapperMC6 |
vtkActor * | _2_isoActorMC6 |
vtkMarchingCubes * | _2_isoMC6 |
double | _sensibility_JF |
vtkPolyDataMapper * | _isoMapperMC1 |
vtkActor * | _isoActorMC1 |
vtkMarchingCubes * | _isoMC1 |
vtkImageThreshold * | _imageThresholdMC1 |
std::vector< vtkActor * > | _lstBranchActor |
std::vector< vtkPolyData * > | _lstAxisVtk |
std::vector< vtkPolyDataMapper * > | _lstBranchMapper |
wxSlider * | _opacity_OrigVol |
wxSlider * | _opacity_Res1VolJF |
wxSlider * | _opacity_Res2VolJF |
wxSlider * | _sl_sensibility_JF |
wxSlider * | _isoValue |
wxSlider * | _branchLevel |
wxSlider * | _opacity_ResVolMHJF |
wxSlider * | _isoValue_MH_JFC |
wxSlider * | _cleanTree_MH_JFC |
wxVtk3DBaseView * | _imageviewer3D |
marInterface * | _mar |
wxSurfaceWidget * | _maracasSurfaceWidget |
Definition at line 57 of file wxEmptyPanelWidget_2.h.
wxEmptyPanelWidget_2::wxEmptyPanelWidget_2 | ( | wxWindow * | parentmar, | |
marInterface * | mar | |||
) |
Definition at line 310 of file wxEmptyPanelWidget_2.cxx.
References _1_isoActorMC6, _1_isoMapperMC6, _1_isoMC6, _1_mapfinal, _1_prgov, _1_stripfinal, _2_isoActorMC6, _2_isoMapperMC6, _2_isoMC6, _2_mapfinal, _2_prgov, _2_stripfinal, _imageThresholdMC1, _isoActorMC1, _isoMapperMC1, _isoMC1, _mar, _mCubes, _sensibility_JF, _surfActor, _surfMapper, _treeExtraction, CreateControlPanel(), and CreateViewPanel().
00311 : wxPanel( parent, -1) 00312 { 00313 00314 _sensibility_JF = 0.5; 00315 00316 _mar = mar; 00317 wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL ); 00318 wxSplitterWindow *pnlSplitter = new wxSplitterWindow( this , -1); 00319 wxPanel *viewPanel = CreateViewPanel(pnlSplitter); 00320 wxPanel *controlPanel = CreateControlPanel(pnlSplitter); 00321 00322 sizer -> Add( pnlSplitter ,1,wxGROW ,0); 00323 pnlSplitter -> SetMinimumPaneSize( 150 ); 00324 pnlSplitter -> SplitVertically( viewPanel, controlPanel, 600 ); 00325 this -> SetSizer(sizer); 00326 00327 // Original Volume 00328 _mCubes = NULL; 00329 _surfMapper = NULL; 00330 _surfActor = NULL; 00331 00332 // Result 1: Volume + Axis 00333 _1_prgov = NULL; 00334 _1_mapfinal = NULL; 00335 _1_stripfinal = NULL; 00336 _1_isoMapperMC6 = NULL; 00337 _1_isoActorMC6 = NULL; 00338 _1_isoMC6 = NULL; 00339 00340 // Result 2: Volume + Axis 00341 _2_prgov = NULL; 00342 _2_mapfinal = NULL; 00343 _2_stripfinal = NULL; 00344 _2_isoMapperMC6 = NULL; 00345 _2_isoActorMC6 = NULL; 00346 _2_isoMC6 = NULL; 00347 00348 // 00349 _isoMapperMC1 = NULL; 00350 _isoActorMC1 = NULL; 00351 _isoMC1 = NULL; 00352 _imageThresholdMC1 = NULL; 00353 00354 // 00355 _treeExtraction = NULL; 00356 00357 }
wxEmptyPanelWidget_2::~wxEmptyPanelWidget_2 | ( | ) |
Definition at line 359 of file wxEmptyPanelWidget_2.cxx.
References _mCubes, _surfActor, _surfMapper, ResetTree1_JF(), ResetTree2_JF(), and ResetTree_MH_JFC().
00359 { 00360 // Erase Original Volule 00361 if (_mCubes ) { _mCubes -> Delete(); } 00362 if (_surfMapper ) { _surfMapper -> Delete(); } 00363 if (_surfActor ) { _surfActor -> Delete(); } 00364 00365 // Erase result: Volume + Axis 00366 ResetTree1_JF(); 00367 ResetTree2_JF(); 00368 ResetTree_MH_JFC(); 00369 }
void wxEmptyPanelWidget_2::ConfigureVTK | ( | ) |
Definition at line 504 of file wxEmptyPanelWidget_2.cxx.
References marInterface::_experiment, _isoValue, _mar, _maracasSurfaceWidget, _mCubes, _opacity_OrigVol, _surfActor, _surfMapper, marExperiment::getDynData(), vtk3DSurfaceWidget::GetRenderer(), marDynData::getVolume(), wxSurfaceWidget::GetVtk3DSurfaceWidget(), and wxSurfaceWidget::ShowMARACASData().
Referenced by wxMaracasEmptyPanel_2::ConfigureVTK().
00505 { 00506 wxBusyCursor wait; 00507 // _imageviewer3D->Configure(); 00508 vtkImageData *imagedata = _mar->_experiment->getDynData( )->getVolume( )->castVtk(); 00509 double opacity_OrigVol = ((double)(_opacity_OrigVol->GetValue()))/100; 00510 double isoValue; 00511 00512 // Visualisation - original volume 00513 double range[2]; 00514 imagedata->GetScalarRange( range ); 00515 isoValue=range[1] / 8; 00516 00517 _mCubes = vtkMarchingCubes::New( ); 00518 _mCubes->SetInput( imagedata ); 00519 _mCubes->SetValue( 0, isoValue ); 00520 00521 vtkStripper *stripper = vtkStripper::New(); 00522 stripper->SetInput( _mCubes->GetOutput( ) ); 00523 00524 _surfMapper = vtkPolyDataMapper::New( ); 00525 _surfMapper->SetInput( stripper->GetOutput() ); 00526 _surfMapper->ScalarVisibilityOff( ); 00527 stripper->Delete(); 00528 00529 _surfActor = vtkActor::New( ); 00530 _surfActor->SetMapper( _surfMapper ); 00531 _surfActor->PickableOff( ); 00532 _surfActor->GetProperty( )->SetColor( 0, 0, 0.8 ); 00533 _surfActor->GetProperty( )->SetOpacity( opacity_OrigVol ); 00534 00535 // Update Controls 00536 _isoValue->SetRange( (int)(range[0]), (int)(range[1]) ); 00537 _isoValue->SetValue( (int)isoValue ); 00538 00539 // Interface Update 00540 vtkRenderer *ren = _maracasSurfaceWidget->GetVtk3DSurfaceWidget()->GetRenderer(); 00541 ren->AddActor(_surfActor); 00542 00543 //-Maracas- 00544 _maracasSurfaceWidget->ShowMARACASData( _mar ); 00545 }
wxPanel * wxEmptyPanelWidget_2::CreateControlPanel | ( | wxWindow * | parent | ) | [private] |
Definition at line 384 of file wxEmptyPanelWidget_2.cxx.
References _branchLevel, _cleanTree_MH_JFC, _isoValue, _isoValue_MH_JFC, _opacity_OrigVol, _opacity_Res1VolJF, _opacity_Res2VolJF, _opacity_ResVolMHJF, _sensibility_JF, _sl_sensibility_JF, OnBranchLevel(), OnBtnEraseTree1_JF(), OnBtnEraseTree2_JF(), OnBtnEraseTree_MH_JFC(), OnBtnExtractTree1_JF(), OnBtnExtractTree2_JF(), OnBtnExtractTree_MH_JFC(), OnCleanTree_MH_JFC(), OnIsoValue(), OnIsoValue_MH_JFC(), OnOpacity_OrigVol(), OnOpacity_Res1VolJF(), OnOpacity_Res2VolJF(), OnOpacity_ResVolMHJF(), and OnSensibility().
Referenced by wxEmptyPanelWidget_2().
00385 { 00386 wxPanel *panel = new wxPanel(parent,-1); 00387 _opacity_OrigVol = new wxSlider( panel, -1, 30, 0, 100 , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS ); 00388 _isoValue = new wxSlider( panel, -1, 0 , 0, 3000, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS ); 00389 _opacity_Res1VolJF = new wxSlider( panel, -1, 25, 0, 100 , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS ); 00390 _opacity_Res2VolJF = new wxSlider( panel, -1, 25, 0, 100 , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS ); 00391 _sl_sensibility_JF = new wxSlider( panel, -1, 0 , 0, 100 , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS ); 00392 _branchLevel = new wxSlider( panel, -1, 2 , 1, 10 , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS ); 00393 _opacity_ResVolMHJF = new wxSlider( panel, -1, 25, 0, 100 , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS ); 00394 _isoValue_MH_JFC = new wxSlider( panel, -1, 0 , 0, 100 , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS ); 00395 _cleanTree_MH_JFC = new wxSlider( panel, -1, 400 , 0, 1000 , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS ); 00396 00397 int tmp_sensibility= (int)(_sensibility_JF*100.0); 00398 _sl_sensibility_JF->SetValue( tmp_sensibility ); 00399 00400 00401 _opacity_OrigVol ->SetSize(250,20); // Original Volume 00402 _isoValue ->SetSize(250,20); 00403 _opacity_Res1VolJF ->SetSize(250,20); // Result 1 Volume JF 00404 _opacity_Res2VolJF ->SetSize(250,20); // Result 2 Volume JF 00405 _branchLevel ->SetSize(250,20); 00406 _opacity_ResVolMHJF ->SetSize(250,20); // Result Volume MH+JFC 00407 00408 //Extract Tree 1 JF 00409 wxButton *btnExtractTree1_JF = new wxButton(panel,-1,_T("Extract Tree 1 JF")); 00410 wxButton *btnEraseTree1_JF = new wxButton(panel,-1,_T("Erase Tree 1 JF")); 00411 00412 //Extract Tree 2 JF 00413 wxButton *btnExtractTree2_JF = new wxButton(panel,-1,_T("Extract Tree 2 JF")); 00414 wxButton *btnEraseTree2_JF = new wxButton(panel,-1,_T("Erase Tree 2 JF")); 00415 00416 //Extract Tree MH + JF 00417 wxButton *btnExtractTree_MH_JFC = new wxButton(panel,-1,_T("Extract Tree MH + JFC")); 00418 wxButton *btnEraseTree_MH_JFC = new wxButton(panel,-1,_T("Erase Tree MH + JFC")); 00419 00420 00421 wxFlexGridSizer *sizer = new wxFlexGridSizer(1); 00422 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00423 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00424 sizer->Add(new wxStaticText(panel,-1,_T("Isovalue - Original Volume"))); 00425 sizer->Add(_isoValue); 00426 sizer->Add(new wxStaticText(panel,-1,_T("Opacity - Original Volume"))); 00427 sizer->Add(_opacity_OrigVol); 00428 00429 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00430 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00431 sizer->Add(new wxStaticText(panel,-1,_T(" - - - Juan Francisco Module 1 - - - "))); 00432 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00433 sizer->Add(btnExtractTree1_JF); 00434 sizer->Add(btnEraseTree1_JF); 00435 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00436 sizer->Add(new wxStaticText(panel,-1,_T("Opacity - Result Volume"))); 00437 sizer->Add(_opacity_Res1VolJF); 00438 00439 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00440 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00441 sizer->Add(new wxStaticText(panel,-1,_T(" - - - Juan Francisco Module 2 - - - "))); 00442 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00443 sizer->Add(new wxStaticText(panel,-1,_T(" % Sensibility"))); 00444 sizer->Add(_sl_sensibility_JF); 00445 sizer->Add(btnExtractTree2_JF); 00446 sizer->Add(btnEraseTree2_JF); 00447 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00448 sizer->Add(new wxStaticText(panel,-1,_T("Opacity - Result Volume"))); 00449 sizer->Add(_opacity_Res2VolJF); 00450 00451 00452 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00453 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00454 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00455 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00456 sizer->Add(new wxStaticText(panel,-1,_T(" - - - MH + JFC - - - "))); 00457 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00458 sizer->Add(btnExtractTree_MH_JFC); 00459 sizer->Add(btnEraseTree_MH_JFC); 00460 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00461 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00462 sizer->Add(new wxStaticText(panel,-1,_T("Branch Level MH+JFC"))); 00463 sizer->Add(_branchLevel); 00464 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00465 sizer->Add(new wxStaticText(panel,-1,_T("Opacity - Result Volume MH+JFC"))); 00466 sizer->Add(_opacity_ResVolMHJF); 00467 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00468 sizer->Add(new wxStaticText(panel,-1,_T("IsoValue - Result Volume MH+JFC"))); 00469 sizer->Add(_isoValue_MH_JFC); 00470 sizer->Add(new wxStaticText(panel,-1,_T(" "))); 00471 sizer->Add(new wxStaticText(panel,-1,_T("signal level (Clean Tree)"))); 00472 sizer->Add(_cleanTree_MH_JFC); 00473 00474 panel->SetSizer(sizer); 00475 panel->SetAutoLayout(true); 00476 panel->SetSize(400,400); 00477 panel->Layout(); 00478 Connect(_opacity_OrigVol->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnOpacity_OrigVol ); 00479 Connect(_isoValue->GetId() , wxEVT_SCROLL_THUMBRELEASE , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnIsoValue ); 00480 Connect(_opacity_Res1VolJF->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnOpacity_Res1VolJF ); 00481 Connect(_opacity_Res2VolJF->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnOpacity_Res2VolJF ); 00482 Connect(_sl_sensibility_JF->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnSensibility ); 00483 00484 Connect(btnExtractTree1_JF->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnBtnExtractTree1_JF ); 00485 Connect(btnEraseTree1_JF->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnBtnEraseTree1_JF ); 00486 Connect(btnExtractTree2_JF->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnBtnExtractTree2_JF ); 00487 Connect(btnEraseTree2_JF->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnBtnEraseTree2_JF ); 00488 00489 Connect(btnExtractTree_MH_JFC->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnBtnExtractTree_MH_JFC); 00490 Connect(btnEraseTree_MH_JFC->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnBtnEraseTree_MH_JFC ); 00491 Connect(_branchLevel->GetId() , wxEVT_SCROLL_THUMBRELEASE , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnBranchLevel ); 00492 Connect(_opacity_ResVolMHJF->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnOpacity_ResVolMHJF ); 00493 Connect(_isoValue_MH_JFC->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnIsoValue_MH_JFC ); 00494 Connect(_cleanTree_MH_JFC->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxEmptyPanelWidget_2::OnCleanTree_MH_JFC ); 00495 00496 return panel; 00497 }
wxPanel * wxEmptyPanelWidget_2::CreateViewPanel | ( | wxWindow * | parent | ) | [private] |
Definition at line 371 of file wxEmptyPanelWidget_2.cxx.
References _maracasSurfaceWidget.
Referenced by wxEmptyPanelWidget_2().
00372 { 00373 wxPanel *panel = new wxPanel(parent,-1); 00374 wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); 00375 _maracasSurfaceWidget = new wxSurfaceWidget(panel); 00376 sizer->Add(_maracasSurfaceWidget , 1, wxEXPAND, 0); 00377 panel->SetSizer(sizer); 00378 panel->SetAutoLayout(true); 00379 panel->SetSize(400,400); 00380 panel->Layout(); 00381 return panel; 00382 }
void wxEmptyPanelWidget_2::ExtractTree1_JF | ( | int | x, | |
int | y, | |||
int | z | |||
) | [private] |
Definition at line 609 of file wxEmptyPanelWidget_2.cxx.
References _1_isoActorMC6, _1_isoMapperMC6, _1_isoMC6, _1_mapfinal, _1_prgov, _1_stripfinal, marInterface::_experiment, _mar, _maracasSurfaceWidget, _opacity_Res1VolJF, marExperiment::getDynData(), vtk3DSurfaceWidget::GetRenderer(), marDynData::getVolume(), axisExtractor::GetVolumen(), wxSurfaceWidget::GetVtk3DSurfaceWidget(), axisExtractor::New(), axisExtractor::SetHumbral(), axisExtractor::SetInput(), and axisExtractor::SetPoint().
Referenced by OnBtnExtractTree1_JF().
00610 { 00611 double opacity_Res1VolJF = ((double)_opacity_Res1VolJF->GetValue())/100; 00612 vtkImageData *imagedata = _mar->_experiment->getDynData( )->getVolume( )->castVtk(); 00613 00614 double puntoactualprov[3]; 00615 double espprin[3]; 00616 int extprin[6]; 00617 00618 puntoactualprov[0]=x; 00619 puntoactualprov[1]=y; 00620 puntoactualprov[2]=z; 00621 00622 imagedata->GetSpacing(espprin); 00623 imagedata->GetExtent(extprin); 00624 00625 puntoactualprov[0]=puntoactualprov[0]*espprin[0]; 00626 puntoactualprov[1]=puntoactualprov[1]*espprin[1]; 00627 puntoactualprov[2]=puntoactualprov[2]*espprin[2]; 00628 00629 // Juan Francisco Carrillo Filter 00630 _1_prgov= axisExtractor::New(); 00631 _1_prgov->SetHumbral(0.45); 00632 _1_prgov->SetInput(imagedata); 00633 _1_prgov->SetPoint(puntoactualprov); 00634 _1_prgov->Update(); 00635 00636 // Visualisation - result vascular tree 00637 _1_mapfinal = vtkPolyDataMapper::New(); 00638 _1_mapfinal->SetInput(_1_prgov->GetOutput()); 00639 00640 _1_stripfinal = vtkActor::New(); 00641 _1_stripfinal->SetMapper(_1_mapfinal); 00642 _1_stripfinal->GetProperty()->SetColor(1, 1, 1); 00643 _1_stripfinal->GetProperty()->SetLineWidth(2); 00644 _1_stripfinal->GetProperty()->BackfaceCullingOff(); 00645 00646 // Visualisation - result volume 00647 vtkImageData *imageOut = _1_prgov->GetVolumen(); 00648 imageOut->Update(); 00649 00650 _1_isoMC6 = vtkMarchingCubes::New(); 00651 _1_isoMC6->SetInput(imageOut); 00652 _1_isoMC6->SetValue(0, 1); 00653 _1_isoMC6->Update(); 00654 00655 _1_isoMapperMC6 = vtkPolyDataMapper::New(); 00656 _1_isoMapperMC6->SetInput(_1_isoMC6->GetOutput()); 00657 _1_isoMapperMC6->ScalarVisibilityOff(); 00658 _1_isoMapperMC6->ImmediateModeRenderingOn(); 00659 00660 _1_isoActorMC6 = vtkActor::New(); 00661 _1_isoActorMC6->SetMapper(_1_isoMapperMC6); 00662 _1_isoActorMC6->GetProperty()->SetColor( 0, 1, 0); 00663 _1_isoActorMC6->GetProperty()->SetOpacity( opacity_Res1VolJF ); 00664 00665 00666 // Interface Update 00667 vtkRenderer *ren = _maracasSurfaceWidget->GetVtk3DSurfaceWidget()->GetRenderer(); 00668 ren->AddActor(_1_isoActorMC6); 00669 ren->AddActor(_1_stripfinal); 00670 }
void wxEmptyPanelWidget_2::ExtractTree2_JF | ( | int | x, | |
int | y, | |||
int | z | |||
) | [private] |
Definition at line 674 of file wxEmptyPanelWidget_2.cxx.
References _2_isoActorMC6, _2_isoMapperMC6, _2_isoMC6, _2_mapfinal, _2_prgov, _2_stripfinal, marInterface::_experiment, _mar, _maracasSurfaceWidget, _opacity_Res2VolJF, _sensibility_JF, marExperiment::getDynData(), axisExtractor02::GetOutput(), vtk3DSurfaceWidget::GetRenderer(), marDynData::getVolume(), axisExtractor02::GetVolumen(), wxSurfaceWidget::GetVtk3DSurfaceWidget(), axisExtractor02::New(), axisExtractor02::SetInput(), axisExtractor02::SetMaxant(), axisExtractor02::SetMinant(), axisExtractor02::SetParam(), axisExtractor02::SetParam2(), axisExtractor02::SetParam3(), and axisExtractor02::SetPoint().
Referenced by OnBtnExtractTree2_JF().
00675 { 00676 double opacity_Res2VolJF = ((double)_opacity_Res2VolJF->GetValue())/100; 00677 vtkImageData *imagedata = _mar->_experiment->getDynData( )->getVolume( )->castVtk(); 00678 00679 double puntoactualprov[3]; 00680 double espprin[3]; 00681 int extprin[6]; 00682 00683 puntoactualprov[0]=x; 00684 puntoactualprov[1]=y; 00685 puntoactualprov[2]=z; 00686 00687 imagedata->GetSpacing(espprin); 00688 imagedata->GetExtent(extprin); 00689 00690 puntoactualprov[0]=puntoactualprov[0]*espprin[0]; 00691 puntoactualprov[1]=puntoactualprov[1]*espprin[1]; 00692 puntoactualprov[2]=puntoactualprov[2]*espprin[2]; 00693 00694 _2_prgov= axisExtractor02::New(); 00695 _2_prgov->SetParam(1); 00696 _2_prgov->SetParam2(1); 00697 _2_prgov->SetParam3(_sensibility_JF); 00698 _2_prgov->SetMaxant(20); 00699 _2_prgov->SetMinant(5); 00700 _2_prgov->SetInput(imagedata); 00701 _2_prgov->SetPoint(puntoactualprov); 00702 _2_prgov->Update(); 00703 00704 // Visualisation - result vascular tree 00705 _2_mapfinal = vtkPolyDataMapper::New(); 00706 _2_mapfinal->SetInput(_2_prgov->GetOutput()); 00707 00708 _2_stripfinal = vtkActor::New(); 00709 _2_stripfinal->SetMapper(_2_mapfinal); 00710 _2_stripfinal->GetProperty()->SetColor(0.3, 0.3, 0.3); 00711 _2_stripfinal->GetProperty()->SetLineWidth(2); 00712 _2_stripfinal->GetProperty()->BackfaceCullingOff(); 00713 00714 // Visualisation - result volume 00715 vtkImageData *imageOut = _2_prgov->GetVolumen(); 00716 imageOut->Update(); 00717 00718 _2_isoMC6 = vtkMarchingCubes::New(); 00719 _2_isoMC6->SetInput(imageOut); 00720 _2_isoMC6->SetValue(0, 1); 00721 _2_isoMC6->Update(); 00722 00723 _2_isoMapperMC6 = vtkPolyDataMapper::New(); 00724 _2_isoMapperMC6->SetInput(_2_isoMC6->GetOutput()); 00725 _2_isoMapperMC6->ScalarVisibilityOff(); 00726 _2_isoMapperMC6->ImmediateModeRenderingOn(); 00727 00728 _2_isoActorMC6 = vtkActor::New(); 00729 _2_isoActorMC6->SetMapper(_2_isoMapperMC6); 00730 _2_isoActorMC6->GetProperty()->SetColor( 1, 1, 0); 00731 _2_isoActorMC6->GetProperty()->SetOpacity( opacity_Res2VolJF ); 00732 00733 // Interface Update 00734 vtkRenderer *ren = _maracasSurfaceWidget->GetVtk3DSurfaceWidget()->GetRenderer(); 00735 ren->AddActor(_2_isoActorMC6); 00736 ren->AddActor(_2_stripfinal); 00737 }
void wxEmptyPanelWidget_2::OnBranchLevel | ( | wxScrollEvent & | event | ) |
Definition at line 1047 of file wxEmptyPanelWidget_2.cxx.
Referenced by CreateControlPanel().
void wxEmptyPanelWidget_2::OnBtnEraseTree1_JF | ( | wxCommandEvent & | event | ) |
Definition at line 801 of file wxEmptyPanelWidget_2.cxx.
References Refresh(), and ResetTree1_JF().
Referenced by CreateControlPanel().
00802 { 00803 ResetTree1_JF(); 00804 Refresh(); 00805 }
void wxEmptyPanelWidget_2::OnBtnEraseTree2_JF | ( | wxCommandEvent & | event | ) |
Definition at line 807 of file wxEmptyPanelWidget_2.cxx.
References Refresh(), and ResetTree2_JF().
Referenced by CreateControlPanel().
00808 { 00809 ResetTree2_JF(); 00810 Refresh(); 00811 }
void wxEmptyPanelWidget_2::OnBtnEraseTree_MH_JFC | ( | wxCommandEvent & | event | ) |
Definition at line 979 of file wxEmptyPanelWidget_2.cxx.
References Refresh(), and ResetTree_MH_JFC().
Referenced by CreateControlPanel().
00980 { 00981 ResetTree_MH_JFC(); 00982 Refresh(); 00983 }
void wxEmptyPanelWidget_2::OnBtnExtractTree1_JF | ( | wxCommandEvent & | event | ) |
Definition at line 773 of file wxEmptyPanelWidget_2.cxx.
References _1_prgov, _maracasSurfaceWidget, ExtractTree1_JF(), vtk3DSurfaceWidget::GetSphereCenter(), wxSurfaceWidget::GetVtk3DSurfaceWidget(), and Refresh().
Referenced by CreateControlPanel().
00774 { 00775 if (_1_prgov==NULL){ 00776 wxBusyCursor wait; 00777 vtk3DSurfaceWidget *world3D = _maracasSurfaceWidget->GetVtk3DSurfaceWidget(); 00778 if( world3D->GetInitialSphere() ){ 00779 double point[3]; 00780 world3D->GetSphereCenter( point ); 00781 ExtractTree1_JF((int)point[0],(int)point[1],(int)point[2]); 00782 } 00783 Refresh(); 00784 } 00785 }
void wxEmptyPanelWidget_2::OnBtnExtractTree2_JF | ( | wxCommandEvent & | event | ) |
Definition at line 787 of file wxEmptyPanelWidget_2.cxx.
References _2_prgov, _maracasSurfaceWidget, ExtractTree2_JF(), vtk3DSurfaceWidget::GetSphereCenter(), wxSurfaceWidget::GetVtk3DSurfaceWidget(), and Refresh().
Referenced by CreateControlPanel().
00788 { 00789 if (_2_prgov==NULL){ 00790 wxBusyCursor wait; 00791 vtk3DSurfaceWidget *world3D = _maracasSurfaceWidget->GetVtk3DSurfaceWidget(); 00792 if( world3D->GetInitialSphere() ){ 00793 double point[3]; 00794 world3D->GetSphereCenter( point ); 00795 ExtractTree2_JF((int)point[0],(int)point[1],(int)point[2]); 00796 } 00797 Refresh(); 00798 } 00799 }
void wxEmptyPanelWidget_2::OnBtnExtractTree_MH_JFC | ( | wxCommandEvent & | event | ) |
Definition at line 928 of file wxEmptyPanelWidget_2.cxx.
References _branchLevel, _cleanTree_MH_JFC, marInterface::_experiment, _lstBranchActor, _mar, _maracasSurfaceWidget, _treeExtraction, marExperiment::getDynData(), marObject::getParameters(), vtk3DSurfaceWidget::GetSphereCenter(), marExperiment::getVOI(), TreeExtraction_MH_JFC::GetVolume(), marDynData::getVolume(), wxSurfaceWidget::GetVtk3DSurfaceWidget(), marExperiment::initExperiment(), TreeExtraction_MH_JFC::New(), PaintVascularTree_MH_JFC(), PaintVascularVolume_MH_JFC(), Refresh(), TreeExtraction_MH_JFC::SetBranchLevel(), TreeExtraction_MH_JFC::SetCleanTreeLevel(), TreeExtraction_MH_JFC::SetInput(), marExperiment::setStartPoint(), marExperiment::setVOI(), TreeExtraction_MH_JFC::Update(), and WriteSignals().
Referenced by CreateControlPanel().
00929 { 00930 if ((_lstBranchActor.size()==0) 00931 && 00932 (_maracasSurfaceWidget->GetVtk3DSurfaceWidget()->GetInitialSphere() ) ) 00933 { 00934 wxBusyCursor wait; 00935 00936 // Copie Volume 00937 int voiA[6]; 00938 int voiB[6]; 00939 _mar->_experiment->getVOI(voiA); 00940 voiB[0]=0; 00941 voiB[1]=voiA[1]-voiA[0]; 00942 voiB[2]=0; 00943 voiB[3]=voiA[3]-voiA[2]; 00944 voiB[4]=0; 00945 voiB[5]=voiA[5]-voiA[4]; 00946 marExperiment *newExperiment = new marExperiment( _mar->_experiment->getParameters() ); 00947 newExperiment->setVOI( voiB ); 00948 newExperiment->initExperiment( _mar->_experiment->getDynData( )->getVolume() ); 00949 00950 double point[3]; 00951 int extent[ 6 ]; 00952 _mar->_experiment->getDynData( )->getVolume( )->castVtk()->GetExtent( extent ); 00953 _maracasSurfaceWidget->GetVtk3DSurfaceWidget()->GetSphereCenter( point ); 00954 int x = (int)point[0] - extent[0]; 00955 int y = (int)point[1] - extent[2]; 00956 int z = (int)point[2] - extent[4]; 00957 newExperiment->setStartPoint( x, y, z); 00958 00959 // Vascular tree extraction 00960 _treeExtraction = TreeExtraction_MH_JFC::New(); 00961 _treeExtraction->SetInput(newExperiment); 00962 _treeExtraction->SetCleanTreeLevel( _cleanTree_MH_JFC->GetValue() ); 00963 _treeExtraction->SetBranchLevel( _branchLevel->GetValue() ); 00964 _treeExtraction->Update(); 00965 00966 //Paint Vascular Tree 00967 PaintVascularTree_MH_JFC(newExperiment); 00968 //Paint Vascular Volume 00969 PaintVascularVolume_MH_JFC( _treeExtraction->GetVolume() ); 00970 Refresh( ); 00971 00972 WriteSignals(newExperiment); 00973 00974 // Clening memory 00975 delete newExperiment; 00976 } 00977 }
void wxEmptyPanelWidget_2::OnCleanTree_MH_JFC | ( | wxScrollEvent & | event | ) |
Definition at line 1066 of file wxEmptyPanelWidget_2.cxx.
Referenced by CreateControlPanel().
void wxEmptyPanelWidget_2::OnIsoValue | ( | wxScrollEvent & | event | ) |
Definition at line 766 of file wxEmptyPanelWidget_2.cxx.
References _isoValue, _mCubes, and Refresh().
Referenced by CreateControlPanel().
00767 { 00768 wxBusyCursor wait; 00769 _mCubes->SetValue(0, _isoValue->GetValue()); 00770 Refresh(); 00771 }
void wxEmptyPanelWidget_2::OnIsoValue_MH_JFC | ( | wxScrollEvent & | event | ) |
Definition at line 1052 of file wxEmptyPanelWidget_2.cxx.
References _imageThresholdMC1, _isoValue_MH_JFC, and Refresh().
Referenced by CreateControlPanel().
01053 { 01054 if (_imageThresholdMC1!=NULL){ 01055 wxBusyCursor wait; 01056 double threshold = _isoValue_MH_JFC->GetValue(); 01057 if (threshold!=0){ 01058 _imageThresholdMC1->ThresholdBetween(threshold, threshold ); 01059 } else { 01060 _imageThresholdMC1->ThresholdBetween(0, 1000 ); 01061 } 01062 Refresh(); 01063 } 01064 }
void wxEmptyPanelWidget_2::OnOpacity_OrigVol | ( | wxScrollEvent & | event | ) |
Definition at line 740 of file wxEmptyPanelWidget_2.cxx.
References _opacity_OrigVol, _surfActor, and Refresh().
Referenced by CreateControlPanel().
00741 { 00742 double value = ((double)_opacity_OrigVol->GetValue())/100; 00743 _surfActor->GetProperty( )->SetOpacity( value ); 00744 Refresh(); 00745 }
void wxEmptyPanelWidget_2::OnOpacity_Res1VolJF | ( | wxScrollEvent & | event | ) |
Definition at line 747 of file wxEmptyPanelWidget_2.cxx.
References _1_isoActorMC6, _opacity_Res1VolJF, and Refresh().
Referenced by CreateControlPanel().
00748 { 00749 if (_1_isoActorMC6!=NULL){ 00750 double value = ((double)_opacity_Res1VolJF->GetValue())/100; 00751 _1_isoActorMC6->GetProperty( )->SetOpacity( value ); 00752 Refresh(); 00753 } 00754 }
void wxEmptyPanelWidget_2::OnOpacity_Res2VolJF | ( | wxScrollEvent & | event | ) |
Definition at line 756 of file wxEmptyPanelWidget_2.cxx.
References _2_isoActorMC6, _opacity_Res2VolJF, and Refresh().
Referenced by CreateControlPanel().
00757 { 00758 if (_2_isoActorMC6!=NULL){ 00759 double value = ((double)_opacity_Res2VolJF->GetValue())/100; 00760 _2_isoActorMC6->GetProperty( )->SetOpacity( value ); 00761 Refresh(); 00762 } 00763 }
void wxEmptyPanelWidget_2::OnOpacity_ResVolMHJF | ( | wxScrollEvent & | event | ) |
Definition at line 1038 of file wxEmptyPanelWidget_2.cxx.
References _isoActorMC1, _opacity_ResVolMHJF, and Refresh().
Referenced by CreateControlPanel().
01039 { 01040 if (_isoActorMC1!=NULL){ 01041 double value = ((double)_opacity_ResVolMHJF->GetValue())/100; 01042 _isoActorMC1->GetProperty( )->SetOpacity( value ); 01043 } 01044 Refresh(); 01045 }
void wxEmptyPanelWidget_2::OnSensibility | ( | wxScrollEvent & | event | ) |
Definition at line 1071 of file wxEmptyPanelWidget_2.cxx.
References _sensibility_JF, and _sl_sensibility_JF.
Referenced by CreateControlPanel().
01072 { 01073 _sensibility_JF = (double)(_sl_sensibility_JF->GetValue())/100; 01074 }
void wxEmptyPanelWidget_2::PaintVascularTree_MH_JFC | ( | marExperiment * | newExperiment | ) | [private] |
Definition at line 814 of file wxEmptyPanelWidget_2.cxx.
References _lstAxisVtk, _lstBranchActor, _lstBranchMapper, _maracasSurfaceWidget, marAxis::Draw(), marExperiment::getAxis(), marExperiment::getNumberOfAxes(), vtk3DSurfaceWidget::GetRenderer(), wxSurfaceWidget::GetVtk3DSurfaceWidget(), and marExperiment::setAxis().
Referenced by OnBtnExtractTree_MH_JFC().
00815 { 00816 vtkActor *branchActor; 00817 vtkPolyData *axisVtk; 00818 vtkPolyDataMapper *branchMapper; 00819 vtkRenderer *ren = _maracasSurfaceWidget->GetVtk3DSurfaceWidget()->GetRenderer(); 00820 00821 int i,maxAxis=newExperiment->getNumberOfAxes(); 00822 for (i=0;i<maxAxis;i++){ 00823 newExperiment->setAxis(i); 00824 marAxis *maraxis =newExperiment->getAxis( ); 00825 if (maraxis!=NULL) { 00826 axisVtk = maraxis->Draw(); 00827 branchMapper = vtkPolyDataMapper::New( ); 00828 branchMapper->SetInput( axisVtk ); 00829 branchMapper->Update(); 00830 branchActor = vtkActor::New( ); 00831 branchActor->SetMapper( branchMapper ); 00832 branchActor->GetProperty()->SetColor( 1, 1, 1 ); 00833 if (i== 0) { branchActor->GetProperty()->SetColor( 0 , 0 , 0.3 ); } 00834 if (i== 1) { branchActor->GetProperty()->SetColor( 0 , 0.3 , 0.3 ); } 00835 if (i== 2) { branchActor->GetProperty()->SetColor( 0.3, 0.3 , 0.3 ); } 00836 if (i== 3) { branchActor->GetProperty()->SetColor( 0.0, 0.0 , 0.6 ); } 00837 if (i== 4) { branchActor->GetProperty()->SetColor( 0.0, 0.6 , 0.6 ); } 00838 if (i== 5) { branchActor->GetProperty()->SetColor( 0.6, 0.6 , 0.6 ); } 00839 if (i== 7) { branchActor->GetProperty()->SetColor( 0.0, 0.0 , 0.9 ); } 00840 if (i== 8) { branchActor->GetProperty()->SetColor( 0.0, 0.9 , 0.9 ); } 00841 if (i== 9) { branchActor->GetProperty()->SetColor( 0.9, 0.9 , 0.9 ); } 00842 if (i==10) { branchActor->GetProperty()->SetColor( 0.9, 0.0 , 0.0 ); } 00843 if (i==11) { branchActor->GetProperty()->SetColor( 0.6, 0.0 , 0.0 ); } 00844 if (i==12) { branchActor->GetProperty()->SetColor( 0.3, 0.0 , 0.0 ); } 00845 if (i==13) { branchActor->GetProperty()->SetColor( 0.6, 0.6 , 0.0 ); } 00846 if (i==14) { branchActor->GetProperty()->SetColor( 0.3, 0.3 , 0.0 ); } 00847 if (i==15) { branchActor->GetProperty()->SetColor( 0.9, 0.9 , 0.0 ); } 00848 branchActor->GetProperty()->SetLineWidth( 2.0 ); 00849 ren->AddActor( branchActor ); 00850 00851 _lstAxisVtk.push_back( axisVtk ); 00852 _lstBranchActor.push_back( branchActor ); 00853 _lstBranchMapper.push_back( branchMapper ); 00854 } 00855 } 00856 }
void wxEmptyPanelWidget_2::PaintVascularVolume_MH_JFC | ( | vtkImageData * | image | ) | [private] |
Definition at line 860 of file wxEmptyPanelWidget_2.cxx.
References _imageThresholdMC1, _isoActorMC1, _isoMapperMC1, _isoMC1, _maracasSurfaceWidget, vtk3DSurfaceWidget::GetRenderer(), and wxSurfaceWidget::GetVtk3DSurfaceWidget().
Referenced by OnBtnExtractTree_MH_JFC().
00861 { 00862 00863 // Visualisation - result volume 00864 image->Update(); 00865 00866 _imageThresholdMC1=vtkImageThreshold::New(); 00867 _imageThresholdMC1->SetInput(image); 00868 _imageThresholdMC1->ThresholdBetween(0,100); 00869 _imageThresholdMC1->SetOutValue ( 0 ); 00870 _imageThresholdMC1->Update(); 00871 00872 _isoMC1 = vtkMarchingCubes::New(); 00873 _isoMC1->SetInput(_imageThresholdMC1->GetOutput() ); 00874 _isoMC1->SetValue(0, 1); 00875 _isoMC1->Update(); 00876 00877 _isoMapperMC1 = vtkPolyDataMapper::New(); 00878 _isoMapperMC1->SetInput(_isoMC1->GetOutput()); 00879 _isoMapperMC1->ScalarVisibilityOff(); 00880 _isoMapperMC1->ImmediateModeRenderingOn(); 00881 _isoMapperMC1->Update(); 00882 00883 _isoActorMC1 = vtkActor::New(); 00884 _isoActorMC1->SetMapper(_isoMapperMC1); 00885 _isoActorMC1->GetProperty()->SetColor( 1, 0, 0); 00886 _isoActorMC1->GetProperty()->SetOpacity( 0.4 ); 00887 00888 // Interface Update 00889 vtkRenderer *ren = _maracasSurfaceWidget->GetVtk3DSurfaceWidget()->GetRenderer(); 00890 ren->AddActor(_isoActorMC1); 00891 }
void wxEmptyPanelWidget_2::Refresh | ( | ) |
Definition at line 499 of file wxEmptyPanelWidget_2.cxx.
References _maracasSurfaceWidget, wxSurfaceWidget::GetVtk3DSurfaceWidget(), and vtk3DSurfaceWidget::Render().
Referenced by OnBtnEraseTree1_JF(), OnBtnEraseTree2_JF(), OnBtnEraseTree_MH_JFC(), OnBtnExtractTree1_JF(), OnBtnExtractTree2_JF(), OnBtnExtractTree_MH_JFC(), OnIsoValue(), OnIsoValue_MH_JFC(), OnOpacity_OrigVol(), OnOpacity_Res1VolJF(), OnOpacity_Res2VolJF(), and OnOpacity_ResVolMHJF().
00500 { 00501 _maracasSurfaceWidget->GetVtk3DSurfaceWidget()->Render(); 00502 }
void wxEmptyPanelWidget_2::ResetTree1_JF | ( | ) | [private] |
Definition at line 549 of file wxEmptyPanelWidget_2.cxx.
References _1_isoActorMC6, _1_isoMapperMC6, _1_isoMC6, _1_mapfinal, _1_prgov, _1_stripfinal, _maracasSurfaceWidget, vtk3DSurfaceWidget::GetRenderer(), and wxSurfaceWidget::GetVtk3DSurfaceWidget().
Referenced by OnBtnEraseTree1_JF(), and ~wxEmptyPanelWidget_2().
00550 { 00551 // Remove 00552 vtkRenderer *ren = _maracasSurfaceWidget->GetVtk3DSurfaceWidget()->GetRenderer(); 00553 if (_1_isoActorMC6){ 00554 ren->RemoveActor(_1_isoActorMC6); 00555 } 00556 if (_1_stripfinal){ 00557 ren->RemoveActor(_1_stripfinal); 00558 } 00559 00560 // Delete 00561 if (_1_prgov ) { _1_prgov -> Delete(); } 00562 if (_1_mapfinal ) { _1_mapfinal -> Delete(); } 00563 if (_1_stripfinal ) { _1_stripfinal -> Delete(); } 00564 if (_1_isoMapperMC6 ) { _1_isoMapperMC6 -> Delete(); } 00565 if (_1_isoActorMC6 ) { _1_isoActorMC6 -> Delete(); } 00566 if (_1_isoMC6 ) { _1_isoMC6 -> Delete(); } 00567 00568 // Init 00569 _1_prgov = NULL; 00570 _1_mapfinal = NULL; 00571 _1_stripfinal = NULL; 00572 _1_isoMapperMC6 = NULL; 00573 _1_isoActorMC6 = NULL; 00574 _1_isoMC6 = NULL; 00575 }
void wxEmptyPanelWidget_2::ResetTree2_JF | ( | ) | [private] |
Definition at line 578 of file wxEmptyPanelWidget_2.cxx.
References _2_isoActorMC6, _2_isoMapperMC6, _2_isoMC6, _2_mapfinal, _2_prgov, _2_stripfinal, _maracasSurfaceWidget, vtk3DSurfaceWidget::GetRenderer(), and wxSurfaceWidget::GetVtk3DSurfaceWidget().
Referenced by OnBtnEraseTree2_JF(), and ~wxEmptyPanelWidget_2().
00579 { 00580 // Remove 00581 vtkRenderer *ren = _maracasSurfaceWidget->GetVtk3DSurfaceWidget()->GetRenderer(); 00582 if (_2_isoActorMC6){ 00583 ren->RemoveActor(_2_isoActorMC6); 00584 } 00585 if (_2_stripfinal){ 00586 ren->RemoveActor(_2_stripfinal); 00587 } 00588 00589 // Delete 00590 if (_2_prgov ) { _2_prgov -> Delete(); } 00591 if (_2_mapfinal ) { _2_mapfinal -> Delete(); } 00592 if (_2_stripfinal ) { _2_stripfinal -> Delete(); } 00593 if (_2_isoMapperMC6 ) { _2_isoMapperMC6 -> Delete(); } 00594 if (_2_isoActorMC6 ) { _2_isoActorMC6 -> Delete(); } 00595 if (_2_isoMC6 ) { _2_isoMC6 -> Delete(); } 00596 00597 // Init 00598 _2_prgov = NULL; 00599 _2_mapfinal = NULL; 00600 _2_stripfinal = NULL; 00601 _2_isoMapperMC6 = NULL; 00602 _2_isoActorMC6 = NULL; 00603 _2_isoMC6 = NULL; 00604 }
void wxEmptyPanelWidget_2::ResetTree_MH_JFC | ( | ) | [private] |
Definition at line 986 of file wxEmptyPanelWidget_2.cxx.
References _imageThresholdMC1, _isoActorMC1, _isoMapperMC1, _isoMC1, _lstAxisVtk, _lstBranchActor, _lstBranchMapper, _maracasSurfaceWidget, vtk3DSurfaceWidget::GetRenderer(), and wxSurfaceWidget::GetVtk3DSurfaceWidget().
Referenced by OnBtnEraseTree_MH_JFC(), and ~wxEmptyPanelWidget_2().
00987 { 00988 // Remove 00989 vtkRenderer *ren = _maracasSurfaceWidget->GetVtk3DSurfaceWidget()->GetRenderer(); 00990 int i,size; 00991 size=_lstAxisVtk.size(); 00992 size=_lstBranchMapper.size(); 00993 size=_lstBranchActor.size(); 00994 for (i=0;i<size;i++){ 00995 if (_lstBranchActor[i]!=NULL){ 00996 ren->RemoveActor( _lstBranchActor[i] ); 00997 } 00998 } 00999 for (i=0;i<size;i++){ 01000 // Delete 01001 if (_lstAxisVtk[i] != NULL ) { _lstAxisVtk[i] -> Delete(); } 01002 // if (_lstBranchMapper[i] != NULL ) { _lstBranchMapper[i] -> Delete(); } 01003 if (_lstBranchActor[i] != NULL ) { _lstBranchActor[i] -> Delete(); } 01004 // Init 01005 _lstAxisVtk[i] = NULL; 01006 _lstBranchActor[i] = NULL; 01007 _lstBranchMapper[i] = NULL; 01008 } 01009 _lstAxisVtk.clear(); 01010 _lstBranchActor.clear(); 01011 _lstBranchMapper.clear(); 01012 01013 // Remove 01014 if (_isoActorMC1){ 01015 ren->RemoveActor(_isoActorMC1); 01016 } 01017 01018 // Delete 01019 if (_isoMapperMC1 ) { _isoMapperMC1 -> Delete(); } 01020 if (_isoActorMC1 ) { _isoActorMC1 -> Delete(); } 01021 if (_isoMC1 ) { _isoMC1 -> Delete(); } 01022 if (_imageThresholdMC1 ) { _imageThresholdMC1 -> Delete(); } 01023 01024 01025 // Init 01026 _isoMapperMC1 = NULL; 01027 _isoActorMC1 = NULL; 01028 _isoMC1 = NULL; 01029 _imageThresholdMC1 = NULL; 01030 01031 // 01032 // if (_treeExtraction ) { _treeExtraction -> Delete(); } // EED 01033 // _treeExtraction=NULL; 01034 01035 }
void wxEmptyPanelWidget_2::WriteSignals | ( | marExperiment * | newExperiment | ) | [private] |
Definition at line 894 of file wxEmptyPanelWidget_2.cxx.
References marExperiment::getAxis(), marExperiment::getNumberOfAxes(), marAxis::getSignal(), and marExperiment::setAxis().
Referenced by OnBtnExtractTree_MH_JFC().
00894 { 00895 int i = 0; 00896 int j = 0; 00897 bool ok = true; 00898 int value = 0; 00899 int maxAxis = newExperiment->getNumberOfAxes(); 00900 00901 FILE *ff; 00902 ff=fopen("c:/Temp/MaracasTEMP.TXT", "w"); 00903 00904 while (ok==true){ 00905 ok=false; 00906 for (i=0;i<maxAxis;i++){ 00907 newExperiment->setAxis(i); 00908 marAxis *maraxis =newExperiment->getAxis( ); 00909 if (maraxis!=NULL) { 00910 if ( j < maraxis->getNumberOfControlPoints() ){ 00911 ok=true; 00912 value= (int) (maraxis->getSignal((uint)j) ); 00913 fprintf(ff,"%d\t", value ); 00914 } else { 00915 fprintf(ff,"\t"); 00916 } 00917 } 00918 } 00919 fprintf(ff,"\n" ); 00920 j++; 00921 } 00922 fclose(ff); 00923 00924 }
vtkActor* wxEmptyPanelWidget_2::_1_isoActorMC6 [private] |
Definition at line 93 of file wxEmptyPanelWidget_2.h.
Referenced by ExtractTree1_JF(), OnOpacity_Res1VolJF(), ResetTree1_JF(), and wxEmptyPanelWidget_2().
vtkPolyDataMapper* wxEmptyPanelWidget_2::_1_isoMapperMC6 [private] |
Definition at line 92 of file wxEmptyPanelWidget_2.h.
Referenced by ExtractTree1_JF(), ResetTree1_JF(), and wxEmptyPanelWidget_2().
vtkMarchingCubes* wxEmptyPanelWidget_2::_1_isoMC6 [private] |
Definition at line 94 of file wxEmptyPanelWidget_2.h.
Referenced by ExtractTree1_JF(), ResetTree1_JF(), and wxEmptyPanelWidget_2().
vtkPolyDataMapper* wxEmptyPanelWidget_2::_1_mapfinal [private] |
Definition at line 90 of file wxEmptyPanelWidget_2.h.
Referenced by ExtractTree1_JF(), ResetTree1_JF(), and wxEmptyPanelWidget_2().
axisExtractor* wxEmptyPanelWidget_2::_1_prgov [private] |
Definition at line 89 of file wxEmptyPanelWidget_2.h.
Referenced by ExtractTree1_JF(), OnBtnExtractTree1_JF(), ResetTree1_JF(), and wxEmptyPanelWidget_2().
vtkActor* wxEmptyPanelWidget_2::_1_stripfinal [private] |
Definition at line 91 of file wxEmptyPanelWidget_2.h.
Referenced by ExtractTree1_JF(), ResetTree1_JF(), and wxEmptyPanelWidget_2().
vtkActor* wxEmptyPanelWidget_2::_2_isoActorMC6 [private] |
Definition at line 101 of file wxEmptyPanelWidget_2.h.
Referenced by ExtractTree2_JF(), OnOpacity_Res2VolJF(), ResetTree2_JF(), and wxEmptyPanelWidget_2().
vtkPolyDataMapper* wxEmptyPanelWidget_2::_2_isoMapperMC6 [private] |
Definition at line 100 of file wxEmptyPanelWidget_2.h.
Referenced by ExtractTree2_JF(), ResetTree2_JF(), and wxEmptyPanelWidget_2().
vtkMarchingCubes* wxEmptyPanelWidget_2::_2_isoMC6 [private] |
Definition at line 102 of file wxEmptyPanelWidget_2.h.
Referenced by ExtractTree2_JF(), ResetTree2_JF(), and wxEmptyPanelWidget_2().
vtkPolyDataMapper* wxEmptyPanelWidget_2::_2_mapfinal [private] |
Definition at line 98 of file wxEmptyPanelWidget_2.h.
Referenced by ExtractTree2_JF(), ResetTree2_JF(), and wxEmptyPanelWidget_2().
axisExtractor02* wxEmptyPanelWidget_2::_2_prgov [private] |
Definition at line 97 of file wxEmptyPanelWidget_2.h.
Referenced by ExtractTree2_JF(), OnBtnExtractTree2_JF(), ResetTree2_JF(), and wxEmptyPanelWidget_2().
vtkActor* wxEmptyPanelWidget_2::_2_stripfinal [private] |
Definition at line 99 of file wxEmptyPanelWidget_2.h.
Referenced by ExtractTree2_JF(), ResetTree2_JF(), and wxEmptyPanelWidget_2().
wxSlider* wxEmptyPanelWidget_2::_branchLevel [private] |
Definition at line 121 of file wxEmptyPanelWidget_2.h.
Referenced by CreateControlPanel(), and OnBtnExtractTree_MH_JFC().
wxSlider* wxEmptyPanelWidget_2::_cleanTree_MH_JFC [private] |
Definition at line 124 of file wxEmptyPanelWidget_2.h.
Referenced by CreateControlPanel(), and OnBtnExtractTree_MH_JFC().
vtkImageThreshold* wxEmptyPanelWidget_2::_imageThresholdMC1 [private] |
Definition at line 110 of file wxEmptyPanelWidget_2.h.
Referenced by OnIsoValue_MH_JFC(), PaintVascularVolume_MH_JFC(), ResetTree_MH_JFC(), and wxEmptyPanelWidget_2().
Definition at line 126 of file wxEmptyPanelWidget_2.h.
vtkActor* wxEmptyPanelWidget_2::_isoActorMC1 [private] |
Definition at line 108 of file wxEmptyPanelWidget_2.h.
Referenced by OnOpacity_ResVolMHJF(), PaintVascularVolume_MH_JFC(), ResetTree_MH_JFC(), and wxEmptyPanelWidget_2().
vtkPolyDataMapper* wxEmptyPanelWidget_2::_isoMapperMC1 [private] |
Definition at line 107 of file wxEmptyPanelWidget_2.h.
Referenced by PaintVascularVolume_MH_JFC(), ResetTree_MH_JFC(), and wxEmptyPanelWidget_2().
vtkMarchingCubes* wxEmptyPanelWidget_2::_isoMC1 [private] |
Definition at line 109 of file wxEmptyPanelWidget_2.h.
Referenced by PaintVascularVolume_MH_JFC(), ResetTree_MH_JFC(), and wxEmptyPanelWidget_2().
wxSlider* wxEmptyPanelWidget_2::_isoValue [private] |
Definition at line 120 of file wxEmptyPanelWidget_2.h.
Referenced by ConfigureVTK(), CreateControlPanel(), and OnIsoValue().
wxSlider* wxEmptyPanelWidget_2::_isoValue_MH_JFC [private] |
Definition at line 123 of file wxEmptyPanelWidget_2.h.
Referenced by CreateControlPanel(), and OnIsoValue_MH_JFC().
std::vector< vtkPolyData* > wxEmptyPanelWidget_2::_lstAxisVtk [private] |
Definition at line 113 of file wxEmptyPanelWidget_2.h.
Referenced by PaintVascularTree_MH_JFC(), and ResetTree_MH_JFC().
std::vector< vtkActor* > wxEmptyPanelWidget_2::_lstBranchActor [private] |
Definition at line 112 of file wxEmptyPanelWidget_2.h.
Referenced by OnBtnExtractTree_MH_JFC(), PaintVascularTree_MH_JFC(), and ResetTree_MH_JFC().
std::vector< vtkPolyDataMapper* > wxEmptyPanelWidget_2::_lstBranchMapper [private] |
Definition at line 114 of file wxEmptyPanelWidget_2.h.
Referenced by PaintVascularTree_MH_JFC(), and ResetTree_MH_JFC().
marInterface* wxEmptyPanelWidget_2::_mar [private] |
Definition at line 131 of file wxEmptyPanelWidget_2.h.
Referenced by ConfigureVTK(), ExtractTree1_JF(), ExtractTree2_JF(), OnBtnExtractTree_MH_JFC(), and wxEmptyPanelWidget_2().
Definition at line 132 of file wxEmptyPanelWidget_2.h.
Referenced by ConfigureVTK(), CreateViewPanel(), ExtractTree1_JF(), ExtractTree2_JF(), OnBtnExtractTree1_JF(), OnBtnExtractTree2_JF(), OnBtnExtractTree_MH_JFC(), PaintVascularTree_MH_JFC(), PaintVascularVolume_MH_JFC(), Refresh(), ResetTree1_JF(), ResetTree2_JF(), and ResetTree_MH_JFC().
vtkMarchingCubes* wxEmptyPanelWidget_2::_mCubes [private] |
Definition at line 84 of file wxEmptyPanelWidget_2.h.
Referenced by ConfigureVTK(), OnIsoValue(), wxEmptyPanelWidget_2(), and ~wxEmptyPanelWidget_2().
wxSlider* wxEmptyPanelWidget_2::_opacity_OrigVol [private] |
Definition at line 116 of file wxEmptyPanelWidget_2.h.
Referenced by ConfigureVTK(), CreateControlPanel(), and OnOpacity_OrigVol().
wxSlider* wxEmptyPanelWidget_2::_opacity_Res1VolJF [private] |
Definition at line 117 of file wxEmptyPanelWidget_2.h.
Referenced by CreateControlPanel(), ExtractTree1_JF(), and OnOpacity_Res1VolJF().
wxSlider* wxEmptyPanelWidget_2::_opacity_Res2VolJF [private] |
Definition at line 118 of file wxEmptyPanelWidget_2.h.
Referenced by CreateControlPanel(), ExtractTree2_JF(), and OnOpacity_Res2VolJF().
wxSlider* wxEmptyPanelWidget_2::_opacity_ResVolMHJF [private] |
Definition at line 122 of file wxEmptyPanelWidget_2.h.
Referenced by CreateControlPanel(), and OnOpacity_ResVolMHJF().
double wxEmptyPanelWidget_2::_sensibility_JF [private] |
Definition at line 103 of file wxEmptyPanelWidget_2.h.
Referenced by CreateControlPanel(), ExtractTree2_JF(), OnSensibility(), and wxEmptyPanelWidget_2().
wxSlider* wxEmptyPanelWidget_2::_sl_sensibility_JF [private] |
Definition at line 119 of file wxEmptyPanelWidget_2.h.
Referenced by CreateControlPanel(), and OnSensibility().
vtkActor* wxEmptyPanelWidget_2::_surfActor [private] |
Definition at line 86 of file wxEmptyPanelWidget_2.h.
Referenced by ConfigureVTK(), OnOpacity_OrigVol(), wxEmptyPanelWidget_2(), and ~wxEmptyPanelWidget_2().
vtkPolyDataMapper* wxEmptyPanelWidget_2::_surfMapper [private] |
Definition at line 85 of file wxEmptyPanelWidget_2.h.
Referenced by ConfigureVTK(), wxEmptyPanelWidget_2(), and ~wxEmptyPanelWidget_2().
Definition at line 81 of file wxEmptyPanelWidget_2.h.
Referenced by OnBtnExtractTree_MH_JFC(), and wxEmptyPanelWidget_2().