manualViewPoint Class Reference

#include <manualViewPoint.h>

Collaboration diagram for manualViewPoint:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 manualViewPoint (wxVtkBaseView *wxvtkbaseview)
 ~manualViewPoint ()
void SetSelected (bool selected)
void SetPosibleSelected (bool posibleSelected)
bool GetSelected ()
bool GetPosibleSelected ()
void DeleteVtkObjects ()
vtkActor * CreateVtkPointActor ()
void SetPositionXY (double x, double y, double range, double posZ)
vtkActor * GetVtkActor ()
void UpdateColorActor ()
void GetSpacing (double spc[3])
void SetSpacing (double spc[3])
void SetWidthLine (double width)

Protected Attributes

double _spc [3]

Private Attributes

bool _selected
bool _posibleSelected
vtkPoints * _pts
vtkPolyData * _pd
vtkActor * _pointVtkActor
vtkPolyDataMapper * _bboxMapper
wxVtkBaseView_wxvtkbaseview
double _widthline


Detailed Description

Definition at line 35 of file manualViewPoint.h.


Constructor & Destructor Documentation

manualViewPoint::manualViewPoint ( wxVtkBaseView wxvtkbaseview  ) 

Definition at line 11 of file manualViewPoint.cpp.

References _bboxMapper, _pd, _pointVtkActor, _posibleSelected, _pts, _selected, _spc, _widthline, and _wxvtkbaseview.

00011                                                             {
00012         _selected                = false;
00013         _posibleSelected = false;
00014         _pts                     = NULL;
00015         _pd                              = NULL;
00016         _pointVtkActor   = NULL;
00017         _bboxMapper              = NULL;
00018         _wxvtkbaseview   = wxvtkbaseview;
00019         _spc[0]                  = 1;
00020         _spc[1]                  = 1;
00021         _spc[2]                  = 1;
00022 
00023         _widthline               = 1;
00024 
00025 }

manualViewPoint::~manualViewPoint (  ) 

Definition at line 27 of file manualViewPoint.cpp.

References DeleteVtkObjects().

00027                                  {
00028         DeleteVtkObjects();
00029 }

Here is the call graph for this function:


Member Function Documentation

void manualViewPoint::SetSelected ( bool  selected  ) 

Definition at line 38 of file manualViewPoint.cpp.

References _selected.

00038                                               {
00039         _selected=selected;
00040 }

void manualViewPoint::SetPosibleSelected ( bool  posibleSelected  ) 

Definition at line 42 of file manualViewPoint.cpp.

References _posibleSelected.

00042                                                             {
00043         _posibleSelected=posibleSelected;
00044 }

bool manualViewPoint::GetSelected (  ) 

Definition at line 46 of file manualViewPoint.cpp.

References _selected.

00046                                  {
00047         return _selected;
00048 }

bool manualViewPoint::GetPosibleSelected (  ) 

Definition at line 50 of file manualViewPoint.cpp.

References _posibleSelected.

00050                                         {
00051         return _posibleSelected;
00052 }

void manualViewPoint::DeleteVtkObjects (  ) 

Definition at line 54 of file manualViewPoint.cpp.

References _bboxMapper, _pd, _pointVtkActor, and _pts.

Referenced by CreateVtkPointActor(), and ~manualViewPoint().

00054                                       {
00055         if (_pointVtkActor      !=NULL)         { _pointVtkActor->Delete(); }
00056         if (_bboxMapper         !=NULL)         { _bboxMapper   ->Delete();     }
00057         if (_pts                        !=NULL)         { _pts                  ->Delete();     }
00058         if (_pd                         !=NULL)         { _pd                   ->Delete();     }
00059         _pointVtkActor  =       NULL;
00060         _bboxMapper             =       NULL;
00061         _pts                    =       NULL;
00062         _pd                             =       NULL;
00063 }

Here is the caller graph for this function:

vtkActor * manualViewPoint::CreateVtkPointActor (  ) 

Definition at line 68 of file manualViewPoint.cpp.

References _bboxMapper, _pd, _pointVtkActor, _pts, DeleteVtkObjects(), and UpdateColorActor().

Referenced by manualViewBaseContour::AddPoint(), and manualViewBaseContour::InsertPoint().

00069 {
00070         DeleteVtkObjects();
00071 
00072         _pts = vtkPoints::New();
00073         _pts->SetNumberOfPoints(8);
00074 
00075         _pts->SetPoint(0, -1000 , -1000 , 0 );
00076         _pts->SetPoint(1,  1000 , -1000 , 0 );
00077         _pts->SetPoint(2,  1000 ,  1000 , 0 );
00078         _pts->SetPoint(3, -1000 ,  1000 , 0 );
00079         _pts->SetPoint(4, -1000 ,  1000 , 0 );
00080         _pts->SetPoint(5, -1000 ,  1000 , 0 );
00081         _pts->SetPoint(6, -1000 ,  1000 , 0 );
00082         _pts->SetPoint(7, -1000 ,  1000 , 0 );
00083         
00084         vtkCellArray *lines = vtkCellArray::New();
00085         lines->InsertNextCell(17);
00086         lines->InsertCellPoint(0);
00087         lines->InsertCellPoint(1);
00088         lines->InsertCellPoint(2);
00089         lines->InsertCellPoint(3);
00090         lines->InsertCellPoint(0);
00091         lines->InsertCellPoint(4);
00092         lines->InsertCellPoint(5);
00093         lines->InsertCellPoint(6);
00094         lines->InsertCellPoint(7);
00095         lines->InsertCellPoint(4);
00096         lines->InsertCellPoint(0);
00097         lines->InsertCellPoint(3);
00098         lines->InsertCellPoint(7);
00099         lines->InsertCellPoint(6);
00100         lines->InsertCellPoint(2);
00101         lines->InsertCellPoint(1);
00102         lines->InsertCellPoint(5);
00103 
00104         _pd = vtkPolyData::New();
00105         _pd->SetPoints( _pts );
00106         _pd->SetLines( lines );
00107 //      lines->Delete();  //do not delete lines ??
00108 
00109         _pointVtkActor  =       vtkActor::New();
00110     _bboxMapper         =       vtkPolyDataMapper::New();
00111 
00112         _bboxMapper->SetInput(_pd);
00113 //      _bboxMapper->ImmediateModeRenderingOn();
00114         _pointVtkActor->SetMapper(_bboxMapper);
00115 //      _pointVtkActor->GetProperty()->BackfaceCullingOn();
00116         UpdateColorActor();
00117 //      _pd->ComputeBounds();
00118 
00119         return _pointVtkActor;
00120 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewPoint::SetPositionXY ( double  x,
double  y,
double  range,
double  posZ 
)

Definition at line 126 of file manualViewPoint.cpp.

References _pts, and _spc.

00127 {
00128 //      double range=0.2; // i_range;
00129 //      double range=(double)manualViewPoint::range;
00130 
00131         double range=i_range;
00132 
00133 //EED 27 sep 2006
00134         x        = x * _spc[0];
00135         y        = y * _spc[1];
00136         posZ = posZ * _spc[2];
00137 
00138         if (_pts!=NULL){
00139                 _pts->SetPoint(0, x-range, y+range, posZ-range);
00140                 _pts->SetPoint(1, x+range, y+range, posZ-range);
00141                 _pts->SetPoint(2, x+range, y-range, posZ-range);
00142                 _pts->SetPoint(3, x-range, y-range, posZ-range);
00143                 _pts->SetPoint(4, x-range, y+range, posZ+range);
00144                 _pts->SetPoint(5, x+range, y+range, posZ+range);
00145                 _pts->SetPoint(6, x+range, y-range, posZ+range);
00146                 _pts->SetPoint(7, x-range, y-range, posZ+range);
00147         }
00148 }

vtkActor * manualViewPoint::GetVtkActor (  ) 

Definition at line 122 of file manualViewPoint.cpp.

References _pointVtkActor.

Referenced by manualViewBaseContour::DeletePoint().

00122                                       {
00123         return _pointVtkActor;
00124 }

Here is the caller graph for this function:

void manualViewPoint::UpdateColorActor (  ) 

Definition at line 152 of file manualViewPoint.cpp.

References _pointVtkActor, _posibleSelected, and _widthline.

Referenced by CreateVtkPointActor().

00153 {
00154         if (_pointVtkActor!=NULL){
00155 //EED03
00156                 _pointVtkActor->GetProperty()->SetLineWidth( _widthline );
00157                 _pointVtkActor->GetProperty()->SetDiffuseColor(1,0,0);
00158                 if (_posibleSelected==true){
00159                         _pointVtkActor->GetProperty()->SetDiffuseColor(1,1,0);
00160                 }
00161         }
00162 }

Here is the caller graph for this function:

void manualViewPoint::GetSpacing ( double  spc[3]  ) 

Definition at line 164 of file manualViewPoint.cpp.

References _spc.

00165 {
00166         spc[0] = _spc[0];
00167         spc[1] = _spc[1];
00168         spc[2] = _spc[2];
00169 }

void manualViewPoint::SetSpacing ( double  spc[3]  ) 

Definition at line 171 of file manualViewPoint.cpp.

References _spc.

Referenced by manualViewBaseContour::AddPoint(), and manualViewBaseContour::InsertPoint().

00172 {
00173         _spc[0] = spc[0];
00174         _spc[1] = spc[1];
00175         _spc[2] = spc[2];
00176 }

Here is the caller graph for this function:

void manualViewPoint::SetWidthLine ( double  width  ) 

Definition at line 32 of file manualViewPoint.cpp.

References _widthline.

00033 {
00034         _widthline = width;
00035 }


Member Data Documentation

bool manualViewPoint::_selected [private]

Definition at line 57 of file manualViewPoint.h.

Referenced by GetSelected(), manualViewPoint(), and SetSelected().

bool manualViewPoint::_posibleSelected [private]

Definition at line 58 of file manualViewPoint.h.

Referenced by GetPosibleSelected(), manualViewPoint(), SetPosibleSelected(), and UpdateColorActor().

vtkPoints* manualViewPoint::_pts [private]

Definition at line 59 of file manualViewPoint.h.

Referenced by CreateVtkPointActor(), DeleteVtkObjects(), manualViewPoint(), and SetPositionXY().

vtkPolyData* manualViewPoint::_pd [private]

Definition at line 60 of file manualViewPoint.h.

Referenced by CreateVtkPointActor(), DeleteVtkObjects(), and manualViewPoint().

vtkActor* manualViewPoint::_pointVtkActor [private]

Definition at line 61 of file manualViewPoint.h.

Referenced by CreateVtkPointActor(), DeleteVtkObjects(), GetVtkActor(), manualViewPoint(), and UpdateColorActor().

vtkPolyDataMapper* manualViewPoint::_bboxMapper [private]

Definition at line 62 of file manualViewPoint.h.

Referenced by CreateVtkPointActor(), DeleteVtkObjects(), and manualViewPoint().

wxVtkBaseView* manualViewPoint::_wxvtkbaseview [private]

Definition at line 63 of file manualViewPoint.h.

Referenced by manualViewPoint().

double manualViewPoint::_widthline [private]

Definition at line 64 of file manualViewPoint.h.

Referenced by manualViewPoint(), SetWidthLine(), and UpdateColorActor().

double manualViewPoint::_spc[3] [protected]

Definition at line 66 of file manualViewPoint.h.

Referenced by GetSpacing(), manualViewPoint(), SetPositionXY(), and SetSpacing().


The documentation for this class was generated from the following files:
Generated on Wed Jul 29 16:35:56 2009 for creaMaracasVisu_lib by  doxygen 1.5.3