wxSTLWidget_03 Class Reference

#include <Copie de wxSTLWidget_03.h>

Collaboration diagram for wxSTLWidget_03:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 wxSTLWidget_03 (wxWindow *parentmar, marInterface *mar)
 ~wxSTLWidget_03 ()
void ConfigureVTK ()
void Refresh ()
void OnOpacity_Vol (wxScrollEvent &event)
void OnMinSpin (wxScrollEvent &event)
void OnMaxSpin (wxScrollEvent &event)
void OnRangeSpin (wxScrollEvent &event)
void OnStartChanged_range (wxCommandEvent &event)
void OnEndChanged_range (wxCommandEvent &event)
void OnBarMoved_range (wxCommandEvent &event)
void OnBtnExtraction (wxCommandEvent &event)
void OnBtnSaveBinaryFile (wxCommandEvent &event)
void Reset_vtk_STLFile ()
void OnBtnSTLFileLoad (wxCommandEvent &event)
void OnBtnSTLFileErase (wxCommandEvent &event)
void OnOpacitySTLFile (wxScrollEvent &event)
void generateSTLSurfaces ()
void OnBtnCreateFileSTL (wxCommandEvent &event)
void OnChangeSTLGaussLevel (wxScrollEvent &event)
void OnChangeSTLMarchingCubesLevel (wxScrollEvent &event)
void OnOpacitySTLExternal (wxScrollEvent &event)
void OnOpacitySTLInternal (wxScrollEvent &event)
void OnJoinRegions (wxCommandEvent &event)
 wxSTLWidget_03 (wxWindow *parentmar)
 ~wxSTLWidget_03 ()
void ConfigureVTK ()
void Refresh ()
void OnOpacity_Vol (wxScrollEvent &event)
void OnMinSpin (wxScrollEvent &event)
void OnMaxSpin (wxScrollEvent &event)
void OnRangeSpin (wxScrollEvent &event)
void OnStartChanged_range (wxCommandEvent &event)
void OnEndChanged_range (wxCommandEvent &event)
void OnBarMoved_range (wxCommandEvent &event)
void OnBtnExtraction (wxCommandEvent &event)
void OnBtnSaveBinaryFile (wxCommandEvent &event)
void Reset_vtk_STLFile ()
void OnBtnSTLFileLoad (wxCommandEvent &event)
void OnBtnSTLFileErase (wxCommandEvent &event)
void OnOpacitySTLFile (wxScrollEvent &event)
void generateSTLSurfaces ()
void OnBtnCreateFileSTL (wxCommandEvent &event)
void OnChangeSTLGaussLevel (wxScrollEvent &event)
void OnChangeSTLMarchingCubesLevel (wxScrollEvent &event)
void OnOpacitySTLExternal (wxScrollEvent &event)
void OnOpacitySTLInternal (wxScrollEvent &event)
void OnJoinRegions (wxCommandEvent &event)
void setImage (vtkImageData *img)

Private Member Functions

wxPanel * CreateControlPanel (wxWindow *parent)
wxPanel * CreateViewPanel (wxWindow *parent)
void ResetTree2_JF ()
void ExtractSurface (int x, int y, int z)
wxWindow * CreateSelectAPointPanel (wxWindow *parent)
wxWindow * CreateSegmentationPanel (wxWindow *parent)
wxWindow * CreateSmoothingPanel (wxWindow *parent)
wxWindow * CreateReadSTLFilePanel (wxWindow *parent)
void ConfigureProcessing (marImageData *marimagedata, int x, int y, int z)
void ConfigureSTL ()
wxPanel * CreateControlPanel (wxWindow *parent)
wxPanel * CreateViewPanel (wxWindow *parent)
void ResetTree2_JF ()
void ExtractSurface (int x, int y, int z)
wxWindow * CreateSelectAPointPanel (wxWindow *parent)
wxWindow * CreateSegmentationPanel (wxWindow *parent)
wxWindow * CreateSmoothingPanel (wxWindow *parent)
wxWindow * CreateReadSTLFilePanel (wxWindow *parent)
void ConfigureProcessing (vtkImageData *img, int x, int y, int z)
void ConfigureSTL ()

Private Attributes

vtkImageData * _imagedata
double _range [2]
vtkImageCast * cast2
vtkImageCast * cast3
vtkImageCast * cast4
vtkImageThreshold * _thresh
vtkImageThreshold * _thresh2
vtkImageSeedConnectivity * _connect
vtkImageSeedConnectivity * _connect2
vtkPolyDataMapper * _2_mapfinal
vtkActor * _2_stripfinal
vtkPolyDataMapper * _2_isoMapperMC6
vtkActor * _2_isoActorMC6
vtkMarchingCubes * _2_isoMC6
double _sensibility_JF
int _maxSize
int _minSize
vtkPolyDataMapper * _loadSTLMapper
vtkActor * _loadActorSTL
wxSlider * _opacity_Vol
wxSlider * _sl_minSize
wxSlider * _sl_maxSize
wxSlider * _sl_minSizeSpin
wxSlider * _sl_maxSizeSpin
wxSlider * _sl_RangeSizeSpin
mBarRangesl_barrange_segmentation
int lastResizeRef_Value
int minRangeValue
int maxRangeValue
wxVtk3DBaseView_imageviewer3D
marInterface_mar
wxMaracasMPR_wxMaracasMPR
double _stlDeltaGaussLevel
double _stlMarchingCubesLevel
vtkPolyData * stlInterna
vtkPolyData * stlExterna
wxSlider * stlSliderDeltaGauss
wxSlider * stlSliderMarchingCubes
vtkPolyDataMapper * dsm1
vtkActor * actorInternal
wxSlider * stlSliderOpacityInternal
vtkPolyDataMapper * dsm2
vtkActor * actorExternal
wxSlider * stlSliderOpacityExternal
vtkSTLExtractorstlExtractor
wxSlider * _sl_opacity_STL_file
vtkImageData * arteryImageData
vtkJoinerjoiner
vtkMarchingCubes * joinMarchingCubes
vtkPolyDataMapper * joinMapper
vtkActor * joinActor
vtkImageCast * _cast

Detailed Description

Definition at line 40 of file Copie de wxSTLWidget_03.h.


Constructor & Destructor Documentation

wxSTLWidget_03::wxSTLWidget_03 ( wxWindow *  parentmar,
marInterface mar 
)

Definition at line 65 of file Copie de wxSTLWidget_03.cxx.

References _2_isoActorMC6, _2_isoMapperMC6, _2_isoMC6, _2_mapfinal, _2_stripfinal, marInterface::_dicom, marInterface::_experiment, _loadActorSTL, _loadSTLMapper, _mar, _maxSize, _minSize, marInterface::_parameters, _stlDeltaGaussLevel, _stlMarchingCubesLevel, _wxMaracasMPR, arteryImageData, CreateControlPanel(), CreateViewPanel(), marParameters::e_voxel_type, marParameters::e_voxel_x_dimension, marParameters::e_voxel_y_dimension, marParameters::e_voxel_z_dimension, marParameters::getDoubleParam(), marParameters::getRescaleIntercept(), marParameters::getRescaleSlope(), marExperiment::getVOI(), marInterface::initExperiment(), joinActor, joinMapper, joinMarchingCubes, marInterface::SetDicom(), marParameters::setDoubleParam(), marParameters::setIntParam(), marParameters::setRescaleIntercept(), marParameters::setRescaleSlope(), marExperiment::setVOI(), stlExterna, stlInterna, and marParameters::VOX_TYPE_MINIMUM.

00066 : wxPanel( parent, -1) 
00067 {
00068         _wxMaracasMPR           = NULL;
00069         _maxSize                = 2000;
00070         _minSize                = 300;
00071 
00072         _stlMarchingCubesLevel  = 128;
00073         _stlDeltaGaussLevel             = 100;
00074 
00075         _mar=new marInterface();        
00076         _mar->_parameters->setRescaleSlope( mar->_parameters->getRescaleSlope() );
00077         _mar->_parameters->setRescaleIntercept( mar->_parameters->getRescaleIntercept() );
00078         _mar->_parameters->setIntParam( marParameters::e_voxel_type, marParameters::VOX_TYPE_MINIMUM );
00079         _mar->_parameters->setDoubleParam( marParameters::e_voxel_x_dimension, mar->_parameters->getDoubleParam(marParameters::e_voxel_x_dimension) );
00080         _mar->_parameters->setDoubleParam( marParameters::e_voxel_y_dimension, mar->_parameters->getDoubleParam(marParameters::e_voxel_y_dimension) );
00081         _mar->_parameters->setDoubleParam( marParameters::e_voxel_z_dimension, mar->_parameters->getDoubleParam(marParameters::e_voxel_z_dimension) );
00082         int voi[6];
00083         mar->_experiment->getVOI( voi );
00084         _mar->_experiment->setVOI( voi );
00085         _mar->SetDicom(mar->_dicom);
00086         _mar->initExperiment( );
00087          
00088 
00089         wxBoxSizer              *sizer          = new wxBoxSizer(wxVERTICAL  );
00090         wxSplitterWindow        *pnlSplitter    = new wxSplitterWindow( this , -1);
00091         wxPanel                 *viewPanel      = CreateViewPanel(pnlSplitter);
00092 printf("EED wxSTLWidget_03::wxSTLWidget_03 01\n");
00093         wxPanel                 *controlPanel   = CreateControlPanel(pnlSplitter);
00094 printf("EED wxSTLWidget_03::wxSTLWidget_03 02\n");
00095 
00096         sizer           -> Add( pnlSplitter ,1,wxGROW  ,0);
00097         pnlSplitter     -> SetMinimumPaneSize( 150 );
00098         pnlSplitter     -> SplitVertically( viewPanel, controlPanel, 600 );
00099 
00100 //      pnlSplitter     -> SplitVertically( new wxPanel(pnlSplitter,-1), new wxPanel(pnlSplitter,-1) , 600 );
00101 //      pnlSplitter     -> SplitVertically( viewPanel, new wxPanel(pnlSplitter,-1) , 600 );
00102 
00103         this            -> SetSizer(sizer);
00104 
00105         // Result 2: Volume + Axis
00106 //      _2_prgov                = NULL;
00107         _2_mapfinal             = NULL;
00108         _2_stripfinal           = NULL;
00109         _2_isoMapperMC6         = NULL;
00110         _2_isoActorMC6          = NULL;
00111         _2_isoMC6               = NULL;
00112 
00113         //DHC STL SURFACES
00114         stlInterna              = NULL;
00115         stlExterna              = NULL;
00116 
00117         _loadSTLMapper          = NULL;
00118         _loadActorSTL           = NULL;
00119 
00120         
00121         //JOIN REGIONS
00122         arteryImageData         = NULL;
00123         joinMarchingCubes       = NULL;
00124     joinMapper                  = NULL; 
00125         joinActor               = NULL;
00126 printf("EED wxSTLWidget_03::wxSTLWidget_03 03\n");
00127 
00128 
00129 }

Here is the call graph for this function:

wxSTLWidget_03::~wxSTLWidget_03 (  ) 

Definition at line 131 of file Copie de wxSTLWidget_03.cxx.

References Reset_vtk_STLFile(), and ResetTree2_JF().

00131                                {
00132         ResetTree2_JF();
00133         Reset_vtk_STLFile();
00134 }

Here is the call graph for this function:

wxSTLWidget_03::wxSTLWidget_03 ( wxWindow *  parentmar  ) 

Definition at line 65 of file wxSTLWidget_03.cxx.

References _2_isoActorMC6, _2_isoMapperMC6, _2_isoMC6, _2_mapfinal, _2_stripfinal, _cast, _connect, _connect2, _imagedata, _imageviewer3D, _loadActorSTL, _loadSTLMapper, _maxSize, _minSize, _sl_opacity_STL_file, _stlDeltaGaussLevel, _stlMarchingCubesLevel, _thresh, _thresh2, _wxMaracasMPR, actorExternal, actorInternal, arteryImageData, cast2, cast3, cast4, CreateControlPanel(), CreateViewPanel(), dsm1, dsm2, joinActor, joiner, joinMapper, joinMarchingCubes, sl_barrange_segmentation, stlExterna, stlExtractor, stlInterna, stlSliderDeltaGauss, stlSliderMarchingCubes, stlSliderOpacityExternal, and stlSliderOpacityInternal.

00066 : wxPanel( parent, -1) 
00067 {
00068         _imagedata=NULL;
00069         cast2=NULL;
00070         cast3=NULL;
00071         cast4=NULL; // binary segmentation result
00072         _thresh=NULL;
00073         _thresh2=NULL;
00074         _cast=NULL;
00075         _connect=NULL;
00076         _connect2=NULL;
00077         _2_mapfinal=NULL;
00078         _2_stripfinal=NULL;
00079         _2_isoMapperMC6=NULL;
00080         _2_isoActorMC6=NULL;
00081         _2_isoMC6=NULL; 
00082         _loadSTLMapper=NULL;
00083         _loadActorSTL=NULL;
00084         sl_barrange_segmentation=NULL;  
00085         _imageviewer3D=NULL;    
00086         _wxMaracasMPR=NULL;     
00087         stlInterna=NULL;
00088         stlExterna=NULL;        
00089         stlSliderDeltaGauss=NULL;
00090         stlSliderMarchingCubes=NULL;    
00091         dsm1=NULL;
00092     actorInternal=NULL;
00093         stlSliderOpacityInternal=NULL;    
00094         dsm2=NULL; 
00095     actorExternal=NULL;
00096         stlSliderOpacityExternal=NULL;
00097         stlExtractor=NULL;   
00098         _sl_opacity_STL_file=NULL;
00099         arteryImageData=NULL;
00100         joiner=NULL;
00101         joinMarchingCubes=NULL;
00102     joinMapper=NULL; 
00103         joinActor=NULL; 
00104         _maxSize                = 2000;
00105         _minSize                = 300;
00106         
00107         _stlMarchingCubesLevel  = 128;
00108         _stlDeltaGaussLevel             = 100;
00109 
00110         /*_mar=new marInterface();      
00111         _mar->_parameters->setRescaleSlope( mar->_parameters->getRescaleSlope() );
00112         _mar->_parameters->setRescaleIntercept( mar->_parameters->getRescaleIntercept() );
00113         _mar->_parameters->setIntParam( marParameters::e_voxel_type, marParameters::VOX_TYPE_MINIMUM );
00114         _mar->_parameters->setDoubleParam( marParameters::e_voxel_x_dimension, mar->_parameters->getDoubleParam(marParameters::e_voxel_x_dimension) );
00115         _mar->_parameters->setDoubleParam( marParameters::e_voxel_y_dimension, mar->_parameters->getDoubleParam(marParameters::e_voxel_y_dimension) );
00116         _mar->_parameters->setDoubleParam( marParameters::e_voxel_z_dimension, mar->_parameters->getDoubleParam(marParameters::e_voxel_z_dimension) );
00117         int voi[6];
00118         mar->_experiment->getVOI( voi );
00119         _mar->_experiment->setVOI( voi );
00120         _mar->SetDicom(mar->_dicom);
00121         _mar->initExperiment( );*/
00122          
00123 
00124         wxBoxSizer              *sizer          = new wxBoxSizer(wxVERTICAL  );
00125         wxSplitterWindow        *pnlSplitter    = new wxSplitterWindow( this , -1);
00126         wxPanel                 *viewPanel      = CreateViewPanel(pnlSplitter);
00127         wxPanel                 *controlPanel   = CreateControlPanel(pnlSplitter);
00128 
00129         sizer           -> Add( pnlSplitter ,1,wxGROW  ,0);
00130         pnlSplitter     -> SetMinimumPaneSize( 150 );
00131         pnlSplitter     -> SplitVertically( viewPanel, controlPanel, 600 );
00132 
00133 //      pnlSplitter     -> SplitVertically( new wxPanel(pnlSplitter,-1), new wxPanel(pnlSplitter,-1) , 600 );
00134 //      pnlSplitter     -> SplitVertically( viewPanel, new wxPanel(pnlSplitter,-1) , 600 );
00135 
00136         this            -> SetSizer(sizer);
00137         
00138 
00139 
00140 }

Here is the call graph for this function:

wxSTLWidget_03::~wxSTLWidget_03 (  ) 

Member Function Documentation

void wxSTLWidget_03::ConfigureProcessing ( vtkImageData *  img,
int  x,
int  y,
int  z 
) [private]

Definition at line 469 of file wxSTLWidget_03.cxx.

References _cast, _connect, _connect2, _imagedata, _range, _thresh, _thresh2, cast2, cast3, cast4, mBarRange::GetEnd(), mBarRange::GetStart(), lastResizeRef_Value, maxRangeValue, minRangeValue, mBarRange::SetEnd(), mBarRange::setRepresentedValues(), mBarRange::SetStart(), and sl_barrange_segmentation.

00470 {
00471     wxBusyCursor wait;
00472 
00473         _imagedata=img;
00474 
00475 
00476         double puntoactualprov[3];
00477         puntoactualprov[0] = x;
00478         puntoactualprov[1] = y;
00479         puntoactualprov[2] = z;
00480 
00481         double espprin[3];
00482         int extprin[6];                         
00483         
00484         _imagedata->GetSpacing(espprin);
00485         _imagedata->GetExtent(extprin);
00486 
00487 
00488 // MAZV 27 sep 2006
00489 //      puntoactualprov[0]=puntoactualprov[0]*espprin[0];
00490 //      puntoactualprov[1]=puntoactualprov[1]*espprin[1];
00491 //      puntoactualprov[2]=puntoactualprov[2]*espprin[2];
00492         
00493     _imagedata->GetScalarRange( _range );
00494 
00495         // Update Controls
00496         //SIL//
00497         /*_sl_minSize->SetRange( (int)(_range[0]), (int)( _range[1]) );
00498         _sl_minSize->SetValue( (int)(_range[1]/4) );
00499 
00500         _sl_maxSize->SetRange( (int)(_range[0]) , (int)(_range[1]));
00501         _sl_maxSize->SetValue( (int)(_range[1]/2) );*/
00502 
00503         //SIL//
00504         minRangeValue = _range[0];
00505         maxRangeValue = _range[1];
00506 
00507         sl_barrange_segmentation ->setRepresentedValues(minRangeValue, maxRangeValue);
00508         sl_barrange_segmentation ->SetStart((int)(maxRangeValue/4));
00509         sl_barrange_segmentation ->SetEnd((int)(maxRangeValue/2));
00510         sl_barrange_segmentation -> RefreshForce();     
00511         lastResizeRef_Value = ( maxRangeValue - minRangeValue)/2;       
00512 
00513 // MAZV 27 sep 2006
00514 //      _highthreshold->SetRange(_range[0], _range[1]);
00515 //      _highthreshold->SetValue( _range[1] );
00516 
00517 //      _zslice->SetRange(extprin[4], extprin[5]);
00518 //      _zslice->SetValue(extprin[5]/2);
00519     
00520         if(_thresh==NULL){
00521                 _thresh = vtkImageThreshold::New();
00522                 //_thresh->ReleaseDataFlagOff();
00523                 _thresh->SetInValue(255);
00524                 _thresh->SetOutputScalarTypeToUnsignedShort();
00525                 _thresh->SetOutValue(0);
00526                 //_thresh->ThresholdBetween(_sl_minSize->GetValue(), _range[1]);
00527                 //SIL//
00528                 _cast = vtkImageCast::New();
00529                 _cast->SetInput(_thresh->GetOutput());
00530                 _cast->SetOutputScalarTypeToUnsignedChar();
00531 
00532                 _connect = vtkImageSeedConnectivity::New();
00533                 _connect->SetInput(_cast->GetOutput());
00534                 _connect->SetInputConnectValue(255);
00535                 _connect->SetOutputConnectedValue(255);
00536                 _connect->SetOutputUnconnectedValue(0);
00537 
00538                 cast3 = vtkImageCast::New();
00539                 cast3->SetInput(_connect->GetOutput());
00540                 cast3->SetOutputScalarTypeToUnsignedShort();
00541 
00542                 _thresh2 = vtkImageThreshold::New();
00543                 //_thresh2->ReleaseDataFlagOff();
00544                 _thresh2->SetInValue(255);
00545                 _thresh2->SetOutputScalarTypeToUnsignedShort();
00546                 _thresh2->SetOutValue(0);
00547                 //SIL//_thresh2->ThresholdBetween(_sl_minSize->GetValue(), _sl_maxSize->GetValue());
00548 
00549                 cast2 = vtkImageCast::New();
00550                 cast2->SetInput(_thresh2->GetOutput());
00551                 cast2->SetOutputScalarTypeToUnsignedChar();
00552                 _connect2 = vtkImageSeedConnectivity::New();
00553                 _connect2->SetInput(cast2->GetOutput());
00554                 _connect2->SetInputConnectValue(255);
00555                 _connect2->SetOutputConnectedValue(255);
00556                 _connect2->SetOutputUnconnectedValue(0);
00557 
00558                 cast4 = vtkImageCast::New();
00559                 cast4->SetInput(_connect2->GetOutput());
00560                 cast4->SetOutputScalarTypeToUnsignedShort();
00561         }
00562         _thresh->RemoveAllInputs();
00563         _thresh->SetInput(_imagedata);  
00564         _thresh->ThresholdBetween(sl_barrange_segmentation->GetStart(), sl_barrange_segmentation->GetEnd());    
00565         _thresh->Update();
00566         
00567         _cast->Update();  
00568         
00569 
00570         _connect->RemoveAllSeeds();
00571         _connect->AddSeed((int)(puntoactualprov[0]), (int)(puntoactualprov[1]), (int)(puntoactualprov[2]));
00572         //_connect->Update();   
00573         //cast3->Update();
00574 //SIL// 
00575         _thresh2->RemoveAllInputs();
00576         _thresh2->SetInput(_imagedata); 
00577         _thresh2->ThresholdBetween(sl_barrange_segmentation->GetStart(), sl_barrange_segmentation->GetEnd());
00578         _thresh2->Update();
00579         cast2->Update();
00580         _connect2->RemoveAllSeeds();
00581         _connect2->AddSeed( (int)(puntoactualprov[0]), (int)(puntoactualprov[1]), (int)(puntoactualprov[2]));
00582         //_connect2->Update();  
00583         //cast4->Update();
00584 }

Here is the call graph for this function:

void wxSTLWidget_03::ConfigureProcessing ( marImageData marimagedata,
int  x,
int  y,
int  z 
) [private]

Definition at line 427 of file Copie de wxSTLWidget_03.cxx.

References _connect, _connect2, _imagedata, _range, _thresh, _thresh2, cast2, cast3, cast4, mBarRange::GetEnd(), marImageData::GetImageData(), mBarRange::GetStart(), lastResizeRef_Value, maxRangeValue, minRangeValue, mBarRange::SetEnd(), mBarRange::setRepresentedValues(), mBarRange::SetStart(), and sl_barrange_segmentation.

Referenced by ConfigureVTK(), and setImage().

00428 {
00429     wxBusyCursor wait;
00430 
00431         _imagedata=marimagedata->GetImageData(); // image t=0
00432         _imagedata->UpdateInformation();
00433         _imagedata->SetUpdateExtent(_imagedata->GetWholeExtent());
00434         _imagedata->Update();
00435 
00436 
00437         double puntoactualprov[3];
00438         puntoactualprov[0] = x;
00439         puntoactualprov[1] = y;
00440         puntoactualprov[2] = z;
00441 
00442         double espprin[3];
00443         int extprin[6];                         
00444         
00445         _imagedata->GetSpacing(espprin);
00446         _imagedata->GetExtent(extprin);
00447 
00448 
00449 // MAZV 27 sep 2006
00450 //      puntoactualprov[0]=puntoactualprov[0]*espprin[0];
00451 //      puntoactualprov[1]=puntoactualprov[1]*espprin[1];
00452 //      puntoactualprov[2]=puntoactualprov[2]*espprin[2];
00453         
00454     _imagedata->GetScalarRange( _range );
00455 
00456         // Update Controls
00457         //SIL//
00458         /*_sl_minSize->SetRange( (int)(_range[0]), (int)( _range[1]) );
00459         _sl_minSize->SetValue( (int)(_range[1]/4) );
00460 
00461         _sl_maxSize->SetRange( (int)(_range[0]) , (int)(_range[1]));
00462         _sl_maxSize->SetValue( (int)(_range[1]/2) );*/
00463 
00464         //SIL//
00465         minRangeValue = _range[0];
00466         maxRangeValue = _range[1];
00467 
00468         sl_barrange_segmentation ->setRepresentedValues(minRangeValue, maxRangeValue);
00469         sl_barrange_segmentation ->SetStart((int)(maxRangeValue/4));
00470         sl_barrange_segmentation ->SetEnd((int)(maxRangeValue/2));
00471         sl_barrange_segmentation -> RefreshForce();     
00472         lastResizeRef_Value = ( maxRangeValue - minRangeValue)/2;       
00473 
00474 // MAZV 27 sep 2006
00475 //      _highthreshold->SetRange(_range[0], _range[1]);
00476 //      _highthreshold->SetValue( _range[1] );
00477 
00478 //      _zslice->SetRange(extprin[4], extprin[5]);
00479 //      _zslice->SetValue(extprin[5]/2);
00480         
00481         _thresh = vtkImageThreshold::New();
00482         _thresh->SetInput(_imagedata);
00483         //_thresh->ReleaseDataFlagOff();
00484         _thresh->SetInValue(255);
00485         _thresh->SetOutputScalarTypeToUnsignedShort();
00486         _thresh->SetOutValue(0);
00487         //_thresh->ThresholdBetween(_sl_minSize->GetValue(), _range[1]);
00488         //SIL//
00489         _thresh->ThresholdBetween(sl_barrange_segmentation->GetStart(), sl_barrange_segmentation->GetEnd()); 
00490 
00491         vtkImageCast *cast = vtkImageCast::New();
00492         cast->SetInput(_thresh->GetOutput());
00493         cast->SetOutputScalarTypeToUnsignedChar();
00494         cast->Update();
00495 
00496   
00497         _connect = vtkImageSeedConnectivity::New();
00498         _connect->SetInput(cast->GetOutput());
00499         _connect->SetInputConnectValue(255);
00500         _connect->SetOutputConnectedValue(255);
00501         _connect->SetOutputUnconnectedValue(0);
00502         _connect->AddSeed((int)(puntoactualprov[0]), (int)(puntoactualprov[1]), (int)(puntoactualprov[2]));
00503 //      _connect->Update();
00504 
00505         cast3 = vtkImageCast::New();
00506         cast3->SetInput(_connect->GetOutput());
00507         cast3->SetOutputScalarTypeToUnsignedShort();
00508         cast3->Update();
00509 //SIL//
00510         
00511         _thresh2 = vtkImageThreshold::New();
00512         _thresh2->SetInput(_imagedata);
00513         //_thresh2->ReleaseDataFlagOff();
00514         _thresh2->SetInValue(255);
00515         _thresh2->SetOutputScalarTypeToUnsignedShort();
00516         _thresh2->SetOutValue(0);
00517         //SIL//_thresh2->ThresholdBetween(_sl_minSize->GetValue(), _sl_maxSize->GetValue());
00518         _thresh2->ThresholdBetween(sl_barrange_segmentation->GetStart(), sl_barrange_segmentation->GetEnd());
00519         
00520         cast2 = vtkImageCast::New();
00521         cast2->SetInput(_thresh2->GetOutput());
00522         cast2->SetOutputScalarTypeToUnsignedChar();
00523         cast2->Update();
00524 
00525         _connect2 = vtkImageSeedConnectivity::New();
00526         _connect2->SetInput(cast2->GetOutput());
00527         _connect2->SetInputConnectValue(255);
00528         _connect2->SetOutputConnectedValue(255);
00529         _connect2->SetOutputUnconnectedValue(0);
00530         _connect2->AddSeed( (int)(puntoactualprov[0]), (int)(puntoactualprov[1]), (int)(puntoactualprov[2]));
00531         _connect2->Update();
00532 
00533         cast4 = vtkImageCast::New();
00534         cast4->SetInput(_connect2->GetOutput());
00535         cast4->SetOutputScalarTypeToUnsignedShort();
00536         cast4->Update();
00537 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::ConfigureSTL (  )  [private]
void wxSTLWidget_03::ConfigureSTL (  )  [private]

Definition at line 882 of file Copie de wxSTLWidget_03.cxx.

References _wxMaracasMPR, actorExternal, actorInternal, dsm1, dsm2, wxVtk3DBaseView::GetRenderer(), wxVtkMPR3DView::GetWxvtk3Dbaseview(), wxMaracasMPR::GetWxvtkmpr3Dview_BB(), stlExterna, stlExtractor, and stlInterna.

Referenced by ConfigureVTK(), and setImage().

00883 {
00884         stlExterna = vtkPolyData::New();
00885         stlInterna = vtkPolyData::New();
00886 
00887         dsm1 = vtkPolyDataMapper ::New();
00888     dsm1->SetInput (stlInterna); 
00889     dsm1->ScalarVisibilityOff();
00890 
00891     actorInternal = vtkActor::New();
00892     actorInternal->SetMapper (dsm1);
00893     actorInternal->GetProperty()->SetColor (0,1,0);
00894 
00895     dsm2 = vtkPolyDataMapper ::New();
00896     dsm2->SetInput (stlExterna);
00897     dsm2->ScalarVisibilityOff();
00898 
00899     actorExternal= vtkActor::New();
00900     actorExternal->SetMapper (dsm2);
00901     actorExternal->GetProperty()->SetRepresentationToWireframe();
00902 
00903 //    vtkRenderer *ren = _maracasSurfaceWidget->GetVtk3DSurfaceWidget()->GetRenderer();
00904         vtkRenderer *ren = _wxMaracasMPR->GetWxvtkmpr3Dview_BB()->GetWxvtk3Dbaseview()->GetRenderer();
00905     ren->AddActor(actorInternal);
00906     ren->AddActor(actorExternal);
00907 
00908         stlExtractor = new vtkSTLExtractor();  
00909 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::ConfigureVTK (  ) 
void wxSTLWidget_03::ConfigureVTK (  ) 

Definition at line 543 of file Copie de wxSTLWidget_03.cxx.

References marInterface::_experiment, _mar, ConfigureProcessing(), ConfigureSTL(), marExperiment::getDynData(), and marDynData::GetMarImageData().

00544 {
00545         wxBusyCursor wait;
00546 //      vtkImageData    *imagedata              = _mar->_experiment->getDynData( )->getVolume( )->castVtk();
00547         marImageData    *marimagedata           = _mar->_experiment->getDynData( )->GetMarImageData();
00548         
00549         //CONFIGURACION ADICIONAL
00550         this->ConfigureSTL();
00551         this->ConfigureProcessing(marimagedata,0,0,0);
00552         
00553 }

Here is the call graph for this function:

wxPanel* wxSTLWidget_03::CreateControlPanel ( wxWindow *  parent  )  [private]
wxPanel * wxSTLWidget_03::CreateControlPanel ( wxWindow *  parent  )  [private]

Definition at line 389 of file Copie de wxSTLWidget_03.cxx.

References CreateReadSTLFilePanel(), CreateSegmentationPanel(), CreateSelectAPointPanel(), and CreateSmoothingPanel().

Referenced by wxSTLWidget_03().

00390 {
00391 printf("EED wxSTLWidget_03::CreateControlPanel 01\n");
00392         wxPanel *panel                  = new wxPanel(parent,-1);
00393 
00394         wxNotebook *noteBook    = new wxNotebook(panel, -1);
00395 printf("EED wxSTLWidget_03::CreateControlPanel 02\n");
00396         noteBook->AddPage(CreateSelectAPointPanel(noteBook),_T("0 ->") );
00397 printf("EED wxSTLWidget_03::CreateControlPanel 03\n");
00398         noteBook->AddPage(CreateSegmentationPanel(noteBook),_T("1 ->") );
00399 printf("EED wxSTLWidget_03::CreateControlPanel 04\n");
00400         noteBook->AddPage(CreateSmoothingPanel(noteBook)   ,_T("2 ->") );
00401 printf("EED wxSTLWidget_03::CreateControlPanel 05\n");
00402         noteBook->AddPage(CreateReadSTLFilePanel(noteBook) ,_T("3 "  ) );
00403 printf("EED wxSTLWidget_03::CreateControlPanel 06\n");
00404         noteBook->SetSelection(0);
00405         noteBook->SetSize(350,250);
00406     wxFlexGridSizer *sizer = new wxFlexGridSizer(2);
00407         sizer->Add(noteBook);
00408         panel->SetSizer(sizer);
00409         panel->SetAutoLayout(true);
00410         panel->SetSize(400,600);
00411         panel->Layout();
00412 
00413 printf("EED wxSTLWidget_03::CreateControlPanel 07\n");
00414         return panel;
00415 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxWindow* wxSTLWidget_03::CreateReadSTLFilePanel ( wxWindow *  parent  )  [private]
wxWindow * wxSTLWidget_03::CreateReadSTLFilePanel ( wxWindow *  parent  )  [private]

Definition at line 350 of file Copie de wxSTLWidget_03.cxx.

References _sl_opacity_STL_file, OnBtnSTLFileErase(), OnBtnSTLFileLoad(), and OnOpacitySTLFile().

Referenced by CreateControlPanel().

00351 {
00352         wxPanel *panel          = new wxPanel(parent,-1);
00353 
00354         wxButton *btnReadSTLFile                        = new wxButton(panel,-1,_T("Read STL File"));
00355         wxButton *btnEraseReadSTLFile           = new wxButton(panel,-1,_T("Erase STL File"));
00356         _sl_opacity_STL_file                            = new wxSlider( panel, -1, 100 , 0, 100 , wxDefaultPosition, wxSize(200,40), wxSL_HORIZONTAL | wxSL_LABELS );
00357 
00358         Connect(btnReadSTLFile->GetId()                 , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxSTLWidget_03::OnBtnSTLFileLoad                     ); 
00359         Connect(btnEraseReadSTLFile->GetId()    , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxSTLWidget_03::OnBtnSTLFileErase                    ); 
00360         Connect(_sl_opacity_STL_file->GetId()   , wxEVT_SCROLL_THUMBRELEASE     , (wxObjectEventFunction) &wxSTLWidget_03::OnOpacitySTLFile                             ); 
00361 
00362 
00363     wxFlexGridSizer *sizer = new wxFlexGridSizer(2);
00364 
00365         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00366         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00367         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00368         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00369 
00370         sizer->Add(new wxStaticText(panel,-1,_T("-- Read STL File --")));
00371         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00372 
00373         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00374         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00375 
00376         sizer->Add(btnReadSTLFile );
00377         sizer->Add(btnEraseReadSTLFile );
00378         sizer->Add(new wxStaticText(panel, -1,_T(" Opacity STL File")));
00379         sizer->Add(_sl_opacity_STL_file);
00380 
00381 
00382         panel->SetSizer(sizer);
00383         panel->SetAutoLayout(true);
00384         panel->SetSize(400,600);
00385         panel->Layout();
00386         return panel;
00387 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxWindow* wxSTLWidget_03::CreateSegmentationPanel ( wxWindow *  parent  )  [private]
wxWindow * wxSTLWidget_03::CreateSegmentationPanel ( wxWindow *  parent  )  [private]

Definition at line 193 of file Copie de wxSTLWidget_03.cxx.

References _opacity_Vol, _sl_RangeSizeSpin, OnBarMoved_range(), OnBtnExtraction(), OnBtnSaveBinaryFile(), OnEndChanged_range(), OnOpacity_Vol(), OnRangeSpin(), OnStartChanged_range(), and sl_barrange_segmentation.

Referenced by CreateControlPanel().

00194 {
00195         wxPanel *panel          = new wxPanel(parent,-1);
00196 
00197 
00198         _opacity_Vol            = new wxSlider( panel, -1, 40, 0, 100                            , wxDefaultPosition, wxSize(200,40), wxSL_HORIZONTAL | wxSL_LABELS );
00199         _opacity_Vol    ->SetSize(250,20);  
00200         /*SIL
00201         _sl_maxSize                     = new wxSlider( panel, -1, 300 , 0, 2000 , wxDefaultPosition, wxSize(200,40), wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS );
00202         _sl_minSize                     = new wxSlider( panel, -1, 200 , 0, 2000 , wxDefaultPosition, wxSize(200,40), wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS );
00203         
00204         _sl_minSizeSpin = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxSize(25,45), wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
00205         _sl_minSizeSpin->SetRange(1,8);
00206         _sl_minSizeSpin->SetValue(5);
00207 
00208         _sl_maxSizeSpin = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxSize(25,45), wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
00209         _sl_maxSizeSpin->SetRange(1,8);
00210         _sl_maxSizeSpin->SetValue(5);
00211 
00212         */
00213 
00214         _sl_RangeSizeSpin = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxSize(25,45), wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
00215         _sl_RangeSizeSpin->SetRange(1,8);
00216         _sl_RangeSizeSpin->SetValue(5);
00217 
00218 
00219         //SIL//
00220         sl_barrange_segmentation = new mBarRange(panel, 300,70);
00221         sl_barrange_segmentation -> setVisibleLabels ( true );
00222         sl_barrange_segmentation -> setIfWithActualDrawed( false );
00223         sl_barrange_segmentation -> setActiveStateTo ( true );
00224         sl_barrange_segmentation -> setRepresentedValues (0,  2000);
00225         sl_barrange_segmentation -> setDeviceBlitStart (10,10);
00226         sl_barrange_segmentation -> setDeviceEndMargin(10);
00227         parent->SetBackgroundColour(wxColour(255,255,255));
00228         sl_barrange_segmentation-> setBackgroundColor( wxColour(255,255,255 ));
00229 
00230 
00231         wxButton *btnExtract                            = new wxButton(panel,-1,_T("Segmentation"));
00232         wxButton *btnSaveBinaryFile                     = new wxButton(panel,-1,_T("Save Binary File"));
00233 
00234 //SIL// Connect(_sl_minSizeSpin->GetId()        , wxEVT_COMMAND_SLIDER_UPDATED   , (wxObjectEventFunction) &wxSTLWidget_03::OnMinSpin ); 
00235 //SIL// Connect(_sl_maxSizeSpin->GetId()        , wxEVT_COMMAND_SLIDER_UPDATED   , (wxObjectEventFunction) &wxSTLWidget_03::OnMaxSpin ); 
00236         Connect(_opacity_Vol->GetId()           , wxEVT_COMMAND_SLIDER_UPDATED  , (wxObjectEventFunction) &wxSTLWidget_03::OnOpacity_Vol                                        ); 
00237         Connect(btnExtract->GetId()                     , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxSTLWidget_03::OnBtnExtraction                                      ); 
00238         Connect(btnSaveBinaryFile->GetId()      , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxSTLWidget_03::OnBtnSaveBinaryFile                          ); 
00239 
00240         //SIL//
00241         Connect(_sl_RangeSizeSpin->GetId()      , wxEVT_COMMAND_SLIDER_UPDATED   , (wxObjectEventFunction) &wxSTLWidget_03::OnRangeSpin ); 
00242         Connect(sl_barrange_segmentation->GetId(),wxEVT_TSBAR_START,(wxObjectEventFunction) (wxCommandEventFunction)  &wxSTLWidget_03::OnStartChanged_range );
00243         Connect(sl_barrange_segmentation->GetId(),wxEVT_TSBAR_END,(wxObjectEventFunction) (wxCommandEventFunction)  &wxSTLWidget_03::OnEndChanged_range );      
00244         Connect(sl_barrange_segmentation->GetId(),wxEVT_TSBAR_MOVED,(wxObjectEventFunction) (wxCommandEventFunction)  &wxSTLWidget_03::OnBarMoved_range );
00245 
00246     wxFlexGridSizer *sizer = new wxFlexGridSizer(2);
00247 
00248         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00249         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00250 
00251 
00252         sizer->Add(new wxStaticText(panel,-1,_T("  - - -  Segmentation - - - ")));
00253         sizer->Add(new wxStaticText(panel,-1,_T("  "))); 
00254         
00255 
00256         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00257         sizer->Add(new wxStaticText(panel,-1,_T("  "))); 
00258 
00259         /*sizer->Add(new wxStaticText(panel,-1,_T(" Threshold min")));
00260         sizer->Add(new wxStaticText(panel,-1,_T("  "))); 
00261         sizer->Add(_sl_minSizeSpin, 1, wxALL|wxEXPAND, 0);*/
00262         //sizer->Add(_sl_minSize, 1, wxALL|wxEXPAND, 0);
00263 
00264         sizer->Add(new wxStaticText(panel,-1,_T(" Threshold min-max")));
00265         sizer->Add(new wxStaticText(panel,-1,_T("  "))); 
00266         sizer->Add(_sl_RangeSizeSpin, 1, wxALL|wxEXPAND, 0);
00267         sizer->Add(sl_barrange_segmentation,3,wxALL|wxGROW,0 );
00268         
00269         //SIL//sizer->Add(new wxStaticText(panel,-1,_T(" Threshold max")));
00270         //SIL//sizer->Add(new wxStaticText(panel,-1,_T("  "))); 
00271         //SIL// sizer->Add(_sl_maxSizeSpin, 1, wxALL|wxEXPAND, 0);
00272         //SIL//sizer->Add(_sl_maxSize, 1, wxALL|wxEXPAND, 0);
00273         
00274         sizer->Add(btnExtract);
00275         sizer->Add(new wxStaticText(panel,-1,_T(" ")));
00276 
00277         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00278         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00279         sizer->Add(new wxStaticText(panel,-1,_T("Opacity - Result Volume")));
00280         sizer->Add(_opacity_Vol);
00281 
00282         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00283         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00284         sizer->Add(btnSaveBinaryFile);
00285         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00286         
00287         panel->SetSizer(sizer);
00288         panel->SetAutoLayout(true);
00289         panel->SetSize(400,600);
00290         panel->Layout();
00291 
00292         return panel;
00293 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxWindow* wxSTLWidget_03::CreateSelectAPointPanel ( wxWindow *  parent  )  [private]
wxWindow * wxSTLWidget_03::CreateSelectAPointPanel ( wxWindow *  parent  )  [private]

Definition at line 161 of file Copie de wxSTLWidget_03.cxx.

Referenced by CreateControlPanel().

00162 {
00163 printf("EED wxSTLWidget_03::CreateSelectAPointPanel  01\n");
00164         wxPanel *panel          = new wxPanel(parent,-1);
00165 
00166 printf("EED wxSTLWidget_03::CreateSelectAPointPanel  02\n");
00167 
00168     wxFlexGridSizer *sizer = new wxFlexGridSizer(2);
00169 printf("EED wxSTLWidget_03::CreateSelectAPointPanel  03\n");
00170 
00171         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00172         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00173 printf("EED wxSTLWidget_03::CreateSelectAPointPanel  04\n");
00174 
00175         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00176         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00177 printf("EED wxSTLWidget_03::CreateSelectAPointPanel  05\n");
00178 
00179         sizer->Add(new wxStaticText(panel,-1,_T(" Select a 3D Point...")));
00180         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00181 printf("EED wxSTLWidget_03::CreateSelectAPointPanel  06\n");
00182 
00183         panel->SetSizer(sizer);
00184         panel->SetAutoLayout(true);
00185         panel->SetSize(400,600);
00186         panel->Layout();
00187 printf("EED wxSTLWidget_03::CreateSelectAPointPanel  07\n");
00188 
00189 
00190         return panel;
00191 }

Here is the caller graph for this function:

wxWindow* wxSTLWidget_03::CreateSmoothingPanel ( wxWindow *  parent  )  [private]
wxWindow * wxSTLWidget_03::CreateSmoothingPanel ( wxWindow *  parent  )  [private]

Definition at line 295 of file Copie de wxSTLWidget_03.cxx.

References _stlDeltaGaussLevel, _stlMarchingCubesLevel, OnBtnCreateFileSTL(), OnChangeSTLGaussLevel(), OnChangeSTLMarchingCubesLevel(), OnOpacitySTLExternal(), OnOpacitySTLInternal(), stlSliderDeltaGauss, stlSliderMarchingCubes, stlSliderOpacityExternal, and stlSliderOpacityInternal.

Referenced by CreateControlPanel().

00296 {
00297         wxPanel *panel          = new wxPanel(parent,-1);
00298 
00299         stlSliderDeltaGauss     = new wxSlider( panel, -1, (int)(_stlDeltaGaussLevel) , 0, 300 , wxDefaultPosition, wxSize(200,40), wxSL_HORIZONTAL | wxSL_LABELS );
00300         stlSliderMarchingCubes= new wxSlider( panel, -1, (int)(_stlMarchingCubesLevel) , 0, 256 , wxDefaultPosition, wxSize(200,40), wxSL_HORIZONTAL | wxSL_LABELS );
00301         stlSliderOpacityInternal = new wxSlider(panel, -1, 100,0,100, wxDefaultPosition, wxSize(200,40), wxSL_HORIZONTAL | wxSL_LABELS);
00302         stlSliderOpacityExternal = new wxSlider(panel, -1, 100,0,100, wxDefaultPosition, wxSize(200,40), wxSL_HORIZONTAL | wxSL_LABELS);
00303         wxButton *btnFileSTL = new wxButton(panel,-1,_T("Generate STL files"));
00304 
00305         Connect(btnFileSTL->GetId()                             , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxSTLWidget_03::OnBtnCreateFileSTL                   );
00306         Connect(stlSliderDeltaGauss->GetId()    , wxEVT_SCROLL_THUMBRELEASE             , (wxObjectEventFunction) &wxSTLWidget_03::OnChangeSTLGaussLevel                );
00307         Connect(stlSliderMarchingCubes->GetId() , wxEVT_SCROLL_THUMBRELEASE             , (wxObjectEventFunction) &wxSTLWidget_03::OnChangeSTLMarchingCubesLevel);
00308         Connect(stlSliderOpacityInternal->GetId(), wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxSTLWidget_03::OnOpacitySTLInternal                 );
00309         Connect(stlSliderOpacityExternal->GetId(), wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxSTLWidget_03::OnOpacitySTLExternal                 );
00310 
00311 
00312     wxFlexGridSizer *sizer = new wxFlexGridSizer(2);
00313 
00314         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00315         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00316 
00317         sizer->Add(new wxStaticText(panel,-1,_T("-- Smoothing --")));
00318         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00319         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00320         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00321         
00322         sizer->Add(new wxStaticText(panel,-1,_T(" Delta Gauss")));
00323         sizer->Add(stlSliderDeltaGauss);
00324 
00325         sizer->Add(new wxStaticText(panel,-1,_T(" Marching Cubes Level")));
00326         sizer->Add(stlSliderMarchingCubes);
00327 
00328         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00329         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00330         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00331         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00332 
00333         sizer->Add(new wxStaticText(panel, -1,_T(" Opacity STL Internal")));
00334         sizer->Add(stlSliderOpacityInternal);
00335 
00336         sizer->Add(new wxStaticText(panel, -1,_T(" Opacity STL External")));
00337         sizer->Add(stlSliderOpacityExternal);
00338 
00339         sizer->Add(btnFileSTL);
00340         sizer->Add(new wxStaticText(panel,-1,_T("  ")));
00341 
00342 
00343         panel->SetSizer(sizer);
00344         panel->SetAutoLayout(true);
00345         panel->SetSize(400,600);
00346         panel->Layout();
00347         return panel;
00348 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxPanel* wxSTLWidget_03::CreateViewPanel ( wxWindow *  parent  )  [private]
wxPanel * wxSTLWidget_03::CreateViewPanel ( wxWindow *  parent  )  [private]

Definition at line 136 of file Copie de wxSTLWidget_03.cxx.

References marInterface::_experiment, _mar, marInterface::_parameters, _wxMaracasMPR, wxMaracasMPR::ConfigureVTK(), marExperiment::getDynData(), marDynData::getVolume(), and marParameters::getVoxelSize().

Referenced by wxSTLWidget_03().

00137 {
00138         wxPanel *panel          =       new wxPanel(parent,-1);
00139     wxBoxSizer *sizer   =       new wxBoxSizer(wxVERTICAL);
00140 
00141 
00142    // MPR
00143         vtkImageData *imagedata;
00144         imagedata = _mar->_experiment->getDynData( )->getVolume( )->castVtk();
00145         imagedata->Update();    
00146 printf("EED wxSTLWidget_03::CreateViewPanel  01 \n");
00147         _wxMaracasMPR = new wxMaracasMPR( panel, new marImageData(imagedata), _mar->_parameters->getVoxelSize() );
00148 printf("EED wxSTLWidget_03::CreateViewPanel  02 \n");
00149         _wxMaracasMPR->ConfigureVTK();
00150 printf("EED wxSTLWidget_03::CreateViewPanel  03 \n");
00151         
00152         sizer->Add(     _wxMaracasMPR , 1, wxEXPAND, 0);
00153         panel->SetSizer(sizer);
00154         panel->SetAutoLayout(true);
00155         panel->SetSize(400,400);
00156         panel->Layout();
00157 printf("EED wxSTLWidget_03::CreateViewPanel  04 \n");
00158         return panel;
00159 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::ExtractSurface ( int  x,
int  y,
int  z 
) [private]
void wxSTLWidget_03::ExtractSurface ( int  x,
int  y,
int  z 
) [private]

Definition at line 592 of file Copie de wxSTLWidget_03.cxx.

References _2_isoActorMC6, _2_isoMapperMC6, _2_isoMC6, _connect, _connect2, _imagedata, _maxSize, _minSize, _opacity_Vol, _range, _thresh, _thresh2, _wxMaracasMPR, cast2, cast3, cast4, wxVtk3DBaseView::GetRenderer(), wxVtkMPR3DView::GetWxvtk3Dbaseview(), and wxMaracasMPR::GetWxvtkmpr3Dview_BB().

Referenced by OnBtnExtraction().

00593 {
00594         
00595         double opacityvol               = ((double)_opacity_Vol->GetValue())/100;
00596 //      vtkImageData *imagedata = _mar->_experiment->getDynData( )->getVolume( )->castVtk();
00597 
00598         double  puntoactualprov[3];
00599         double  espprin[3];
00600         int             extprin[6];                             
00601 
00602 
00603         puntoactualprov[0]      =       x;
00604         puntoactualprov[1]      =       y;
00605         puntoactualprov[2]      =       z;
00606         
00607         _imagedata->UpdateInformation();
00608         _imagedata->SetUpdateExtent(_imagedata->GetWholeExtent());
00609         _imagedata->Update();
00610 
00611         _imagedata->GetSpacing(espprin);
00612         _imagedata->GetExtent(extprin);
00613 
00614 
00615 
00616 
00617         _connect->RemoveAllSeeds ();
00618         _connect->AddSeed( (int)(puntoactualprov[0] ), (int)(puntoactualprov[1]) ,(int)( puntoactualprov[2]) );
00619         _connect->Update();
00620         cast3->Update();
00621 
00622 
00623 
00624         _thresh->ThresholdBetween(3000, 3002 );
00625         _thresh2->ThresholdBetween(3000, 3001);
00626 //      _thresh->Update();
00627 //      _thresh2->Update();
00628 
00629         _thresh->ThresholdBetween(_minSize, _range[1] );
00630         _thresh->Update();
00631 
00632         _thresh2->ThresholdBetween(_minSize, _maxSize);
00633         _thresh2->Update();
00634 
00635         cast2->Update();
00636         _connect2->RemoveAllSeeds ();
00637         _connect2->AddSeed( (int)(puntoactualprov[0]) , (int)(puntoactualprov[1]) , (int)(puntoactualprov[2]) );
00638         _connect2->Update();
00639         cast4->Update();
00640 
00641 
00642 
00643 
00644         // Visualisation - result volume
00645    
00646     _2_isoMC6 = vtkMarchingCubes::New();
00647         _2_isoMC6->SetInput(cast4->GetOutput());
00648 
00649     _2_isoMC6->SetValue(0, 128);
00650         _2_isoMC6->Update();
00651 
00652         _2_isoMapperMC6 = vtkPolyDataMapper::New();
00653     _2_isoMapperMC6->SetInput(_2_isoMC6->GetOutput());
00654     _2_isoMapperMC6->ScalarVisibilityOff();
00655     _2_isoMapperMC6->ImmediateModeRenderingOn();
00656 
00657         vtkRenderer *ren = _wxMaracasMPR->GetWxvtkmpr3Dview_BB()->GetWxvtk3Dbaseview()->GetRenderer();
00658 
00659         if (_2_isoActorMC6!=NULL)
00660         {
00661                 ren->RemoveActor(_2_isoActorMC6);
00662         }
00663 
00664 
00665         _2_isoActorMC6 = vtkActor::New();
00666     _2_isoActorMC6->SetMapper(_2_isoMapperMC6);
00667     _2_isoActorMC6->GetProperty()->SetColor(1.0, 1.0, 0.5);
00668     _2_isoActorMC6->GetProperty()->SetOpacity( opacityvol );
00669     
00670         // Interface Update
00671 
00672         ren->AddActor(_2_isoActorMC6);
00673 
00674 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::generateSTLSurfaces (  ) 
void wxSTLWidget_03::generateSTLSurfaces (  ) 

Definition at line 911 of file Copie de wxSTLWidget_03.cxx.

References _stlDeltaGaussLevel, _stlMarchingCubesLevel, vtkSTLExtractor::calculate(), cast4, vtkSTLExtractor::getInnerSurface(), vtkSTLExtractor::getOuterSurface(), vtkSTLExtractor::setMarchingCubesLevel(), vtkSTLExtractor::setSigmaLevel(), vtkSTLExtractor::setVolume(), stlExterna, stlExtractor, and stlInterna.

Referenced by OnBtnExtraction(), OnChangeSTLGaussLevel(), and OnChangeSTLMarchingCubesLevel().

00912 {
00913 // EED 09Janvier2007
00914 //      stlExtractor->setVolume(_2_prgov->GetVolumen());
00915 
00916         stlExtractor->setVolume(cast4->GetOutput());
00917 
00918         stlExtractor->setSigmaLevel(_stlDeltaGaussLevel);
00919         stlExtractor->setMarchingCubesLevel(_stlMarchingCubesLevel);
00920         stlExtractor->calculate();
00921         stlInterna->DeepCopy(stlExtractor->getInnerSurface());
00922         stlExterna->DeepCopy(stlExtractor->getOuterSurface());
00923 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnBarMoved_range ( wxCommandEvent &  event  ) 
void wxSTLWidget_03::OnBarMoved_range ( wxCommandEvent &  event  ) 

Definition at line 756 of file Copie de wxSTLWidget_03.cxx.

References mBarRange::GetEnd(), mBarRange::GetStart(), lastResizeRef_Value, and sl_barrange_segmentation.

Referenced by CreateSegmentationPanel().

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnBtnCreateFileSTL ( wxCommandEvent &  event  ) 
void wxSTLWidget_03::OnBtnCreateFileSTL ( wxCommandEvent &  event  ) 

Definition at line 939 of file Copie de wxSTLWidget_03.cxx.

References _mar, marInterface::_parameters, marParameters::e_installation_directory, marParameters::getStringParam(), vtkClosePolyData::New(), marInterface::saveParameters(), marParameters::setStringParam(), stlExterna, and stlInterna.

Referenced by CreateSmoothingPanel().

00940 {
00941 
00942         wxString dirSTL = _mar->_parameters->getStringParam( 
00943     marParameters::e_installation_directory ); 
00944         dirSTL = ( dirSTL == _T("NO_DIRECTORY") ) ? wxGetHomeDir( ) : dirSTL;
00945 
00946         
00947 //      wxDirDialog dialog( this, "Choose a directory...", ( !dirSTL.IsEmpty( ) )?dirSTL: wxGetHomeDir( ) );
00948         wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxSAVE );
00949 
00950 
00951         if( dialog.ShowModal( ) == wxID_OK ) 
00952         {
00953            
00954         
00955                 // ------------------------------------------------------------------------
00956                 //  1.  GENERATE STL FILES
00957                 // ------------------------------------------------------------------------
00958 //              const char* fileprefix = "c:\\Creatis\\";
00959                 std::string prefix ( dialog.GetPath().mb_str(wxConvUTF8) );
00960                 std::string filename;
00961 
00962                 // 1.1. Se hace un filtro triangular puesto que el stl writer solo recibe poligonos triangulares.
00963 
00964         vtkTriangleFilter *filtro = vtkTriangleFilter::New();
00965                 filtro->SetInput(stlInterna);
00966                 vtkPolyDataConnectivityFilter *pdcf = vtkPolyDataConnectivityFilter::New();
00967         pdcf->SetInput( filtro->GetOutput() );
00968         vtkClosePolyData *cpd = vtkClosePolyData::New();
00969         cpd->SetInput( pdcf->GetOutput() );
00970 
00971                 // 1.2 se escribe a disco el archivo stl de la superficie interna
00972         cpd->Update();
00973         vtkSTLWriter *writerI = vtkSTLWriter::New();
00974         writerI->SetInput( cpd->GetOutput() );
00975 //        prefix = fileprefix;
00976                 filename=prefix+"_internal.stl";
00977         writerI->SetFileName(filename.c_str());
00978         writerI->SetFileTypeToASCII();
00979         writerI->Write();
00980         writerI->Delete();
00981 
00982                 // 1.3 se escribe a disco el archivo stl de la superficie externa
00983                 filtro->SetInput(stlExterna);
00984         cpd->Update();
00985         vtkSTLWriter *writerE = vtkSTLWriter::New();
00986         writerE->SetInput( cpd->GetOutput() );
00987 //        prefix = fileprefix;
00988                 filename=prefix+"_external.stl";
00989         writerE->SetFileName( filename.c_str() );
00990         writerE->SetFileTypeToASCII();
00991         writerE->Write();
00992         writerE->Delete();
00993    
00994         filtro->Delete();
00995         cpd->Delete();
00996         pdcf->Delete();
00997         }
00998 
00999         //By default *always* update e_installation_directory:
01000         _mar->_parameters->setStringParam( marParameters::e_installation_directory, dialog.GetPath( ) ); 
01001         _mar->saveParameters( );
01002 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnBtnExtraction ( wxCommandEvent &  event  ) 
void wxSTLWidget_03::OnBtnExtraction ( wxCommandEvent &  event  ) 

Definition at line 781 of file Copie de wxSTLWidget_03.cxx.

References _maxSize, _minSize, _wxMaracasMPR, ExtractSurface(), generateSTLSurfaces(), mBarRange::GetEnd(), mBarRange::GetStart(), wxMaracasMPR::GetVtkMPRBaseData(), vtkMPRBaseData::GetX(), vtkMPRBaseData::GetY(), vtkBaseData::GetZ(), Refresh(), and sl_barrange_segmentation.

Referenced by CreateSegmentationPanel().

00782 {
00783         /*wxBusyCursor wait;
00784         _minSize = _sl_minSize->GetValue();
00785         _maxSize = _sl_maxSize->GetValue();
00786 
00787         double px=_wxMaracasMPR->GetVtkMPRBaseData()->GetX();
00788         double py=_wxMaracasMPR->GetVtkMPRBaseData()->GetY();
00789         double pz=_wxMaracasMPR->GetVtkMPRBaseData()->GetZ();
00790         ExtractSurface((int)(px),(int)(py),(int)(pz));
00791         generateSTLSurfaces(); //DHC: AFTER SEGMENTATION THE TREE, THE STL SURFACES ARE CALCULATED.
00792 
00793         Refresh();
00794 */
00795         //SIL//
00796         wxBusyCursor wait;
00797         _minSize = sl_barrange_segmentation->GetStart();
00798         _maxSize = sl_barrange_segmentation->GetEnd();
00799 
00800         double px=_wxMaracasMPR->GetVtkMPRBaseData()->GetX();
00801         double py=_wxMaracasMPR->GetVtkMPRBaseData()->GetY();
00802         double pz=_wxMaracasMPR->GetVtkMPRBaseData()->GetZ();
00803         ExtractSurface((int)(px),(int)(py),(int)(pz));
00804         generateSTLSurfaces(); //DHC: AFTER SEGMENTATION THE TREE, THE STL SURFACES ARE CALCULATED.
00805 
00806         Refresh();
00807 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnBtnSaveBinaryFile ( wxCommandEvent &  event  ) 
void wxSTLWidget_03::OnBtnSaveBinaryFile ( wxCommandEvent &  event  ) 

Definition at line 762 of file Copie de wxSTLWidget_03.cxx.

References _mar, marInterface::_parameters, cast4, marParameters::e_installation_directory, and marParameters::getStringParam().

Referenced by CreateSegmentationPanel().

00763 {
00764         wxString dirSTL = _mar->_parameters->getStringParam( 
00765     marParameters::e_installation_directory ); 
00766         dirSTL = ( dirSTL == _T("NO_DIRECTORY") ) ? wxGetHomeDir( ) : dirSTL;
00767         wxFileDialog dialog( this, _T("Choose a directory..."), ( !dirSTL.IsEmpty( ) )?
00768         dirSTL: wxGetHomeDir( ) );
00769 
00770         if( dialog.ShowModal( ) == wxID_OK ) 
00771         {
00772                 vtkMetaImageWriter  *writer= vtkMetaImageWriter::New();
00773                 writer->SetFileName( dialog.GetPath().mb_str(wxConvUTF8) );     
00774                 writer->SetInput(cast4->GetOutput());
00775                 writer->Write();
00776                 writer->Delete();
00777         }
00778 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnBtnSTLFileErase ( wxCommandEvent &  event  ) 
void wxSTLWidget_03::OnBtnSTLFileErase ( wxCommandEvent &  event  ) 

Definition at line 838 of file Copie de wxSTLWidget_03.cxx.

References Refresh(), and Reset_vtk_STLFile().

Referenced by CreateReadSTLFilePanel().

00839 {
00840         Reset_vtk_STLFile();
00841         Refresh();
00842 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnBtnSTLFileLoad ( wxCommandEvent &  event  ) 
void wxSTLWidget_03::OnBtnSTLFileLoad ( wxCommandEvent &  event  ) 

Definition at line 844 of file Copie de wxSTLWidget_03.cxx.

References _loadActorSTL, _loadSTLMapper, _mar, marInterface::_parameters, _wxMaracasMPR, marParameters::e_installation_directory, wxVtk3DBaseView::GetRenderer(), marParameters::getStringParam(), wxVtkMPR3DView::GetWxvtk3Dbaseview(), wxMaracasMPR::GetWxvtkmpr3Dview_BB(), Reset_vtk_STLFile(), marInterface::saveParameters(), and marParameters::setStringParam().

Referenced by CreateReadSTLFilePanel().

00845 {
00846         wxString dirSTL = _mar->_parameters->getStringParam( 
00847     marParameters::e_installation_directory ); 
00848         dirSTL = ( dirSTL == _T("NO_DIRECTORY") ) ? wxGetHomeDir( ) : dirSTL;
00849         wxFileDialog dialog( this, _T("Choose a directory..."), ( !dirSTL.IsEmpty( ) )?
00850         dirSTL: wxGetHomeDir( ) );
00851 
00852         if( dialog.ShowModal( ) == wxID_OK ) 
00853         {
00854                 Reset_vtk_STLFile();
00855                 vtkSTLReader *imgReader= vtkSTLReader::New();
00856                 imgReader->SetFileName( dialog.GetPath().mb_str(wxConvUTF8) );  
00857                 _loadSTLMapper = vtkPolyDataMapper::New();
00858                 _loadSTLMapper->SetInput(imgReader->GetOutput());
00859                 _loadActorSTL = vtkActor::New();
00860                 _loadActorSTL->SetMapper(_loadSTLMapper);
00861                 _loadActorSTL->GetProperty()->SetColor( 1, 0, 0);
00862                 _loadActorSTL->GetProperty()->SetOpacity( 0.5 );
00863                 vtkRenderer *ren = _wxMaracasMPR->GetWxvtkmpr3Dview_BB()->GetWxvtk3Dbaseview()->GetRenderer();
00864                 ren->AddActor(_loadActorSTL);
00865                 imgReader->Delete();
00866         }
00867         //By default *always* update e_installation_directory:
00868         _mar->_parameters->setStringParam( marParameters::e_installation_directory, dialog.GetPath( ) ); 
00869         _mar->saveParameters( );
00870 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnChangeSTLGaussLevel ( wxScrollEvent &  event  ) 
void wxSTLWidget_03::OnChangeSTLGaussLevel ( wxScrollEvent &  event  ) 

Definition at line 1005 of file Copie de wxSTLWidget_03.cxx.

References _stlDeltaGaussLevel, generateSTLSurfaces(), Refresh(), and stlSliderDeltaGauss.

Referenced by CreateSmoothingPanel().

01006 {
01007         wxBusyCursor wait;
01008         _stlDeltaGaussLevel  = ((double)stlSliderDeltaGauss->GetValue())/100;
01009         generateSTLSurfaces();
01010         Refresh();
01011 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnChangeSTLMarchingCubesLevel ( wxScrollEvent &  event  ) 
void wxSTLWidget_03::OnChangeSTLMarchingCubesLevel ( wxScrollEvent &  event  ) 

Definition at line 1014 of file Copie de wxSTLWidget_03.cxx.

References _stlMarchingCubesLevel, generateSTLSurfaces(), Refresh(), and stlSliderMarchingCubes.

Referenced by CreateSmoothingPanel().

01015 {
01016         wxBusyCursor wait;
01017         _stlMarchingCubesLevel = ((double)stlSliderMarchingCubes->GetValue());
01018         generateSTLSurfaces();
01019         Refresh();
01020         
01021 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnEndChanged_range ( wxCommandEvent &  event  ) 
void wxSTLWidget_03::OnEndChanged_range ( wxCommandEvent &  event  ) 

Definition at line 751 of file Copie de wxSTLWidget_03.cxx.

References mBarRange::GetEnd(), lastResizeRef_Value, and sl_barrange_segmentation.

Referenced by CreateSegmentationPanel().

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnJoinRegions ( wxCommandEvent &  event  ) 
void wxSTLWidget_03::OnJoinRegions ( wxCommandEvent &  event  ) 
void wxSTLWidget_03::OnMaxSpin ( wxScrollEvent &  event  ) 
void wxSTLWidget_03::OnMaxSpin ( wxScrollEvent &  event  ) 

Definition at line 708 of file Copie de wxSTLWidget_03.cxx.

00709 {
00710         /*wxSlider *sl_A=_sl_maxSize;
00711         wxSlider *sl_B=_sl_maxSizeSpin;
00712         int value = sl_A->GetValue();
00713         int delta = (int)pow( 4 , sl_B->GetValue() );
00714         int min=value - delta/2;
00715         int max=value + delta/2;
00716         if (min<0)
00717         {
00718                 min=0;
00719                 max=delta;
00720         }
00721         sl_A->SetRange(min,max);*/      
00722 }

void wxSTLWidget_03::OnMinSpin ( wxScrollEvent &  event  ) 
void wxSTLWidget_03::OnMinSpin ( wxScrollEvent &  event  ) 

Definition at line 687 of file Copie de wxSTLWidget_03.cxx.

00688 {
00689         /*wxSlider *sl_A=_sl_minSize;
00690         wxSlider *sl_B=_sl_minSizeSpin;
00691         int value = sl_A->GetValue();
00692         int delta=(int)pow( 4 , sl_B->GetValue() );
00693         int min=value - delta/2;
00694         int max=value + delta/2;
00695         if (min<0)
00696         {
00697                 min=0;
00698                 max=delta;
00699         }
00700         sl_A->SetRange(min,max);
00701 
00702 
00703         */
00704 }

void wxSTLWidget_03::OnOpacity_Vol ( wxScrollEvent &  event  ) 
void wxSTLWidget_03::OnOpacity_Vol ( wxScrollEvent &  event  ) 

Definition at line 677 of file Copie de wxSTLWidget_03.cxx.

References _2_isoActorMC6, _opacity_Vol, and Refresh().

Referenced by CreateSegmentationPanel().

00678 {
00679         if (_2_isoActorMC6!=NULL){
00680                 double value = ((double)_opacity_Vol->GetValue())/100;
00681                 _2_isoActorMC6->GetProperty( )->SetOpacity( value );
00682                 Refresh();
00683         }
00684 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnOpacitySTLExternal ( wxScrollEvent &  event  ) 
void wxSTLWidget_03::OnOpacitySTLExternal ( wxScrollEvent &  event  ) 

Definition at line 926 of file Copie de wxSTLWidget_03.cxx.

References actorExternal, Refresh(), and stlSliderOpacityExternal.

Referenced by CreateSmoothingPanel().

00926                                                              {
00927         double value = ((double)stlSliderOpacityExternal->GetValue())/100;
00928     actorExternal->GetProperty( )->SetOpacity( value );
00929         Refresh();
00930 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnOpacitySTLFile ( wxScrollEvent &  event  ) 
void wxSTLWidget_03::OnOpacitySTLFile ( wxScrollEvent &  event  ) 

Definition at line 810 of file Copie de wxSTLWidget_03.cxx.

References _loadActorSTL, _sl_opacity_STL_file, and Refresh().

Referenced by CreateReadSTLFilePanel().

00811 {
00812         if (_loadActorSTL!=NULL)
00813         {
00814                 double value = ((double)_sl_opacity_STL_file->GetValue())/100;
00815                 _loadActorSTL->GetProperty( )->SetOpacity( value );
00816                 Refresh();
00817         }
00818 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnOpacitySTLInternal ( wxScrollEvent &  event  ) 
void wxSTLWidget_03::OnOpacitySTLInternal ( wxScrollEvent &  event  ) 

Definition at line 933 of file Copie de wxSTLWidget_03.cxx.

References actorInternal, Refresh(), and stlSliderOpacityInternal.

Referenced by CreateSmoothingPanel().

00933                                                              {
00934         double value = ((double)stlSliderOpacityInternal->GetValue())/100;
00935     actorInternal->GetProperty( )->SetOpacity( value );
00936         Refresh();
00937 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnRangeSpin ( wxScrollEvent &  event  ) 
void wxSTLWidget_03::OnRangeSpin ( wxScrollEvent &  event  ) 

Definition at line 726 of file Copie de wxSTLWidget_03.cxx.

References _sl_RangeSizeSpin, lastResizeRef_Value, maxRangeValue, minRangeValue, mBarRange::setRepresentedValues(), and sl_barrange_segmentation.

Referenced by CreateSegmentationPanel().

00727 {
00728         wxSlider *sl_B=_sl_RangeSizeSpin;
00729 
00730         int value = lastResizeRef_Value;
00731         int delta = (int)pow( 4 , sl_B->GetValue() );
00732         int startResized = value - delta/2;
00733         int endResized = value + delta/2;
00734 
00735         if( startResized < minRangeValue )
00736                 startResized = minRangeValue;
00737 
00738         if( endResized > maxRangeValue )
00739                 endResized = maxRangeValue;
00740 
00741         sl_barrange_segmentation->setRepresentedValues(startResized,endResized);
00742         sl_barrange_segmentation -> RefreshForce();     
00743 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::OnStartChanged_range ( wxCommandEvent &  event  ) 
void wxSTLWidget_03::OnStartChanged_range ( wxCommandEvent &  event  ) 

Definition at line 746 of file Copie de wxSTLWidget_03.cxx.

References mBarRange::GetStart(), lastResizeRef_Value, and sl_barrange_segmentation.

Referenced by CreateSegmentationPanel().

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::Refresh (  ) 
void wxSTLWidget_03::Refresh (  ) 

Definition at line 417 of file Copie de wxSTLWidget_03.cxx.

References _wxMaracasMPR, and wxMaracasMPR::RefreshView().

Referenced by OnBtnExtraction(), OnBtnSTLFileErase(), OnChangeSTLGaussLevel(), OnChangeSTLMarchingCubesLevel(), OnOpacity_Vol(), OnOpacitySTLExternal(), OnOpacitySTLFile(), and OnOpacitySTLInternal().

00418 {
00419         if (_wxMaracasMPR!=NULL){
00420                 _wxMaracasMPR->RefreshView();
00421         }
00422 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::Reset_vtk_STLFile (  ) 
void wxSTLWidget_03::Reset_vtk_STLFile (  ) 

Definition at line 820 of file Copie de wxSTLWidget_03.cxx.

References _loadActorSTL, _loadSTLMapper, _wxMaracasMPR, wxVtk3DBaseView::GetRenderer(), wxVtkMPR3DView::GetWxvtk3Dbaseview(), and wxMaracasMPR::GetWxvtkmpr3Dview_BB().

Referenced by OnBtnSTLFileErase(), OnBtnSTLFileLoad(), and ~wxSTLWidget_03().

00821 {
00822         // Remove
00823         vtkRenderer *ren = _wxMaracasMPR->GetWxvtkmpr3Dview_BB()->GetWxvtk3Dbaseview()->GetRenderer();
00824     if (_loadActorSTL){
00825                 ren->RemoveActor(_loadActorSTL);
00826         }
00827 
00828         // Delete 
00829         if (_loadSTLMapper              ) {     _loadSTLMapper          -> Delete(); }
00830         if (_loadActorSTL               ) {     _loadActorSTL           -> Delete(); }
00831 
00832         // Init
00833         _loadSTLMapper          = NULL;
00834         _loadActorSTL           = NULL;
00835 
00836 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::ResetTree2_JF (  )  [private]
void wxSTLWidget_03::ResetTree2_JF (  )  [private]

Definition at line 557 of file Copie de wxSTLWidget_03.cxx.

References _2_isoActorMC6, _2_isoMapperMC6, _2_isoMC6, _2_mapfinal, _2_stripfinal, _wxMaracasMPR, wxVtk3DBaseView::GetRenderer(), wxVtkMPR3DView::GetWxvtk3Dbaseview(), and wxMaracasMPR::GetWxvtkmpr3Dview_BB().

Referenced by ~wxSTLWidget_03().

00558 {
00559         // Remove 
00560         vtkRenderer *ren = _wxMaracasMPR->GetWxvtkmpr3Dview_BB()->GetWxvtk3Dbaseview()->GetRenderer();
00561 
00562     if (_2_isoActorMC6){
00563                 ren->RemoveActor(_2_isoActorMC6);
00564         }
00565     if (_2_stripfinal){
00566                 ren->RemoveActor(_2_stripfinal);
00567         }
00568 
00569         // Delete 
00570 //      if (_2_prgov            ) {     _2_prgov                -> Delete(); }
00571         if (_2_mapfinal         ) {     _2_mapfinal             -> Delete(); }
00572         if (_2_stripfinal       ) {     _2_stripfinal   -> Delete(); }
00573         if (_2_isoMapperMC6     ) {     _2_isoMapperMC6 -> Delete(); }
00574         if (_2_isoActorMC6      ) {     _2_isoActorMC6  -> Delete(); }
00575         if (_2_isoMC6           ) {     _2_isoMC6               -> Delete(); }
00576 
00577         // Init
00578 //      _2_prgov                = NULL;
00579         _2_mapfinal             = NULL;
00580         _2_stripfinal   = NULL;
00581         _2_isoMapperMC6 = NULL;
00582         _2_isoActorMC6  = NULL;
00583         _2_isoMC6               = NULL;
00584 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSTLWidget_03::setImage ( vtkImageData *  img  ) 

Definition at line 203 of file wxSTLWidget_03.cxx.

References _wxMaracasMPR, ConfigureProcessing(), ConfigureSTL(), wxMaracasMPR::ConfigureVTK(), and wxMaracasMPR::setImageData().

00203                                               {
00204 
00205         _wxMaracasMPR->setImageData(img, 1);
00206         _wxMaracasMPR->ConfigureVTK();
00207 
00208 
00209         this->ConfigureProcessing(img,0,0,0);
00210         this->ConfigureSTL();
00211 
00212         _wxMaracasMPR->Refresh();
00213         
00214         //this->Refresh();
00215 }

Here is the call graph for this function:


Member Data Documentation

vtkActor * wxSTLWidget_03::_2_isoActorMC6 [private]
vtkPolyDataMapper * wxSTLWidget_03::_2_isoMapperMC6 [private]

Definition at line 103 of file Copie de wxSTLWidget_03.h.

Referenced by ExtractSurface(), ResetTree2_JF(), and wxSTLWidget_03().

vtkMarchingCubes * wxSTLWidget_03::_2_isoMC6 [private]

Definition at line 105 of file Copie de wxSTLWidget_03.h.

Referenced by ExtractSurface(), ResetTree2_JF(), and wxSTLWidget_03().

vtkPolyDataMapper * wxSTLWidget_03::_2_mapfinal [private]

Definition at line 101 of file Copie de wxSTLWidget_03.h.

Referenced by ResetTree2_JF(), and wxSTLWidget_03().

vtkActor * wxSTLWidget_03::_2_stripfinal [private]

Definition at line 102 of file Copie de wxSTLWidget_03.h.

Referenced by ResetTree2_JF(), and wxSTLWidget_03().

vtkImageCast* wxSTLWidget_03::_cast [private]

Definition at line 101 of file wxSTLWidget_03.h.

Referenced by ConfigureProcessing(), and wxSTLWidget_03().

vtkImageSeedConnectivity * wxSTLWidget_03::_connect [private]

Definition at line 96 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureProcessing(), ExtractSurface(), and wxSTLWidget_03().

vtkImageSeedConnectivity * wxSTLWidget_03::_connect2 [private]

Definition at line 97 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureProcessing(), ExtractSurface(), and wxSTLWidget_03().

vtkImageData * wxSTLWidget_03::_imagedata [private]

Definition at line 89 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureProcessing(), ExtractSurface(), and wxSTLWidget_03().

Definition at line 131 of file Copie de wxSTLWidget_03.h.

Referenced by wxSTLWidget_03().

vtkActor * wxSTLWidget_03::_loadActorSTL [private]
vtkPolyDataMapper * wxSTLWidget_03::_loadSTLMapper [private]

Definition at line 111 of file Copie de wxSTLWidget_03.h.

Referenced by OnBtnSTLFileLoad(), Reset_vtk_STLFile(), and wxSTLWidget_03().

int wxSTLWidget_03::_maxSize [private]

Definition at line 107 of file Copie de wxSTLWidget_03.h.

Referenced by ExtractSurface(), OnBtnExtraction(), and wxSTLWidget_03().

int wxSTLWidget_03::_minSize [private]

Definition at line 108 of file Copie de wxSTLWidget_03.h.

Referenced by ExtractSurface(), OnBtnExtraction(), and wxSTLWidget_03().

wxSlider * wxSTLWidget_03::_opacity_Vol [private]
double wxSTLWidget_03::_range [private]

Definition at line 90 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureProcessing(), and ExtractSurface().

Definition at line 106 of file Copie de wxSTLWidget_03.h.

wxSlider * wxSTLWidget_03::_sl_maxSize [private]

Definition at line 117 of file Copie de wxSTLWidget_03.h.

wxSlider * wxSTLWidget_03::_sl_maxSizeSpin [private]

Definition at line 119 of file Copie de wxSTLWidget_03.h.

wxSlider * wxSTLWidget_03::_sl_minSize [private]

Definition at line 116 of file Copie de wxSTLWidget_03.h.

wxSlider * wxSTLWidget_03::_sl_minSizeSpin [private]

Definition at line 118 of file Copie de wxSTLWidget_03.h.

wxSlider * wxSTLWidget_03::_sl_RangeSizeSpin [private]

Definition at line 120 of file Copie de wxSTLWidget_03.h.

Referenced by CreateSegmentationPanel(), and OnRangeSpin().

vtkImageThreshold * wxSTLWidget_03::_thresh [private]

Definition at line 94 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureProcessing(), ExtractSurface(), and wxSTLWidget_03().

vtkImageThreshold * wxSTLWidget_03::_thresh2 [private]

Definition at line 95 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureProcessing(), ExtractSurface(), and wxSTLWidget_03().

vtkActor * wxSTLWidget_03::actorExternal [private]

Definition at line 172 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureSTL(), OnOpacitySTLExternal(), and wxSTLWidget_03().

vtkActor * wxSTLWidget_03::actorInternal [private]

Definition at line 168 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureSTL(), OnOpacitySTLInternal(), and wxSTLWidget_03().

vtkImageData * wxSTLWidget_03::arteryImageData [private]

Definition at line 185 of file Copie de wxSTLWidget_03.h.

Referenced by wxSTLWidget_03().

vtkImageCast * wxSTLWidget_03::cast2 [private]

Definition at line 91 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureProcessing(), ExtractSurface(), and wxSTLWidget_03().

vtkImageCast * wxSTLWidget_03::cast3 [private]

Definition at line 92 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureProcessing(), ExtractSurface(), and wxSTLWidget_03().

vtkImageCast * wxSTLWidget_03::cast4 [private]
vtkPolyDataMapper * wxSTLWidget_03::dsm1 [private]

Definition at line 167 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureSTL(), and wxSTLWidget_03().

vtkPolyDataMapper * wxSTLWidget_03::dsm2 [private]

Definition at line 171 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureSTL(), and wxSTLWidget_03().

vtkActor * wxSTLWidget_03::joinActor [private]

Definition at line 189 of file Copie de wxSTLWidget_03.h.

Referenced by wxSTLWidget_03().

Definition at line 186 of file Copie de wxSTLWidget_03.h.

Referenced by wxSTLWidget_03().

vtkPolyDataMapper * wxSTLWidget_03::joinMapper [private]

Definition at line 188 of file Copie de wxSTLWidget_03.h.

Referenced by wxSTLWidget_03().

vtkMarchingCubes * wxSTLWidget_03::joinMarchingCubes [private]

Definition at line 187 of file Copie de wxSTLWidget_03.h.

Referenced by wxSTLWidget_03().

Definition at line 129 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureProcessing(), and OnRangeSpin().

Definition at line 128 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureProcessing(), and OnRangeSpin().

vtkPolyData * wxSTLWidget_03::stlExterna [private]

Definition at line 175 of file Copie de wxSTLWidget_03.h.

Referenced by ConfigureSTL(), generateSTLSurfaces(), and wxSTLWidget_03().

vtkPolyData * wxSTLWidget_03::stlInterna [private]

The documentation for this class was generated from the following files:

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1