From 985e1ac15f538897e8252ce1eb9c175b3100d1b8 Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Mon, 18 May 2009 11:25:12 +0000 Subject: [PATCH] *** empty log message *** --- CMakeLists.txt | 2 +- .../wxWindows/widgets/wxSTLWidget_03.cxx | 127 ++++++++++++------ .../wxWindows/widgets/wxVtkMPR3DView.cxx | 14 ++ 3 files changed, 102 insertions(+), 41 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e13b12..b901a23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,7 @@ SUBDIRS(lib) SUBDIRS(bbtk) SUBDIRS(install) -INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/Data/Icons ) +INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/data/Icons ) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx index d856855..77154c3 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx @@ -65,10 +65,45 @@ wxSTLWidget_03::wxSTLWidget_03(wxWindow *parent)//, marInterface* mar) : wxPanel( parent, -1) { - _wxMaracasMPR = NULL; + _imagedata=NULL; + cast2=NULL; + cast3=NULL; + cast4=NULL; // binary segmentation result + _thresh=NULL; + _thresh2=NULL; + _cast=NULL; + _connect=NULL; + _connect2=NULL; + _2_mapfinal=NULL; + _2_stripfinal=NULL; + _2_isoMapperMC6=NULL; + _2_isoActorMC6=NULL; + _2_isoMC6=NULL; + _loadSTLMapper=NULL; + _loadActorSTL=NULL; + sl_barrange_segmentation=NULL; + _imageviewer3D=NULL; + _wxMaracasMPR=NULL; + stlInterna=NULL; + stlExterna=NULL; + stlSliderDeltaGauss=NULL; + stlSliderMarchingCubes=NULL; + dsm1=NULL; + actorInternal=NULL; + stlSliderOpacityInternal=NULL; + dsm2=NULL; + actorExternal=NULL; + stlSliderOpacityExternal=NULL; + stlExtractor=NULL; + _sl_opacity_STL_file=NULL; + arteryImageData=NULL; + joiner=NULL; + joinMarchingCubes=NULL; + joinMapper=NULL; + joinActor=NULL; _maxSize = 2000; _minSize = 300; - _imagedata = NULL; + _stlMarchingCubesLevel = 128; _stlDeltaGaussLevel = 100; @@ -99,42 +134,49 @@ wxSTLWidget_03::wxSTLWidget_03(wxWindow *parent)//, marInterface* mar) // pnlSplitter -> SplitVertically( viewPanel, new wxPanel(pnlSplitter,-1) , 600 ); this -> SetSizer(sizer); - - // Result 2: Volume + Axis -// _2_prgov = NULL; - _2_mapfinal = NULL; - _2_stripfinal = NULL; - _2_isoMapperMC6 = NULL; - _2_isoActorMC6 = NULL; - _2_isoMC6 = NULL; - - _loadSTLMapper = NULL; - _loadActorSTL = NULL; - - - //JOIN REGIONS - arteryImageData = NULL; - joinMarchingCubes = NULL; - joinMapper = NULL; - joinActor = NULL; - - //DHC STL SURFACES - stlExterna = NULL; - stlInterna = NULL; - dsm1=NULL; - actorInternal = NULL; - dsm2 = NULL; - actorExternal=NULL; - _thresh=NULL; - } //------------------------------------------------------------------- wxSTLWidget_03::~wxSTLWidget_03(){ - ResetTree2_JF(); - Reset_vtk_STLFile(); + //ResetTree2_JF(); + //Reset_vtk_STLFile(); + + if(_imagedata!=NULL){ + _imagedata->Delete(); + } + if(cast2){cast2->Delete();} + if(cast3){cast3->Delete();} + if(cast4){cast4->Delete();} + if(_thresh){_thresh->Delete();} + if(_thresh2){_thresh2->Delete();} + if(_cast){_cast->Delete();} + if(_connect){_connect->Delete();} + if(_connect2){_connect2->Delete();} + if(_2_mapfinal){_2_mapfinal->Delete();} + if(_2_stripfinal){_2_stripfinal->Delete();} + if(_2_isoMapperMC6){_2_isoMapperMC6->Delete();} + if(_2_isoActorMC6){_2_isoActorMC6->Delete();} + if(_2_isoMC6){_2_isoMC6->Delete();} + // Load STL file + if(_loadSTLMapper){_loadSTLMapper->Delete();} + if(_loadActorSTL){_loadActorSTL->Delete();} + if(sl_barrange_segmentation){delete sl_barrange_segmentation;} + if(_imageviewer3D){delete _imageviewer3D;} + if(_wxMaracasMPR){delete _wxMaracasMPR;} + if(stlInterna){stlInterna->Delete();} + if(stlExterna){stlExterna->Delete();} + if(dsm1){dsm1->Delete();} + if(actorInternal){actorInternal->Delete();} + if(dsm2){dsm2->Delete();} + if(actorExternal){actorExternal->Delete();} + //if(stlExtractor){stlExtractor->Delete();} + if(arteryImageData){arteryImageData->Delete();} + if(joiner){delete joiner;} + if(joinMarchingCubes){joinMarchingCubes->Delete();} + if(joinMapper){joinMapper->Delete(); } + if(joinActor){joinActor->Delete();} } //------------------------------------------------------------------- wxPanel* wxSTLWidget_03::CreateViewPanel(wxWindow *parent) @@ -565,14 +607,7 @@ void wxSTLWidget_03::ResetTree2_JF() try{ - vtkRenderer *ren = _wxMaracasMPR->GetWxvtkmpr3Dview_BB()->GetWxvtk3Dbaseview()->GetRenderer(); - - if (_2_isoActorMC6){ - ren->RemoveActor(_2_isoActorMC6); - } - if (_2_stripfinal){ - ren->RemoveActor(_2_stripfinal); - } + // Delete // if (_2_prgov ) { _2_prgov -> Delete(); } @@ -589,6 +624,18 @@ void wxSTLWidget_03::ResetTree2_JF() _2_isoMapperMC6 = NULL; _2_isoActorMC6 = NULL; _2_isoMC6 = NULL; + + + //vtkRenderer *ren = _wxMaracasMPR->GetWxvtkmpr3Dview_BB()->GetWxvtk3Dbaseview()->GetRenderer(); + + /*if (_2_isoActorMC6){ + ren->RemoveActor(_2_isoActorMC6); + } + if (_2_stripfinal){ + ren->RemoveActor(_2_stripfinal); + }*/ + + }catch(char* e){ std::cout<Delete(); + } + if(_planeWidget!=NULL){ + _planeWidget->Delete(); + } + + if(_vtkplane!=NULL){ + _vtkplane->Delete(); + _probe->Delete(); + _contourMapper->Delete(); + _contourPlaneActor->Delete(); + } + } //------------------------------------------------------------------- -- 2.46.2