Class that brigde to VTK, override double click... More...
#include <vtk3DSurfaceSTLWidget.h>
Public Member Functions | |
vtk3DSurfaceSTLWidget (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxPanelNameStr) | |
~vtk3DSurfaceSTLWidget () | |
void | ConfigureVTK () |
bool | IntersectPlaneWithLine (double *p, double *x1, double *x2, double *x3, double *x4, double *x5) |
bool | FindCubePointsFromPoints (double *pO, double *pF, double *pickPoint, double *cameraPos) |
bool | GetPointAndNormalIntersection (double *p, double *n, double *pO, double *pF) |
void | ShowMARACASData (marInterface *mar) |
void | ShowMARACASDataAndAxe (marInterface *mar) |
void | SetSurfaceColor (float red, float green, float blue) |
void | SetSurfaceVisibility (bool visible) |
void | SetSTLSurfaceVisibility (bool intvisible, bool extvisible) |
void | SetSurfaceIsoValue (int isoval) |
void | SetSurfaceOpacity (int opaval) |
void | GetSphereCenter (double center[3]) |
void | SetAxis (vtkPolyData *axis) |
void | RemoveAxis () |
void | ConstructVessel () |
void | SetCuttingMode (bool mode) |
void | ExportSurfaceAsSTL (const char *fileprefix) |
void | SetSTLThresholdRatio (double ratio) |
float | GetSTLThreshold () |
vtkGetMacro (InitialSphere, int) | |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | Initialize () |
void | Enable () |
bool | Enable (bool enable) |
void | Disable () |
void | Start () |
void | UpdateSize (int x, int y) |
int | CreateTimer (int timertype) |
int | DestroyTimer () |
void | TerminateApp () |
void | OnPaint (wxPaintEvent &event) |
void | OnEraseBackground (wxEraseEvent &event) |
void | OnMotion (wxMouseEvent &event) |
void | OnButtonDown (wxMouseEvent &event) |
(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1) | |
void | OnButtonUp (wxMouseEvent &event) |
void | OnEnter (wxMouseEvent &event) |
void | OnLeave (wxMouseEvent &event) |
void | OnKeyDown (wxKeyEvent &event) |
void | OnKeyUp (wxKeyEvent &event) |
void | OnTimer (wxTimerEvent &event) |
void | OnSize (wxSizeEvent &event) |
void | OnMouseWheel (wxMouseEvent &event) |
void | Render () throw (char*) |
void | SetRenderWhenDisabled (int newValue) |
vtkGetMacro (Stereo, int) | |
vtkBooleanMacro (Stereo, int) | |
vtkBooleanMacro (UseCaptureMouse, int) | |
virtual void | SetStereo (int capable) |
vtkSetMacro (UseCaptureMouse, int) | |
Static Public Member Functions | |
static wxVTKRenderWindowInteractor * | New () |
Public Attributes | |
vtkImageData * | _marImageData |
vtkPolyData * | _marPolyData |
Protected Member Functions | |
void | SetInitialPoint (double *pickPoint, double *cameraPos) |
void | SetInitialPoint (double *point) |
vtkPolyData * | ConvertMarAxisToPolyData () |
long | GetHandleHack () |
Protected Attributes | |
vtkImagePolyDataSeedConnectivity * | _psc |
marInterface * | _mar |
vtkRenderer * | _pRenderer |
vtkRenderWindow * | _pRenderWindow |
vtkOutlineFilter * | _outLine |
vtkPolyDataMapper * | _outMapper |
vtkActor * | _outActor |
vtkMarchingCubes * | _mCubes |
vtkPolyDataMapper * | _surfMapper |
vtkActor * | _surfActor |
vtkPolyData * | _centralLine |
vtkPolyDataMapper * | _centralLineMapper |
vtkActor * | _centralLineActor |
vtkSphereSource * | _spheres [4] |
vtkPolyDataMapper * | _spheresMapper [4] |
vtkActor * | _spheresActor [4] |
vtkPolyDataMapper * | _axesMapper |
vtkActor * | _axesActor |
vtkActor * | _actorVessel |
vtkActor * | _actorExternalVessel |
vtkPolyData * | _stlInternalVessel |
vtkPolyData * | _stlExternalVessel |
vtkInteractorStyleCutter * | _iasc |
wxTimer | timer |
int | ActiveButton |
int | RenderAllowed |
int | Stereo |
Private Member Functions | |
DECLARE_EVENT_TABLE () | |
Private Attributes | |
int | _width |
int | _height |
int | _depth |
int | InitialSphere |
Class that brigde to VTK, override double click...
Definition at line 41 of file vtk3DSurfaceSTLWidget.h.
vtk3DSurfaceSTLWidget::vtk3DSurfaceSTLWidget | ( | wxWindow * | parent, | |
wxWindowID | id, | |||
const wxPoint & | pos = wxDefaultPosition , |
|||
const wxSize & | size = wxDefaultSize , |
|||
long | style = 0 , |
|||
const wxString & | name = wxPanelNameStr | |||
) |
Definition at line 61 of file vtk3DSurfaceSTLWidget.cxx.
References vtkInteractorStyle3DMaracas::New().
00068 : wxVTKRenderWindowInteractor( parent, id, pos, size, style, name ){ 00069 00070 00071 //make current interactor style be trackbal camera, asked by radiologists. 00072 // vtkInteractorStyleSwitch *iss = dynamic_cast<vtkInteractorStyleSwitch*>(this->GetInteractorStyle()); 00073 // iss->SetCurrentStyleToTrackballCamera(); 00074 00075 00076 vtkInteractorStyle3DMaracas *interactorStyle3DMaracas = vtkInteractorStyle3DMaracas::New(); 00077 interactorStyle3DMaracas->SetInteractor (this); 00078 this->SetInteractorStyle(interactorStyle3DMaracas); 00079 00080 00081 _pRenderer = vtkRenderer::New( ); 00082 InitialSphere = 0; 00083 _centralLine = NULL; 00084 _centralLineMapper = NULL; 00085 _centralLineActor = NULL; 00086 _axesMapper = NULL; 00087 _axesActor = NULL; 00088 for(int i=0; i<4; i++) 00089 { 00090 _spheres[ i ] = NULL; 00091 _spheresMapper[ i ] = NULL; 00092 _spheresActor[ i ] = NULL; 00093 } 00094 _axesActor = NULL; 00095 _axesMapper = NULL; 00096 _psc = NULL; 00097 _stlExternalVessel = _stlInternalVessel = NULL; 00098 _surfMapper = NULL; 00099 _actorExternalVessel= _actorVessel = NULL; 00100 _iasc = NULL; 00101 }
vtk3DSurfaceSTLWidget::~vtk3DSurfaceSTLWidget | ( | ) |
Definition at line 103 of file vtk3DSurfaceSTLWidget.cxx.
References _actorExternalVessel, _actorVessel, _axesActor, _axesMapper, _centralLine, _centralLineActor, _centralLineMapper, _iasc, _mCubes, _outActor, _outLine, _outMapper, _pRenderer, _psc, _spheres, _spheresActor, _spheresMapper, _surfActor, and _surfMapper.
00104 { 00105 //good luck: 00106 if( _outActor ) _outActor ->Delete( ); 00107 if( _outMapper ) _outMapper ->Delete( ); 00108 if( _outLine ) _outLine ->Delete( ); 00109 if( _surfActor ) _surfActor ->Delete( ); 00110 if( _surfMapper ) _surfMapper ->Delete( ); 00111 if( _mCubes ) _mCubes ->Delete( ); 00112 if( _centralLine ) _centralLine ->Delete( ); 00113 if( _centralLineMapper ) _centralLineMapper->Delete( ); 00114 if( _centralLineActor ) _centralLineActor ->Delete( ); 00115 if( _axesActor ) _axesActor ->Delete(); 00116 if( _axesMapper ) _axesMapper ->Delete(); 00117 if( _actorVessel ) _actorVessel ->Delete(); 00118 if( _actorExternalVessel )_actorExternalVessel->Delete(); 00119 // if( _stlExternalVessel ) _stlExternalVessel->Delete(); 00120 // if( _stlInternalVessel ) _stlInternalVessel->Delete(); 00121 if( _psc ) _psc ->Delete(); 00122 if(_iasc) _iasc ->Delete(); 00123 for(int i=0; i<4; i++) 00124 { 00125 if( _spheres[ i ] ) _spheres[ i ] ->Delete( ); 00126 if( _spheresMapper[ i ] ) _spheresMapper[ i ] ->Delete( ); 00127 if( _spheresActor[ i ] ) _spheresActor[ i ] ->Delete( ); 00128 } 00129 if( _pRenderer ) _pRenderer ->Delete( ); 00130 }
void vtk3DSurfaceSTLWidget::ConfigureVTK | ( | ) |
Definition at line 518 of file vtk3DSurfaceSTLWidget.cxx.
References _pRenderer, and _pRenderWindow.
Referenced by ShowMARACASData().
00519 { 00520 // get render window 00521 _pRenderWindow = this->GetRenderWindow( ); 00522 00523 // connect renderer and render window and configure render window 00524 _pRenderWindow->AddRenderer( _pRenderer ); 00525 00526 // configure renderer 00527 _pRenderer->SetBackground( 0.0, 0.0, 0.0 ); 00528 //_pRenderer->SetBackground( 1, 1, 0); //FIXME 00529 _pRenderer->GetActiveCamera( )->Zoom( 1.0 ); 00530 _pRenderer->GetActiveCamera( )->SetClippingRange( 1, 1000 ); 00531 }
void vtk3DSurfaceSTLWidget::ConstructVessel | ( | ) |
Definition at line 753 of file vtk3DSurfaceSTLWidget.cxx.
References _actorExternalVessel, _actorVessel, _marImageData, _pRenderer, _pRenderWindow, _psc, _stlExternalVessel, _stlInternalVessel, ConvertMarAxisToPolyData(), wxVTKRenderWindowInteractor::New(), and vtkImagePolyDataSeedConnectivity::SetAxis().
00754 { 00755 vtkPolyData *axis = this->ConvertMarAxisToPolyData( ); 00756 00757 //retrieve the vtk image data 00758 00759 if( !_psc) this->_psc = vtkImagePolyDataSeedConnectivity::New(); 00760 this->_psc->SetInput( _marImageData ); 00761 this->_psc->SetAxis( axis ); 00762 this->_psc->Update(); 00763 axis->Delete(); 00764 00765 /* vtkStripper *strip = vtkStripper::New(); 00766 strip->SetInput( this->_psc->GetOutput() ); //GetOutput() -> inner mold 00767 strip->Update(); //Important before a ShallowCopy !!! 00768 00769 if( !_stlInternalVessel) _stlInternalVessel = vtkPolyData::New(); 00770 _stlInternalVessel->ShallowCopy( strip->GetOutput() ); 00771 strip->Delete();*/ 00772 _stlInternalVessel = this->_psc->GetOutput(); 00773 00774 /* if( !_stlExternalVessel) _stlExternalVessel = vtkPolyData::New(); 00775 _stlExternalVessel->ShallowCopy( this->_psc->GetOuterMold() ); 00776 //this->_psc->GetOuterMold()->Delete();*/ 00777 _stlExternalVessel = this->_psc->GetOuterMold(); 00778 00779 vtkPolyDataMapper *dsm1 = vtkPolyDataMapper ::New(); 00780 dsm1->SetInput ( _stlInternalVessel ); //fasten stuff 00781 dsm1->ScalarVisibilityOff(); 00782 00783 _actorVessel = vtkActor::New(); 00784 _actorVessel->SetMapper (dsm1); 00785 00786 //improve visibility: 00787 _actorVessel->GetProperty()->SetColor (1,0,0); 00788 00789 vtkPolyDataMapper *dsm2 = vtkPolyDataMapper ::New(); 00790 dsm2->SetInput ( _stlExternalVessel ); 00791 dsm2->ScalarVisibilityOff(); 00792 00793 _actorExternalVessel = vtkActor::New(); 00794 _actorExternalVessel->SetMapper (dsm2); 00795 00796 //improve visibility: 00797 _actorExternalVessel->GetProperty()->SetRepresentationToWireframe(); 00798 00799 _pRenderer->AddActor( _actorVessel ); 00800 _pRenderer->AddActor( _actorExternalVessel ); 00801 _pRenderWindow->Render( ); 00802 00803 dsm1->Delete(); 00804 dsm2->Delete(); 00805 }
vtkPolyData * vtk3DSurfaceSTLWidget::ConvertMarAxisToPolyData | ( | ) | [protected] |
What we are doing here is from a LFV marAxis to turn it into a vtkPolyData Therefore it should be a lot more easier to integrate in a real vtk class for filtering : vtkMaracasImageToSTL
Definition at line 719 of file vtk3DSurfaceSTLWidget.cxx.
References marInterface::_experiment, _mar, marExperiment::getAxis(), marAxis::getSignal(), marAxis::INDX_count, marAxis::INDX_RAYON, and wxVTKRenderWindowInteractor::New().
Referenced by ConstructVessel().
00720 { 00721 double p1[marAxis::INDX_count]; 00722 //retrieve the actual axis 00723 marAxis* ax = _mar->_experiment->getAxis(); 00724 //Number of axis points 00725 int numPoints = ax->getNumberOfControlPoints(); 00726 00727 vtkPolyData *axis = vtkPolyData::New(); 00728 vtkPoints *points = vtkPoints::New(); 00729 vtkFloatArray *scalars = vtkFloatArray::New(); 00730 scalars->SetNumberOfComponents (2); 00731 //Field are : 1. radius (=INDX_RAYON) , 2. average (=INDX_SIGNALVALUE) 00732 00733 double tmp1,tmp2; 00734 for(int i=0; i<numPoints; i++){ 00735 ax->getControlPoint(i, p1, p1+3); 00736 points->InsertPoint(i, p1); 00737 tmp1 = p1[marAxis::INDX_RAYON]; 00738 // tmp2 = p1[marAxis::INDX_SIGNALVALUE]; 00739 tmp2 = (double)ax->getSignal(i); 00740 scalars->InsertTuple2(i,tmp1, tmp2); 00741 00742 } 00743 00744 // We now assign the pieces to the vtkPolyData. 00745 axis->SetPoints(points); 00746 points->Delete(); 00747 axis->GetPointData()->SetScalars(scalars); 00748 scalars->Delete(); 00749 00750 return axis; 00751 }
int wxVTKRenderWindowInteractor::CreateTimer | ( | int | timertype | ) | [inherited] |
vtk3DSurfaceSTLWidget::DECLARE_EVENT_TABLE | ( | ) | [private] |
int wxVTKRenderWindowInteractor::DestroyTimer | ( | ) | [inherited] |
Definition at line 267 of file wxVTKRenderWindowInteractor.cxx.
void wxVTKRenderWindowInteractor::Disable | ( | ) | [inherited] |
Definition at line 223 of file wxVTKRenderWindowInteractor.cxx.
bool wxVTKRenderWindowInteractor::Enable | ( | bool | enable | ) | [inherited] |
Definition at line 214 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::Enable().
00215 { 00216 #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) 00217 return wxGLCanvas::Enable(enable); 00218 #else 00219 return wxWindow::Enable(enable); 00220 #endif 00221 }
void wxVTKRenderWindowInteractor::Enable | ( | ) | [inherited] |
Definition at line 200 of file wxVTKRenderWindowInteractor.cxx.
Referenced by wxVTKRenderWindowInteractor::Enable(), and wxVTKRenderWindowInteractor::Initialize().
00201 { 00202 // if already enabled then done 00203 if (Enabled) 00204 return; 00205 00206 // that's it 00207 Enabled = 1; 00208 #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) 00209 SetCurrent(); 00210 #endif 00211 Modified(); 00212 }
void vtk3DSurfaceSTLWidget::ExportSurfaceAsSTL | ( | const char * | fileprefix | ) |
Definition at line 272 of file vtk3DSurfaceSTLWidget.cxx.
References _stlExternalVessel, _stlInternalVessel, and wxVTKRenderWindowInteractor::New().
00273 { 00274 std::string prefix; 00275 00276 //Now save for real in STL format 00277 //Don't forget to go through a triangle filter 00278 vtkTriangleFilter *triangle = vtkTriangleFilter::New(); 00279 triangle->SetInput( _stlInternalVessel ); 00280 //In difficult case (such as BESSON) mesh can be more than one piece: 00281 vtkPolyDataConnectivityFilter *pdcf = vtkPolyDataConnectivityFilter::New(); 00282 pdcf->SetInput( triangle->GetOutput() ); 00283 //In difficult case (such as BESSON) mesh can still be open...close it ! 00284 vtkClosePolyData *close = vtkClosePolyData::New(); 00285 close->SetInput( pdcf->GetOutput() ); 00286 00287 vtkSTLWriter *internal_mold_stl = vtkSTLWriter::New(); 00288 internal_mold_stl->SetInput( close->GetOutput() ); 00289 prefix = fileprefix; 00290 prefix += "-internal.stl"; 00291 internal_mold_stl->SetFileName( prefix.c_str() ); 00292 internal_mold_stl->SetFileTypeToBinary(); 00293 internal_mold_stl->Write(); 00294 internal_mold_stl->Delete(); 00295 00296 //convert to triangles first: 00297 triangle->SetInput( _stlExternalVessel ); 00298 00299 vtkSTLWriter *external_mold_stl = vtkSTLWriter::New(); 00300 external_mold_stl->SetInput( close->GetOutput() ); 00301 prefix = fileprefix; 00302 prefix += "-external.stl"; 00303 external_mold_stl->SetFileName( prefix.c_str() ); 00304 external_mold_stl->SetFileTypeToBinary(); 00305 external_mold_stl->Write(); 00306 external_mold_stl->Delete(); 00307 00308 triangle->Delete(); 00309 close->Delete(); 00310 pdcf->Delete(); 00311 }
bool vtk3DSurfaceSTLWidget::FindCubePointsFromPoints | ( | double * | pO, | |
double * | pF, | |||
double * | pickPoint, | |||
double * | cameraPos | |||
) |
Definition at line 583 of file vtk3DSurfaceSTLWidget.cxx.
References _depth, _height, _width, gtm::TVector< T >::GetAnsiRef(), and IntersectPlaneWithLine().
Referenced by SetInitialPoint().
00584 { 00585 gtm::TVector< double > p1( 3 ), p2( 3 ), p3( 3 ), p4( 3 ), p5( 3 ), p6( 3 ); 00586 gtm::TVector< double > c( 3 ); 00587 gtm::TVector< double >* swp; 00588 gtm::TVector< double > tpO( pO, 3, false ), tpF( pF, 3, false ); 00589 std::vector< gtm::TVector< double >* > points; 00590 double x1[ 3 ], x2[ 3 ], x3[ 3 ], d1, d2; 00591 int i, j; 00592 00593 // 1st plane intersection 00594 x1[ 0 ] = 0; x1[ 1 ] = _height; x1[ 2 ] = 0; 00595 x2[ 0 ] = 0; x2[ 1 ] = 0; x2[ 2 ] = 0; 00596 x3[ 0 ] = 0; x3[ 1 ] = 0; x3[ 2 ] = _depth; 00597 if( this->IntersectPlaneWithLine( p1.GetAnsiRef( ), x1, x2, x3, cameraPos, pickPoint ) ) 00598 points.push_back( &p1 ); 00599 00600 // 2nd plane intersection 00601 x1[ 0 ] = 0; x1[ 1 ] = _height; x1[ 2 ] = _depth; 00602 x2[ 0 ] = 0; x2[ 1 ] = 0; x2[ 2 ] = _depth; 00603 x3[ 0 ] = _width; x3[ 1 ] = 0; x3[ 2 ] = _depth; 00604 if( this->IntersectPlaneWithLine( p2.GetAnsiRef( ), x1, x2, x3, cameraPos, pickPoint ) ) 00605 points.push_back( &p2 ); 00606 00607 // 3rd plane intersection 00608 x1[ 0 ] = 0; x1[ 1 ] = 0; x1[ 2 ] = _depth; 00609 x2[ 0 ] = 0; x2[ 1 ] = 0; x2[ 2 ] = 0; 00610 x3[ 0 ] = _width; x3[ 1 ] = 0; x3[ 2 ] = 0; 00611 if( this->IntersectPlaneWithLine( p3.GetAnsiRef( ), x1, x2, x3, cameraPos, pickPoint ) ) 00612 points.push_back( &p3 ); 00613 00614 // 4th plane intersection 00615 x1[ 0 ] = _width; x1[ 1 ] = _height; x1[ 2 ] = _depth; 00616 x2[ 0 ] = _width; x2[ 1 ] = 0; x2[ 2 ] = _depth; 00617 x3[ 0 ] = _width; x3[ 1 ] = 0; x3[ 2 ] = 0; 00618 if( this->IntersectPlaneWithLine( p4.GetAnsiRef( ), x1, x2, x3, cameraPos, pickPoint ) ) 00619 points.push_back( &p4 ); 00620 00621 // 5th plane intersection 00622 x1[ 0 ] = _width; x1[ 1 ] = 0; x1[ 2 ] = 0; 00623 x2[ 0 ] = 0; x2[ 1 ] = 0; x2[ 2 ] = 0; 00624 x3[ 0 ] = 0; x3[ 1 ] = _height; x3[ 2 ] = 0; 00625 if( this->IntersectPlaneWithLine( p5.GetAnsiRef( ), x1, x2, x3, cameraPos, pickPoint ) ) 00626 points.push_back( &p5 ); 00627 00628 // 6th plane intersection 00629 x1[ 0 ] = 0; x1[ 1 ] = _height; x1[ 2 ] = 0; 00630 x2[ 0 ] = 0; x2[ 1 ] = _height; x2[ 2 ] = _depth; 00631 x3[ 0 ] = _width; x3[ 1 ] = _height; x3[ 2 ] = _depth; 00632 if( this->IntersectPlaneWithLine( p6.GetAnsiRef( ), x1, x2, x3, cameraPos, pickPoint ) ) 00633 points.push_back( &p6 ); 00634 00635 if( points.size( ) >= 2 ) { // Did I find at least 2 points? 00636 00637 c( 0 ) = ( double )_width / 2.0; 00638 c( 1 ) = ( double )_height / 2.0; 00639 c( 2 ) = ( double )_depth / 2.0; 00640 00641 // Sort with bubble sort. Only 30 iterations! 00642 for( i = 0; i < points.size( ); i++ ) { 00643 for( j = 0; j < points.size( ) - 1; j++ ) { 00644 00645 d1 = ( c - *points[ j ] ).GetNorm( ); 00646 d2 = ( c - *points[ j + 1 ] ).GetNorm( ); 00647 if( d2 < d1 ) { 00648 00649 swp = points[ j ]; 00650 points[ j ] = points[ j + 1 ]; 00651 points[ j + 1 ] = swp; 00652 00653 } // fi 00654 00655 } // rof 00656 00657 } // rof 00658 00659 // Order the two points according to distance to camera. 00660 c = cameraPos; 00661 d1 = ( c - *points[ 0 ] ).GetNorm( ); 00662 d2 = ( c - *points[ 1 ] ).GetNorm( ); 00663 tpO = ( d1 < d2 )? *points[ 0 ]: *points[ 1 ]; 00664 tpF = ( d1 > d2 )? *points[ 0 ]: *points[ 1 ]; 00665 return( true ); 00666 00667 } else return( false ); 00668 00669 }
long wxVTKRenderWindowInteractor::GetHandleHack | ( | ) | [protected, inherited] |
Definition at line 296 of file wxVTKRenderWindowInteractor.cxx.
Referenced by wxVTKRenderWindowInteractor::Render().
00297 { 00298 //helper function to hide the MSW vs GTK stuff 00299 long handle_tmp = 0; 00300 00301 // __WXMSW__ is for Win32 00302 //__WXMAX__ stands for using Carbon C-headers, using either the CarbonLib/CFM or the native Mach-O builds (which then also use the latest features available) 00303 // __WXGTK__ is for both gtk 1.2.x and gtk 2.x 00304 #if defined(__WXMSW__) || defined(__WXMAC__) 00305 handle_tmp = (long)this->GetHandle(); 00306 #endif //__WXMSW__ 00307 00308 //__WXCOCOA__ stands for using the objective-c Cocoa API 00309 #ifdef __WXCOCOA__ 00310 // Here is how to find the NSWindow 00311 wxTopLevelWindow* toplevel = dynamic_cast<wxTopLevelWindow*>( 00312 wxGetTopLevelParent( this ) ); 00313 if (toplevel != NULL ) 00314 { 00315 handle_tmp = (long)toplevel->GetNSWindow(); 00316 } 00317 // The NSView will be deducted from 00318 // [(NSWindow*)Handle contentView] 00319 // if only I knew how to write that in c++ 00320 #endif //__WXCOCOA__ 00321 00322 // Find and return the actual X-Window. 00323 #if defined(__WXGTK__) || defined(__WXX11__) 00324 return (long)GetXWindow(this); 00325 #endif 00326 00327 //#ifdef __WXMOTIF__ 00328 // handle_tmp = (long)this->GetXWindow(); 00329 //#endif 00330 00331 return handle_tmp; 00332 }
bool vtk3DSurfaceSTLWidget::GetPointAndNormalIntersection | ( | double * | p, | |
double * | n, | |||
double * | pO, | |||
double * | pF | |||
) |
Definition at line 672 of file vtk3DSurfaceSTLWidget.cxx.
References _mCubes, gtm::TVector< T >::GetAnsiRef(), IntersectPlaneWithLine(), wxVTKRenderWindowInteractor::New(), and gtm::TVector< T >::Normalize().
Referenced by SetInitialPoint().
00673 { 00674 gtm::TVector< double > n1( 3 ), n2( 3 ), n3( 3 ); 00675 int subId, cellId, returnVal; 00676 double t, pcoords[ 3 ], x[ 3 ]; 00677 double fpO[ 3 ], fpF[ 3 ]; 00678 double p1[ 3 ], p2[ 3 ], p3[ 3 ]; 00679 vtkPolyData* data = _mCubes->GetOutput( ); 00680 vtkCellLocator* locator = vtkCellLocator::New( ); 00681 00682 locator->SetDataSet( data ); 00683 locator->Initialize( ); 00684 locator->Update( ); 00685 00686 fpO[ 0 ] = pO[ 0 ]; fpO[ 1 ] = pO[ 1 ]; fpO[ 2 ] = pO[ 2 ]; 00687 fpF[ 0 ] = pF[ 0 ]; fpF[ 1 ] = pF[ 1 ]; fpF[ 2 ] = pF[ 2 ]; 00688 returnVal = locator->IntersectWithLine( fpO, fpF, 0.1, t, x, pcoords, subId, cellId ); 00689 locator->Delete( ); 00690 00691 if( returnVal ) 00692 { 00693 vtkCell* cell = data->GetCell( cellId ); 00694 vtkPoints* points = cell->GetPoints( ); 00695 00696 data->GetPointData( )->GetNormals( )->GetTuple( cell->GetPointIds( )->GetId( 0 ), n1.GetAnsiRef( ) ); 00697 data->GetPointData( )->GetNormals( )->GetTuple( cell->GetPointIds( )->GetId( 1 ), n2.GetAnsiRef( ) ); 00698 data->GetPointData( )->GetNormals( )->GetTuple( cell->GetPointIds( )->GetId( 2 ), n3.GetAnsiRef( ) ); 00699 00700 n1 += n2 + n3; 00701 n1 *= ( 1.0 / 3.0 ); 00702 n1.Normalize( ); 00703 n[ 0 ] = n1( 0 ); n[ 1 ] = n1( 1 ); n[ 2 ] = n1( 2 ); 00704 00705 points->GetPoint( 0, p1 ); 00706 points->GetPoint( 1, p2 ); 00707 points->GetPoint( 2, p3 ); 00708 this->IntersectPlaneWithLine( p, p1, p2, p3, pO, pF ); 00709 return( true ); 00710 } else return( false ); 00711 00712 }
void vtk3DSurfaceSTLWidget::GetSphereCenter | ( | double | center[3] | ) |
Definition at line 166 of file vtk3DSurfaceSTLWidget.cxx.
References _spheres.
00167 { 00168 _spheres[ 3 ]->GetCenter( center ); 00169 }
float vtk3DSurfaceSTLWidget::GetSTLThreshold | ( | ) |
Definition at line 813 of file vtk3DSurfaceSTLWidget.cxx.
References _psc.
00814 { 00815 return 100*this->_psc->GetThresholdRatio( ); 00816 }
void wxVTKRenderWindowInteractor::Initialize | ( | ) | [inherited] |
Definition at line 185 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::Enable().
00186 { 00187 int *size = RenderWindow->GetSize(); 00188 // enable everything and start rendering 00189 Enable(); 00190 //RenderWindow->Start(); 00191 00192 // set the size in the render window interactor 00193 Size[0] = size[0]; 00194 Size[1] = size[1]; 00195 00196 // this is initialized 00197 Initialized = 1; 00198 }
bool vtk3DSurfaceSTLWidget::IntersectPlaneWithLine | ( | double * | p, | |
double * | x1, | |||
double * | x2, | |||
double * | x3, | |||
double * | x4, | |||
double * | x5 | |||
) |
Definition at line 535 of file vtk3DSurfaceSTLWidget.cxx.
References gtm::TMatrix< T >::Det().
Referenced by FindCubePointsFromPoints(), and GetPointAndNormalIntersection().
00536 { 00537 gtm::TVector< double > vx1( 3 ), vx2( 3 ), vx3( 3 ); 00538 gtm::TVector< double > vx4( 3 ), vx5( 3 ), vx6( p, 3, false ); 00539 gtm::TMatrix< double > mU( 4, 4 ), mD( 4, 4 ); 00540 double t; 00541 bool ret; 00542 00543 vx1 = x1; 00544 vx2 = x2; 00545 vx3 = x3; 00546 vx4 = x4; 00547 vx5 = x5; 00548 vx6 = vx5 - vx4; 00549 00550 mD( 0, 0 ) = mU( 0, 0 ) = 1; 00551 mD( 0, 1 ) = mU( 0, 1 ) = vx1( 0 ); 00552 mD( 0, 2 ) = mU( 0, 2 ) = vx1( 1 ); 00553 mD( 0, 3 ) = mU( 0, 3 ) = vx1( 2 ); 00554 mD( 1, 0 ) = mU( 1, 0 ) = 1; 00555 mD( 1, 1 ) = mU( 1, 1 ) = vx2( 0 ); 00556 mD( 1, 2 ) = mU( 1, 2 ) = vx2( 1 ); 00557 mD( 1, 3 ) = mU( 1, 3 ) = vx2( 2 ); 00558 mD( 2, 0 ) = mU( 2, 0 ) = 1; 00559 mD( 2, 1 ) = mU( 2, 1 ) = vx3( 0 ); 00560 mD( 2, 2 ) = mU( 2, 2 ) = vx3( 1 ); 00561 mD( 2, 3 ) = mU( 2, 3 ) = vx3( 2 ); 00562 mU( 3, 0 ) = 1; 00563 mU( 3, 1 ) = vx4( 0 ); 00564 mU( 3, 2 ) = vx4( 1 ); 00565 mU( 3, 3 ) = vx4( 2 ); 00566 mD( 3, 0 ) = 0; 00567 mD( 3, 1 ) = vx6( 0 ); 00568 mD( 3, 2 ) = vx6( 1 ); 00569 mD( 3, 3 ) = vx6( 2 ); 00570 00571 ret = ( mD.Det( ) != 0 ); 00572 if( ret ) { 00573 00574 t = mU.Det( ) / mD.Det( ); 00575 vx6 = ( ( vx4 - vx5 ) * t ) + vx4; 00576 00577 } // fi 00578 return( ret ); 00579 00580 }
wxVTKRenderWindowInteractor * wxVTKRenderWindowInteractor::New | ( | ) | [static, inherited] |
Reimplemented in wxVTKRenderWindowInteractorPlus.
Definition at line 179 of file wxVTKRenderWindowInteractor.cxx.
Referenced by ConstructVessel(), ConvertMarAxisToPolyData(), ExportSurfaceAsSTL(), GetPointAndNormalIntersection(), vtk3DSurfaceWidget::OnLeftDClick(), vtk3DQuantSurfaceWidget::Set3DSliceActor(), vtk3DSurfaceWidget::SetAxis(), SetAxis(), SetCuttingMode(), vtk3DSurfaceWidget::SetInitialPoint(), SetInitialPoint(), vtk3DSurfaceWidget::ShowMARACASData(), ShowMARACASData(), vtk3DQuantSurfaceWidget::ShowMARACASDataAndAxe(), vtk3DQuantSurfaceWidget::ShowMARACASDataAndAxeCT(), and vtk3DSurfaceWidget::ShowMARACASDataCT().
00180 { 00181 // we don't make use of the objectfactory, because we're not registered 00182 return new wxVTKRenderWindowInteractor; 00183 }
void wxVTKRenderWindowInteractor::OnButtonDown | ( | wxMouseEvent & | event | ) | [inherited] |
(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
Reimplemented in wxVTKRenderWindowInteractorEditContour.
Definition at line 541 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::ActiveButton, wxVTKRenderWindowInteractor::UseCaptureMouse, and WX_USE_X_CAPTURE.
00542 { 00543 if (!Enabled || (ActiveButton != wxEVT_NULL)) 00544 { 00545 return; 00546 } 00547 ActiveButton = event.GetEventType(); 00548 00549 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00550 SetEventInformationFlipY(event.GetX(), event.GetY(), 00551 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00552 #endif 00553 00554 if(event.RightDown()) 00555 { 00556 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00557 // new style 00558 InvokeEvent(vtkCommand::RightButtonPressEvent, NULL); 00559 #else 00560 // old style 00561 InteractorStyle->OnRightButtonDown(event.ControlDown(), event.ShiftDown(), 00562 event.GetX(), Size[1] - event.GetY() - 1); 00563 #endif 00564 } 00565 else if(event.LeftDown()) 00566 { 00567 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00568 // new style 00569 InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL); 00570 #else 00571 // old style 00572 InteractorStyle->OnLeftButtonDown(event.ControlDown(), event.ShiftDown(), 00573 event.GetX(), Size[1] - event.GetY() - 1); 00574 #endif 00575 } 00576 else if(event.MiddleDown()) 00577 { 00578 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00579 // new style 00580 InvokeEvent(vtkCommand::MiddleButtonPressEvent, NULL); 00581 #else 00582 // old style 00583 InteractorStyle->OnMiddleButtonDown(event.ControlDown(), event.ShiftDown(), 00584 event.GetX(), Size[1] - event.GetY() - 1); 00585 #endif 00586 } 00587 //save the button and capture mouse until the button is released 00588 //Only if : 00589 //1. it is possible (WX_USE_X_CAPTURE) 00590 //2. user decided to. 00591 if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse) 00592 { 00593 CaptureMouse(); 00594 } 00595 }
void wxVTKRenderWindowInteractor::OnButtonUp | ( | wxMouseEvent & | event | ) | [inherited] |
Reimplemented in wxVTKRenderWindowInteractorEditContour.
Definition at line 597 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::ActiveButton, wxVTKRenderWindowInteractor::UseCaptureMouse, and WX_USE_X_CAPTURE.
00598 { 00599 //EVT_xxx_DOWN == EVT_xxx_UP - 1 00600 //This is only needed if two mouse buttons are pressed at the same time. 00601 //In wxWindows 2.4 and later: better use of wxMOUSE_BTN_RIGHT or 00602 //wxEVT_COMMAND_RIGHT_CLICK 00603 if (!Enabled || (ActiveButton != (event.GetEventType()-1))) 00604 { 00605 return; 00606 } 00607 00608 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00609 SetEventInformationFlipY(event.GetX(), event.GetY(), 00610 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00611 #endif 00612 00613 if(ActiveButton == wxEVT_RIGHT_DOWN) 00614 { 00615 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00616 // new style 00617 InvokeEvent(vtkCommand::RightButtonReleaseEvent, NULL); 00618 #else 00619 // old style 00620 InteractorStyle->OnRightButtonUp(event.ControlDown(), event.ShiftDown(), 00621 event.GetX(), Size[1] - event.GetY() - 1); 00622 #endif 00623 } 00624 else if(ActiveButton == wxEVT_LEFT_DOWN) 00625 { 00626 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00627 // new style 00628 InvokeEvent(vtkCommand::LeftButtonReleaseEvent, NULL); 00629 #else 00630 // old style 00631 InteractorStyle->OnLeftButtonUp(event.ControlDown(), event.ShiftDown(), 00632 event.GetX(), Size[1] - event.GetY() - 1); 00633 #endif 00634 } 00635 else if(ActiveButton == wxEVT_MIDDLE_DOWN) 00636 { 00637 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00638 // new style 00639 InvokeEvent(vtkCommand::MiddleButtonReleaseEvent, NULL); 00640 #else 00641 // old style 00642 InteractorStyle->OnMiddleButtonUp(event.ControlDown(), event.ShiftDown(), 00643 event.GetX(), Size[1] - event.GetY() - 1); 00644 #endif 00645 } 00646 //if the ActiveButton is realeased, then release mouse capture 00647 if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse) 00648 { 00649 ReleaseMouse(); 00650 } 00651 ActiveButton = wxEVT_NULL; 00652 }
void wxVTKRenderWindowInteractor::OnEnter | ( | wxMouseEvent & | event | ) | [inherited] |
Definition at line 406 of file wxVTKRenderWindowInteractor.cxx.
00407 { 00408 SetFocus(); 00409 if (!Enabled) 00410 { 00411 return; 00412 } 00413 00414 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00415 // new style 00416 SetEventInformationFlipY(event.GetX(), event.GetY(), 00417 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00418 00419 InvokeEvent(vtkCommand::EnterEvent, NULL); 00420 #else 00421 // old style 00422 InteractorStyle->OnEnter(event.ControlDown(), event.ShiftDown(), 00423 event.GetX(), Size[1] - event.GetY() - 1); 00424 #endif 00425 }
void wxVTKRenderWindowInteractor::OnEraseBackground | ( | wxEraseEvent & | event | ) | [inherited] |
Definition at line 362 of file wxVTKRenderWindowInteractor.cxx.
void wxVTKRenderWindowInteractor::OnKeyDown | ( | wxKeyEvent & | event | ) | [inherited] |
Reimplemented in wxVTKRenderWindowInteractorEditContour.
Definition at line 447 of file wxVTKRenderWindowInteractor.cxx.
00448 { 00449 if (!Enabled) 00450 { 00451 return; 00452 } 00453 00454 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00455 // new style 00456 int keycode = event.GetKeyCode(); 00457 00458 00459 char key = '\0'; 00460 if ( keycode < 256 ) 00461 { 00462 // TODO: Unicode in non-Unicode mode ?? 00463 key = (char)keycode; 00464 } 00465 else//Dic 2007 00466 { 00467 if ( keycode==314 )//Real keyCode for Left ARROW and non-Unicode 00468 { 00469 key = 'L';//Left 00470 } 00471 else if( keycode==315 )//Real keyCode for Left ARROW and non-Unicode 00472 { 00473 key = 'U';//Up 00474 } 00475 else if( keycode==316 )//Real keyCode for Left ARROW and non-Unicode 00476 { 00477 key = 'R';//Right 00478 } 00479 else if( keycode==317 )//Real keyCode for Down ARROW and non-Unicode 00480 { 00481 key = 'D';//Down 00482 } 00483 else if( keycode==312 )//Real keyCode for Diagonal left down ARROW and non-Unicode 00484 { 00485 key = 'W';//Diagonal left down 00486 } 00487 else if( keycode==313 )//Real keyCode for Diagonal left up ARROW and non-Unicode 00488 { 00489 key = 'Q';//Diagonal left up 00490 } 00491 else if( keycode==366 )//Real keyCode for Diagonal right up ARROW and non-Unicode 00492 { 00493 key = 'P';//Diagonal right up 00494 } 00495 else if( keycode==367 )//Real keyCode for Diagonal right down ARROW and non-Unicode 00496 { 00497 key = 'M';//Diagonal right down 00498 } 00499 } 00500 00501 SetEventInformationFlipY(event.GetX(), event.GetY(), 00502 event.ControlDown(), event.ShiftDown(), key, 0, NULL); 00503 00504 InvokeEvent(vtkCommand::KeyPressEvent, NULL); 00505 InvokeEvent(vtkCommand::CharEvent, NULL); 00506 #else 00507 InteractorStyle->OnKeyDown(event.ControlDown(), event.ShiftDown(), 00508 event.GetKeyCode(), 1); 00509 #endif 00510 event.Skip(); 00511 }
void wxVTKRenderWindowInteractor::OnKeyUp | ( | wxKeyEvent & | event | ) | [inherited] |
Definition at line 513 of file wxVTKRenderWindowInteractor.cxx.
00514 { 00515 if (!Enabled) 00516 { 00517 return; 00518 } 00519 00520 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00521 // new style 00522 int keycode = event.GetKeyCode(); 00523 char key = '\0'; 00524 if (keycode < 256) 00525 { 00526 // TODO: Unicode in non-Unicode mode ?? 00527 key = (char)keycode; 00528 } 00529 00530 SetEventInformationFlipY(event.GetX(), event.GetY(), 00531 event.ControlDown(), event.ShiftDown(), key, 0, NULL); 00532 InvokeEvent(vtkCommand::KeyReleaseEvent, NULL); 00533 #else 00534 InteractorStyle->OnKeyUp(event.ControlDown(), event.ShiftDown(), 00535 event.GetKeyCode(), 1); 00536 #endif 00537 event.Skip(); 00538 }
void wxVTKRenderWindowInteractor::OnLeave | ( | wxMouseEvent & | event | ) | [inherited] |
Definition at line 427 of file wxVTKRenderWindowInteractor.cxx.
00428 { 00429 if (!Enabled) 00430 { 00431 return; 00432 } 00433 00434 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00435 // new style 00436 SetEventInformationFlipY(event.GetX(), event.GetY(), 00437 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00438 00439 InvokeEvent(vtkCommand::LeaveEvent, NULL); 00440 #else 00441 // old style 00442 InteractorStyle->OnLeave(event.ControlDown(), event.ShiftDown(), 00443 event.GetX(), Size[1] - event.GetY() - 1); 00444 #endif 00445 }
void wxVTKRenderWindowInteractor::OnMotion | ( | wxMouseEvent & | event | ) | [inherited] |
Reimplemented in wxVTKRenderWindowInteractorEditContour.
Definition at line 387 of file wxVTKRenderWindowInteractor.cxx.
00388 { 00389 if (!Enabled) 00390 { 00391 return; 00392 } 00393 00394 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00395 SetEventInformationFlipY(event.GetX(), event.GetY(), 00396 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00397 00398 InvokeEvent(vtkCommand::MouseMoveEvent, NULL); 00399 #else 00400 InteractorStyle->OnMouseMove(event.ControlDown(), event.ShiftDown(), 00401 event.GetX(), Size[1] - event.GetY() - 1); 00402 #endif 00403 }
void wxVTKRenderWindowInteractor::OnMouseWheel | ( | wxMouseEvent & | event | ) | [inherited] |
Reimplemented in vtk3DSurfaceWidget, and wxVTKRenderWindowInteractorPlus.
Definition at line 654 of file wxVTKRenderWindowInteractor.cxx.
00655 { 00656 // Mouse wheel was only added after VTK 4.4 (I think...) 00657 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2) 00658 // new style 00659 //Set vtk event information ... The numebr of wheel rotations is stored in 00660 //the x varible. y varible is zero 00661 SetEventInformationFlipY(event.GetWheelRotation() / event.GetWheelDelta(), 0, 00662 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00663 if(event.GetWheelRotation() > 0) 00664 { 00665 //Send event to VTK 00666 // EED 00667 // InvokeEvent(vtkCommand::MouseWheelForwardEvent, NULL); 00668 } 00669 else 00670 { 00671 //Send event to VTK 00672 // EED 00673 // InvokeEvent(vtkCommand::MouseWheelBackwardEvent, NULL); 00674 } 00675 #endif 00676 00677 }
void wxVTKRenderWindowInteractor::OnPaint | ( | wxPaintEvent & | event | ) | [inherited] |
void wxVTKRenderWindowInteractor::OnSize | ( | wxSizeEvent & | event | ) | [inherited] |
void wxVTKRenderWindowInteractor::OnTimer | ( | wxTimerEvent & | event | ) | [inherited] |
void wxVTKRenderWindowInteractor::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [inherited] |
Definition at line 762 of file wxVTKRenderWindowInteractor.cxx.
00763 { 00764 this->Superclass::PrintSelf(os, indent); 00765 }
void vtk3DSurfaceSTLWidget::RemoveAxis | ( | ) |
Definition at line 185 of file vtk3DSurfaceSTLWidget.cxx.
References _axesActor, _pRenderer, and _pRenderWindow.
00186 { 00187 if (_axesActor) 00188 { 00189 _pRenderer->RemoveActor(_axesActor); 00190 _axesActor->Delete(); 00191 _axesActor = NULL; 00192 _pRenderWindow->Render( ); 00193 } 00194 }
void wxVTKRenderWindowInteractor::Render | ( | ) | throw (char*) [inherited] |
Reimplemented in vtk3DSurfaceWidget.
Definition at line 680 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::GetHandleHack(), wxVTKRenderWindowInteractor::Handle, wxVTKRenderWindowInteractor::RenderAllowed, and wxVTKRenderWindowInteractor::RenderWhenDisabled.
Referenced by wxMaracasImageBrowser02::LoadData().
00681 { 00682 RenderAllowed = 1; 00683 if (!RenderWhenDisabled) 00684 { 00685 //the user doesn't want us to render when the toplevel frame 00686 //is disabled - first find the top level parent 00687 wxWindow *topParent = wxGetTopLevelParent(this); 00688 if (topParent) 00689 { 00690 //if it exists, check whether it's enabled 00691 //if it's not enabeld, RenderAllowed will be false 00692 RenderAllowed = topParent->IsEnabled(); 00693 } 00694 } 00695 00696 if (RenderAllowed) 00697 { 00698 if(Handle && (Handle == GetHandleHack()) ) 00699 { 00700 if(RenderWindow!=NULL){ 00701 RenderWindow->Render(); 00702 }else{ 00703 throw "wxVTKRenderWindowInteractor::Render(){RenderWindow not set}"; 00704 } 00705 } 00706 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2) 00707 else if(GetHandleHack()) 00708 { 00709 //this means the user has reparented us; let's adapt to the 00710 //new situation by doing the WindowRemap dance 00711 //store the new situation 00712 if(RenderWindow!=NULL){ 00713 Handle = GetHandleHack(); 00714 RenderWindow->SetNextWindowId(reinterpret_cast<void *>(Handle)); 00715 RenderWindow->WindowRemap(); 00716 RenderWindow->Render(); 00717 } 00718 } 00719 #endif 00720 } 00721 }
void vtk3DSurfaceSTLWidget::SetAxis | ( | vtkPolyData * | axis | ) |
Definition at line 171 of file vtk3DSurfaceSTLWidget.cxx.
References _axesActor, _axesMapper, _pRenderer, _pRenderWindow, and wxVTKRenderWindowInteractor::New().
Referenced by ShowMARACASDataAndAxe().
00172 { 00173 _axesMapper = vtkPolyDataMapper::New( ); 00174 _axesMapper->SetInput( axis ); 00175 axis->Delete(); 00176 00177 _axesActor = vtkActor::New( ); 00178 _axesActor->SetMapper( _axesMapper ); 00179 _axesActor->GetProperty()->SetColor( 1, 0, 0 ); 00180 _pRenderer->AddActor( _axesActor ); 00181 00182 _pRenderWindow->Render( ); 00183 }
void vtk3DSurfaceSTLWidget::SetCuttingMode | ( | bool | mode | ) |
Copy / paste from vtkPolyDataCutter
Definition at line 196 of file vtk3DSurfaceSTLWidget.cxx.
References _iasc, _pRenderWindow, _stlExternalVessel, _stlInternalVessel, wxVTKRenderWindowInteractor::New(), and vtkInteractorStyleCutter::VisibilityOff().
Referenced by wxSurfaceSTLWidget::On3DCutter().
00197 { 00198 if( mode ) 00199 { 00200 //start rubber/cutter mode 00201 if(!_iasc) 00202 { 00203 _iasc = vtkInteractorStyleCutter::New(); 00204 } 00205 this->SetInteractorStyle( _iasc ); 00206 } 00207 else 00208 { 00212 if( _iasc ) 00213 { 00214 _iasc->VisibilityOff(); //turn off the vtkInteractorStyleCutter 00215 vtkImplicitSelectionLoop *loop = vtkImplicitSelectionLoop::New(); 00216 loop->SetLoop( _iasc->GetLoopPoints() ); 00217 loop->SetNormal( _iasc->GetDirection() ); 00218 00219 vtkTriangleFilter *tf = vtkTriangleFilter::New(); 00220 tf->SetInput( _stlInternalVessel ); 00221 00222 vtkExtractPolyDataGeometry *extract = vtkExtractPolyDataGeometry::New (); 00223 extract->SetInput ( tf->GetOutput()); 00224 extract->SetImplicitFunction ( loop ); 00225 extract->ExtractInsideOff (); 00226 extract->ExtractBoundaryCellsOff (); 00227 tf->Delete(); 00228 loop->Delete(); 00229 00230 //#connectivity filter to keep only the largest part 00231 vtkPolyDataConnectivityFilter *connect = vtkPolyDataConnectivityFilter::New(); 00232 connect->SetInput( extract->GetOutput() ); 00233 connect->SetExtractionModeToLargestRegion (); 00234 extract->Delete(); 00235 00236 vtkClosePolyData *close = vtkClosePolyData::New(); 00237 close->SetInput( connect->GetOutput() ); 00238 connect->Delete(); 00239 00240 vtkStripper *strip = vtkStripper::New(); 00241 strip->SetInput( close->GetOutput() ); 00242 close->Delete(); 00243 00244 //If vtkClosePolyData was well written we wouldn't had to recompute the normals 00245 vtkPolyDataNormals *normals = vtkPolyDataNormals::New(); 00246 normals->SetInput( strip->GetOutput() ); 00247 strip->Delete(); 00248 00249 /*vtkPolyDataWriter *polywriter = vtkPolyDataWriter::New(); 00250 polywriter->SetInput( normals->GetOutput() ); 00251 polywriter->SetFileName( "cutter.vtk" ); 00252 polywriter->SetFileTypeToBinary(); 00253 polywriter->Write(); 00254 polywriter->Delete();*/ 00255 00256 normals->Update(); //important before a ShallowCopy Or DeepCopy 00257 _stlInternalVessel->DeepCopy( normals->GetOutput() ); //Use DeepCopy when using ShallowCopy afterwards 00258 00259 tf->SetInput( _stlExternalVessel ); 00260 normals->Update(); //important before a ShallowCopy 00261 _stlExternalVessel->ShallowCopy( normals->GetOutput() ); 00262 _pRenderWindow->Render( ); 00263 } 00264 //make current interactor style be trackbal camera, asked by radiologists. 00265 vtkInteractorStyleTrackballCamera *istc = vtkInteractorStyleTrackballCamera::New(); 00266 this->SetInteractorStyle( istc ); 00267 istc->Delete(); 00268 } 00269 00270 }
void vtk3DSurfaceSTLWidget::SetInitialPoint | ( | double * | point | ) | [protected] |
Definition at line 514 of file vtk3DSurfaceSTLWidget.cxx.
void vtk3DSurfaceSTLWidget::SetInitialPoint | ( | double * | pickPoint, | |
double * | cameraPos | |||
) | [protected] |
Definition at line 385 of file vtk3DSurfaceSTLWidget.cxx.
References _centralLine, _centralLineActor, _centralLineMapper, _depth, marInterface::_experiment, _height, _mar, _pRenderer, _pRenderWindow, _spheres, _spheresActor, _spheresMapper, _width, FindCubePointsFromPoints(), gtm::TVector< T >::GetAnsiRef(), GetPointAndNormalIntersection(), GTM_MAX, InitialSphere, wxVTKRenderWindowInteractor::New(), and marExperiment::setStartPoint().
00386 { 00387 gtm::TVector< double > pO( 3 ), pF( 3 ), pp( 3 ), cp( 3 ); 00388 gtm::TVector< double > xc( 3 ); 00389 gtm::TVector< double > x1( 3 ), n1( 3 ); 00390 gtm::TVector< double > x2( 3 ), n2( 3 ); 00391 gtm::TVector< double > tmp( 3 ); 00392 double fac; 00393 bool success = true; 00394 00395 if( _centralLineActor ) 00396 { 00397 _pRenderer->RemoveActor( _centralLineActor ); 00398 _centralLineActor->Delete( ); 00399 } // fi 00400 if( _centralLineMapper ) _centralLineMapper->Delete( ); 00401 if( _centralLine ) _centralLine->Delete( ); 00402 00403 _centralLine = NULL; 00404 _centralLineMapper = NULL; 00405 _centralLineActor = NULL; 00406 00407 for(int i=0; i<4; i++) 00408 { 00409 if( _spheresActor[ i ] ) 00410 { 00411 _pRenderer->RemoveActor( _spheresActor[ i ] ); 00412 _spheresActor[ i ]->Delete( ); 00413 } // fi 00414 if( _spheresMapper[ i ] ) _spheresMapper[ i ]->Delete( ); 00415 if( _spheres[ i ] ) _spheres[ i ]->Delete( ); 00416 _spheres[ i ] = NULL; 00417 _spheresMapper[ i ] = NULL; 00418 _spheresActor[ i ] = NULL; 00419 } //rof 00420 00421 fac = GTM_MAX( _width, _height ); 00422 fac = 2 * GTM_MAX( fac, _depth ); 00423 pp( 0 ) = pickPoint[ 0 ]; pp( 1 ) = pickPoint[ 1 ]; pp( 2 ) = pickPoint[ 2 ]; 00424 cp( 0 ) = cameraPos[ 0 ]; cp( 1 ) = cameraPos[ 1 ]; cp( 2 ) = cameraPos[ 2 ]; 00425 00426 if( this->FindCubePointsFromPoints( 00427 pO.GetAnsiRef( ), pF.GetAnsiRef( ), 00428 pp.GetAnsiRef( ), cp.GetAnsiRef( ) 00429 ) ) { 00430 00431 if( this->GetPointAndNormalIntersection( 00432 x1.GetAnsiRef( ), n1.GetAnsiRef( ), 00433 pO.GetAnsiRef( ), pF.GetAnsiRef( ) 00434 ) ) { 00435 00436 if( this->GetPointAndNormalIntersection( 00437 x2.GetAnsiRef( ), n2.GetAnsiRef( ), 00438 ( x1 - n1 ).GetAnsiRef( ), ( x1 - ( n1 * fac ) ).GetAnsiRef( ) 00439 ) ) { 00440 00441 xc = ( x2 + x1 ) * 0.5; 00442 _mar->_experiment->setStartPoint( (int)xc( 0 ), (int)xc( 1 ), (int)xc( 2 ) ); 00443 00444 for(int i=0; i<4; i++) 00445 { 00446 _spheres[ i ] = vtkSphereSource::New( ); 00447 _spheresMapper[ i ] = vtkPolyDataMapper::New( ); 00448 _spheresMapper[ i ]->SetInput( _spheres[ i ]->GetOutput( ) ); 00449 _spheresActor[ i ] = vtkActor::New( ); 00450 _spheresActor[ i ]->SetMapper( _spheresMapper[ i ] ); 00451 _spheresActor[ i ]->PickableOff( ); 00452 _pRenderer->AddActor( _spheresActor[ i ] ); 00453 } 00454 00455 _spheres[ 0 ]->SetCenter( x1( 0 ), x1( 1 ), x1( 2 ) ); 00456 _spheres[ 1 ]->SetCenter( x2( 0 ), x2( 1 ), x2( 2 ) ); 00457 _spheres[ 2 ]->SetCenter( xc( 0 ), xc( 1 ), xc( 2 ) ); 00458 _spheres[ 3 ]->SetCenter( xc( 0 ), xc( 1 ), xc( 2 ) ); 00459 00460 _spheres[ 0 ]->SetRadius( 0.5 ); 00461 _spheres[ 1 ]->SetRadius( 0.5 ); 00462 _spheres[ 2 ]->SetRadius( 0.5 ); 00463 _spheres[ 3 ]->SetRadius( ( xc - x1 ).GetNorm( ) ); 00464 00465 _spheresActor[ 0 ]->GetProperty( )->SetColor( 1.0, 0.0, 0.0 ); 00466 _spheresActor[ 1 ]->GetProperty( )->SetColor( 0.0, 1.0, 0.0 ); 00467 _spheresActor[ 2 ]->GetProperty( )->SetColor( 0.0, 0.0, 1.0 ); 00468 _spheresActor[ 3 ]->GetProperty( )->SetColor( 1.0, 0.0, 0.0 ); 00469 _spheresActor[ 3 ]->GetProperty( )->SetOpacity( 0.3 ); 00470 00471 vtkPoints* points = vtkPoints::New( ); 00472 points->InsertNextPoint( x1.GetAnsiRef( ) ); 00473 points->InsertNextPoint( x2.GetAnsiRef( ) ); 00474 00475 vtkCellArray* array = vtkCellArray::New( ); 00476 array->InsertNextCell( 2 ); 00477 array->InsertCellPoint( 0 ); 00478 array->InsertCellPoint( 1 ); 00479 00480 _centralLine = vtkPolyData::New( ); 00481 _centralLine->SetPoints( points ); 00482 _centralLine->SetLines( array ); 00483 points->Delete(); 00484 array->Delete(); 00485 00486 _centralLineMapper = vtkPolyDataMapper::New( ); 00487 _centralLineMapper->SetInput( _centralLine ); 00488 00489 _centralLineActor = vtkActor::New( ); 00490 _centralLineActor->SetMapper( _centralLineMapper ); 00491 _centralLineActor->GetProperty( )->SetColor( 1.0, 1.0, 1.0 ); 00492 _centralLineActor->PickableOff( ); 00493 _pRenderer->AddActor( _centralLineActor ); 00494 00495 } // fi 00496 00497 } else success = false; 00498 00499 } else success = false; 00500 00501 // Show a message, if any. 00502 if( !success ) 00503 wxMessageBox( 00504 _T("Error: Initial point can't be set.\nPlease choose another point."), 00505 _T("Error"), wxOK | wxCENTRE | wxICON_HAND, this 00506 ); 00507 00508 // Finish 00509 _pRenderWindow->Render( ); 00510 InitialSphere = success; 00511 }
void wxVTKRenderWindowInteractor::SetRenderWhenDisabled | ( | int | newValue | ) | [inherited] |
Definition at line 723 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::RenderWhenDisabled.
00724 { 00725 //Change value of __RenderWhenDisabled ivar. 00726 //If __RenderWhenDisabled is false (the default), this widget will not 00727 //call Render() on the RenderWindow if the top level frame (i.e. the 00728 //containing frame) has been disabled. 00729 00730 //This prevents recursive rendering during wxSafeYield() calls. 00731 //wxSafeYield() can be called during the ProgressMethod() callback of 00732 //a VTK object to have progress bars and other GUI elements updated - 00733 //it does this by disabling all windows (disallowing user-input to 00734 //prevent re-entrancy of code) and then handling all outstanding 00735 //GUI events. 00736 00737 //However, this often triggers an OnPaint() method for wxVTKRWIs, 00738 //resulting in a Render(), resulting in Update() being called whilst 00739 //still in progress. 00740 00741 RenderWhenDisabled = (bool)newValue; 00742 }
void wxVTKRenderWindowInteractor::SetStereo | ( | int | capable | ) | [virtual, inherited] |
Definition at line 748 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::Stereo.
void vtk3DSurfaceSTLWidget::SetSTLSurfaceVisibility | ( | bool | intvisible, | |
bool | extvisible | |||
) |
Definition at line 145 of file vtk3DSurfaceSTLWidget.cxx.
References _actorExternalVessel, _actorVessel, and _pRenderWindow.
00146 { 00148 _actorVessel->SetVisibility( intvisible ); 00149 _actorExternalVessel->SetVisibility( extvisible ); 00150 _pRenderWindow->Render(); 00151 }
void vtk3DSurfaceSTLWidget::SetSTLThresholdRatio | ( | double | ratio | ) |
Definition at line 807 of file vtk3DSurfaceSTLWidget.cxx.
References _pRenderWindow, and _psc.
00808 { 00809 this->_psc->SetThresholdRatio( (double)(ratio/100) ); 00810 _pRenderWindow->Render( ); 00811 }
void vtk3DSurfaceSTLWidget::SetSurfaceColor | ( | float | red, | |
float | green, | |||
float | blue | |||
) |
Definition at line 133 of file vtk3DSurfaceSTLWidget.cxx.
References _pRenderWindow, and _surfActor.
00134 { 00135 _surfActor->GetProperty()->SetColor(red, green, blue ); 00136 _pRenderWindow->Render(); 00137 }
void vtk3DSurfaceSTLWidget::SetSurfaceIsoValue | ( | int | isoval | ) |
Definition at line 153 of file vtk3DSurfaceSTLWidget.cxx.
References _mCubes, and _pRenderWindow.
Referenced by wxSurfaceSTLWidget::OnSliderIsovalueScrollThumbrelease().
00154 { 00155 _mCubes->SetValue(0, isoval); 00156 _pRenderWindow->Render(); 00157 }
void vtk3DSurfaceSTLWidget::SetSurfaceOpacity | ( | int | opaval | ) |
Definition at line 159 of file vtk3DSurfaceSTLWidget.cxx.
References _pRenderWindow, and _surfActor.
Referenced by wxSurfaceSTLWidget::OnSliderOpacityScrollThumbrelease().
00160 { 00161 //There is no way in Win32 to specify a slider different than 0->100 00162 _surfActor->GetProperty()->SetOpacity( (float)opaval/100 ); 00163 _pRenderWindow->Render(); 00164 }
void vtk3DSurfaceSTLWidget::SetSurfaceVisibility | ( | bool | visible | ) |
Definition at line 139 of file vtk3DSurfaceSTLWidget.cxx.
References _pRenderWindow, and _surfActor.
00140 { 00141 _surfActor->SetVisibility( visible ); 00142 _pRenderWindow->Render(); 00143 }
void vtk3DSurfaceSTLWidget::ShowMARACASData | ( | marInterface * | mar | ) |
Definition at line 313 of file vtk3DSurfaceSTLWidget.cxx.
References _depth, marInterface::_experiment, _height, _mar, _marImageData, _mCubes, _outActor, _outLine, _outMapper, _pRenderer, _surfActor, _surfMapper, _width, ConfigureVTK(), marExperiment::getDynData(), marDynData::getVolume(), and wxVTKRenderWindowInteractor::New().
Referenced by ShowMARACASDataAndAxe().
00313 { 00314 int whd[3]; 00315 double minmax[2]; 00316 00317 _mar = mar; 00318 _marImageData = _mar->_experiment->getDynData( )->getVolume( )->castVtk(); 00319 _marImageData->GetDimensions( whd ); 00320 _width = whd[0]; 00321 _height = whd[1]; 00322 _depth = whd[2]; 00323 00324 _marImageData->GetScalarRange( minmax ); 00325 00326 //Outline v2: 00327 // An outline provides context around the data. 00328 _outLine = vtkOutlineFilter::New( ); 00329 _outLine->SetInput( _marImageData ); 00330 _outMapper = vtkPolyDataMapper::New( ); 00331 _outMapper->SetInput( _outLine->GetOutput( ) ); 00332 _outActor = vtkActor::New( ); 00333 _outActor->SetMapper( _outMapper ); 00334 _outActor->GetProperty( )->SetColor( 0.7, 0.0, 0.9 ); 00335 //_outActor->PickableOff( ); 00336 _pRenderer->AddActor( _outActor ); 00337 00338 // Surface 00339 _mCubes = vtkMarchingCubes::New( ); 00340 _surfMapper = vtkPolyDataMapper::New( ); 00341 _surfActor = vtkActor::New( ); 00342 00343 _mCubes->SetInput( _marImageData ); 00344 _mCubes->SetValue( 0, minmax[1] / 4 ); 00345 00346 vtkStripper *stripper = vtkStripper::New(); 00347 stripper->SetInput( _mCubes->GetOutput( ) ); 00348 00349 _surfMapper->SetInput( stripper->GetOutput() ); 00350 _surfMapper->ScalarVisibilityOff( ); 00351 stripper->Delete(); 00352 00353 _surfActor->SetMapper( _surfMapper ); 00354 _surfActor->PickableOff( ); 00355 _surfActor->GetProperty( )->SetColor( 0.9803, 0.9215, 0.8392 ); 00356 _surfActor->GetProperty( )->SetOpacity( 0.5 ); 00357 _pRenderer->AddActor( _surfActor ); 00358 00359 // 1. ParallelProjectionOn should be set after AddActor (otherwise call vtkRenderer::ResetCameraClippingRange 00360 // 2. ParallelProjectionOn is *necessary* for the vtkImplicitSelectionLoop 00361 // otherwise this give a cone instead of a cylinder cutting. 00362 _pRenderer->GetActiveCamera()->ParallelProjectionOn(); 00363 00364 this->ConfigureVTK( ); 00365 }
void vtk3DSurfaceSTLWidget::ShowMARACASDataAndAxe | ( | marInterface * | mar | ) |
Definition at line 368 of file vtk3DSurfaceSTLWidget.cxx.
References marInterface::_experiment, _mar, _pRenderer, marAxis::Draw(), marExperiment::getAxis(), SetAxis(), marExperiment::setAxis(), and ShowMARACASData().
Referenced by wxSurfaceSTLWidget::ShowMARACASData().
00368 { 00369 marAxis* temp; 00370 vtkPolyData* allData; 00371 00372 00373 this->ShowMARACASData( mar ); 00374 00375 _pRenderer->SetBackground( 0.75, 0.75, 0.75 ); 00376 00377 // Axis 00378 _mar->_experiment->setAxis( 0 ); 00379 temp = _mar->_experiment->getAxis( ); // ??? getActualAxis ?? 00380 allData = temp->Draw( ); 00381 this->SetAxis( allData ); 00382 }
void wxVTKRenderWindowInteractor::Start | ( | ) | [inherited] |
Definition at line 234 of file wxVTKRenderWindowInteractor.cxx.
void wxVTKRenderWindowInteractor::TerminateApp | ( | ) | [inline, inherited] |
Definition at line 124 of file wxVTKRenderWindowInteractor.h.
void wxVTKRenderWindowInteractor::UpdateSize | ( | int | x, | |
int | y | |||
) | [inherited] |
Definition at line 241 of file wxVTKRenderWindowInteractor.cxx.
00242 { 00243 if( RenderWindow ) 00244 { 00245 // if the size changed tell render window 00246 if ( x != Size[0] || y != Size[1] ) 00247 { 00248 // adjust our (vtkRenderWindowInteractor size) 00249 Size[0] = x; 00250 Size[1] = y; 00251 // and our RenderWindow's size 00252 RenderWindow->SetSize(x, y); 00253 } 00254 } 00255 }
wxVTKRenderWindowInteractor::vtkBooleanMacro | ( | UseCaptureMouse | , | |
int | ||||
) | [inherited] |
wxVTKRenderWindowInteractor::vtkBooleanMacro | ( | Stereo | , | |
int | ||||
) | [inherited] |
wxVTKRenderWindowInteractor::vtkGetMacro | ( | Stereo | , | |
int | ||||
) | [inherited] |
vtk3DSurfaceSTLWidget::vtkGetMacro | ( | InitialSphere | , | |
int | ||||
) |
wxVTKRenderWindowInteractor::vtkSetMacro | ( | UseCaptureMouse | , | |
int | ||||
) | [inherited] |
vtkActor* vtk3DSurfaceSTLWidget::_actorExternalVessel [protected] |
Definition at line 118 of file vtk3DSurfaceSTLWidget.h.
Referenced by ConstructVessel(), SetSTLSurfaceVisibility(), and ~vtk3DSurfaceSTLWidget().
vtkActor* vtk3DSurfaceSTLWidget::_actorVessel [protected] |
Definition at line 117 of file vtk3DSurfaceSTLWidget.h.
Referenced by ConstructVessel(), SetSTLSurfaceVisibility(), and ~vtk3DSurfaceSTLWidget().
vtkActor* vtk3DSurfaceSTLWidget::_axesActor [protected] |
Definition at line 115 of file vtk3DSurfaceSTLWidget.h.
Referenced by RemoveAxis(), SetAxis(), and ~vtk3DSurfaceSTLWidget().
vtkPolyDataMapper* vtk3DSurfaceSTLWidget::_axesMapper [protected] |
Definition at line 114 of file vtk3DSurfaceSTLWidget.h.
Referenced by SetAxis(), and ~vtk3DSurfaceSTLWidget().
vtkPolyData* vtk3DSurfaceSTLWidget::_centralLine [protected] |
Definition at line 106 of file vtk3DSurfaceSTLWidget.h.
Referenced by SetInitialPoint(), and ~vtk3DSurfaceSTLWidget().
vtkActor* vtk3DSurfaceSTLWidget::_centralLineActor [protected] |
Definition at line 108 of file vtk3DSurfaceSTLWidget.h.
Referenced by SetInitialPoint(), and ~vtk3DSurfaceSTLWidget().
vtkPolyDataMapper* vtk3DSurfaceSTLWidget::_centralLineMapper [protected] |
Definition at line 107 of file vtk3DSurfaceSTLWidget.h.
Referenced by SetInitialPoint(), and ~vtk3DSurfaceSTLWidget().
int vtk3DSurfaceSTLWidget::_depth [private] |
Definition at line 129 of file vtk3DSurfaceSTLWidget.h.
Referenced by FindCubePointsFromPoints(), SetInitialPoint(), and ShowMARACASData().
int vtk3DSurfaceSTLWidget::_height [private] |
Definition at line 128 of file vtk3DSurfaceSTLWidget.h.
Referenced by FindCubePointsFromPoints(), SetInitialPoint(), and ShowMARACASData().
vtkInteractorStyleCutter* vtk3DSurfaceSTLWidget::_iasc [protected] |
Definition at line 123 of file vtk3DSurfaceSTLWidget.h.
Referenced by SetCuttingMode(), and ~vtk3DSurfaceSTLWidget().
marInterface* vtk3DSurfaceSTLWidget::_mar [protected] |
Definition at line 96 of file vtk3DSurfaceSTLWidget.h.
Referenced by ConvertMarAxisToPolyData(), SetInitialPoint(), ShowMARACASData(), and ShowMARACASDataAndAxe().
vtkImageData* vtk3DSurfaceSTLWidget::_marImageData |
Definition at line 81 of file vtk3DSurfaceSTLWidget.h.
Referenced by ConstructVessel(), and ShowMARACASData().
vtkPolyData* vtk3DSurfaceSTLWidget::_marPolyData |
Definition at line 82 of file vtk3DSurfaceSTLWidget.h.
vtkMarchingCubes* vtk3DSurfaceSTLWidget::_mCubes [protected] |
Definition at line 102 of file vtk3DSurfaceSTLWidget.h.
Referenced by GetPointAndNormalIntersection(), SetSurfaceIsoValue(), ShowMARACASData(), and ~vtk3DSurfaceSTLWidget().
vtkActor* vtk3DSurfaceSTLWidget::_outActor [protected] |
Definition at line 101 of file vtk3DSurfaceSTLWidget.h.
Referenced by ShowMARACASData(), and ~vtk3DSurfaceSTLWidget().
vtkOutlineFilter* vtk3DSurfaceSTLWidget::_outLine [protected] |
Definition at line 99 of file vtk3DSurfaceSTLWidget.h.
Referenced by ShowMARACASData(), and ~vtk3DSurfaceSTLWidget().
vtkPolyDataMapper* vtk3DSurfaceSTLWidget::_outMapper [protected] |
Definition at line 100 of file vtk3DSurfaceSTLWidget.h.
Referenced by ShowMARACASData(), and ~vtk3DSurfaceSTLWidget().
vtkRenderer* vtk3DSurfaceSTLWidget::_pRenderer [protected] |
Definition at line 97 of file vtk3DSurfaceSTLWidget.h.
Referenced by ConfigureVTK(), ConstructVessel(), RemoveAxis(), SetAxis(), SetInitialPoint(), ShowMARACASData(), ShowMARACASDataAndAxe(), and ~vtk3DSurfaceSTLWidget().
vtkRenderWindow* vtk3DSurfaceSTLWidget::_pRenderWindow [protected] |
Definition at line 98 of file vtk3DSurfaceSTLWidget.h.
Referenced by ConfigureVTK(), ConstructVessel(), RemoveAxis(), SetAxis(), SetCuttingMode(), SetInitialPoint(), SetSTLSurfaceVisibility(), SetSTLThresholdRatio(), SetSurfaceColor(), SetSurfaceIsoValue(), SetSurfaceOpacity(), and SetSurfaceVisibility().
Definition at line 94 of file vtk3DSurfaceSTLWidget.h.
Referenced by ConstructVessel(), GetSTLThreshold(), SetSTLThresholdRatio(), and ~vtk3DSurfaceSTLWidget().
vtkSphereSource* vtk3DSurfaceSTLWidget::_spheres[4] [protected] |
Definition at line 110 of file vtk3DSurfaceSTLWidget.h.
Referenced by GetSphereCenter(), SetInitialPoint(), and ~vtk3DSurfaceSTLWidget().
vtkActor* vtk3DSurfaceSTLWidget::_spheresActor[4] [protected] |
Definition at line 112 of file vtk3DSurfaceSTLWidget.h.
Referenced by SetInitialPoint(), and ~vtk3DSurfaceSTLWidget().
vtkPolyDataMapper* vtk3DSurfaceSTLWidget::_spheresMapper[4] [protected] |
Definition at line 111 of file vtk3DSurfaceSTLWidget.h.
Referenced by SetInitialPoint(), and ~vtk3DSurfaceSTLWidget().
vtkPolyData* vtk3DSurfaceSTLWidget::_stlExternalVessel [protected] |
Definition at line 122 of file vtk3DSurfaceSTLWidget.h.
Referenced by ConstructVessel(), ExportSurfaceAsSTL(), and SetCuttingMode().
vtkPolyData* vtk3DSurfaceSTLWidget::_stlInternalVessel [protected] |
Definition at line 121 of file vtk3DSurfaceSTLWidget.h.
Referenced by ConstructVessel(), ExportSurfaceAsSTL(), and SetCuttingMode().
vtkActor* vtk3DSurfaceSTLWidget::_surfActor [protected] |
Definition at line 104 of file vtk3DSurfaceSTLWidget.h.
Referenced by SetSurfaceColor(), SetSurfaceOpacity(), SetSurfaceVisibility(), ShowMARACASData(), and ~vtk3DSurfaceSTLWidget().
vtkPolyDataMapper* vtk3DSurfaceSTLWidget::_surfMapper [protected] |
Definition at line 103 of file vtk3DSurfaceSTLWidget.h.
Referenced by ShowMARACASData(), and ~vtk3DSurfaceSTLWidget().
int vtk3DSurfaceSTLWidget::_width [private] |
Definition at line 127 of file vtk3DSurfaceSTLWidget.h.
Referenced by FindCubePointsFromPoints(), SetInitialPoint(), and ShowMARACASData().
int wxVTKRenderWindowInteractor::ActiveButton [protected, inherited] |
Definition at line 162 of file wxVTKRenderWindowInteractor.h.
Referenced by wxVTKRenderWindowInteractor::OnButtonDown(), and wxVTKRenderWindowInteractor::OnButtonUp().
int vtk3DSurfaceSTLWidget::InitialSphere [private] |
Definition at line 130 of file vtk3DSurfaceSTLWidget.h.
Referenced by SetInitialPoint().
int wxVTKRenderWindowInteractor::RenderAllowed [protected, inherited] |
Definition at line 163 of file wxVTKRenderWindowInteractor.h.
Referenced by wxVTKRenderWindowInteractor::Render().
int wxVTKRenderWindowInteractor::Stereo [protected, inherited] |
Definition at line 165 of file wxVTKRenderWindowInteractor.h.
Referenced by wxVTKRenderWindowInteractor::SetStereo().
wxTimer wxVTKRenderWindowInteractor::timer [protected, inherited] |
Definition at line 161 of file wxVTKRenderWindowInteractor.h.