wxVtkMPR2DView Class Reference

#include <wxVtkMPR2DView.h>

Inheritance diagram for wxVtkMPR2DView:
Inheritance graph
[legend]
Collaboration diagram for wxVtkMPR2DView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 wxVtkMPR2DView (wxWindow *parent, int direction)
 ~wxVtkMPR2DView ()
void Configure ()
virtual void Refresh ()
vtkMPRBaseDataGetVtkmprbasedata ()
virtual int GetActualSlice ()
virtual void SetActualSlice (int slice)
bool IfMouseTouchX (double x, double y, double z)
bool IfMouseTouchY (double x, double y, double z)
bool IfMouseTouchZ (double x, double y, double z)
void MoveX (double x, double y, double z)
void MoveY (double x, double y, double z)
void MoveZ (double x, double y, double z)
void ChangeAxisColor (double x, double y, double z)
virtual void TransFromCoordScreenToWorld (double &X, double &Y, double &Z, bool keepNormalDirection=false, int type=2)
void SetVisibleAxis (bool ok)
virtual void Configure (bool okimage=true)
vtkBaseDataGetVtkBaseData ()
void SetVtkBaseData (vtkBaseData *vtkbasedata)
virtual void ResetView ()
void SetInteractorStyleImage (vtkInteractorStyleBaseView *interactorstylebaseview)
virtual vtkRenderer * GetRenderer ()
virtual vtkRenderWindow * GetRenWin ()
virtual void TransformCoordinate_spacing_ViewToModel (double &X, double &Y, double &Z)
virtual void TransformCoordinate_spacing_ModelToView (double &X, double &Y, double &Z)
virtual void GetSpacing (double spc[3])
void setColorTransferFunction (vtkColorTransferFunction *colortable)
void setWindowLevel (double level)
void setColorLevel (double level)
wxVTKRenderWindowInteractorGetWxVTKRenderWindowInteractor () throw (char*)
virtual void RefreshView ()
void TransCoordScreenToWorld (double &X, double &Y, double &Z, int type=2)
void SetInteractorStyleBaseView (vtkInteractorStyleImage *interactorStyle)
vtkInteractorStyleImage * GetInteractorStyleBaseView ()

Public Attributes

vtkImageViewer2_XYZ_imageViewer2XYZ

Private Attributes

int _backX
int _backY
int _backZ
bool _visibleAxis
int _direction
vtkPoints * _ptsA
vtkActor * _lineAActor
vtkPolyDataMapper * _lineAMapper
vtkPolyData * _pdA
vtkPoints * _ptsB
vtkActor * _lineBActor
vtkPolyDataMapper * _lineBMapper
vtkPolyData * _pdB
vtkInteractorStyleMPRView_interactorstylemprview

Detailed Description

Definition at line 14 of file wxVtkMPR2DView.h.


Constructor & Destructor Documentation

wxVtkMPR2DView::wxVtkMPR2DView ( wxWindow *  parent,
int  direction 
)

Definition at line 7 of file wxVtkMPR2DView.cxx.

References _backX, _backY, _backZ, _direction, _interactorstylemprview, _lineAActor, _lineAMapper, _lineBActor, _lineBMapper, _pdA, _pdB, _ptsA, and _ptsB.

00008  :wxVtk2DBaseView(parent)
00009 {
00010         _backX                  = -99999;
00011         _backY                  = -99999;
00012         _backZ                  = -99999;
00013         _direction              = direction;
00014         _ptsA                   = NULL;
00015         _lineAActor             = NULL;
00016         _lineAMapper    = NULL;
00017         _pdA                    = NULL;
00018         _ptsB                   = NULL;
00019         _lineBActor             = NULL;
00020         _lineBMapper    = NULL;
00021         _pdB                    = NULL;
00022         _interactorstylemprview = NULL;
00023 }

wxVtkMPR2DView::~wxVtkMPR2DView (  ) 

Definition at line 26 of file wxVtkMPR2DView.cxx.

References _lineAActor, _lineAMapper, _lineBActor, _lineBMapper, _pdA, _pdB, _ptsA, and _ptsB.

00027 {
00028         if (_ptsA!=NULL)        { _ptsA         -> Delete(); }
00029         if (_lineAActor!=NULL)  { _lineAActor   -> Delete(); }
00030         if (_lineAMapper!=NULL) { _lineAMapper  -> Delete(); }
00031         if (_pdA!=NULL)         { _pdA          -> Delete(); }
00032         if (_ptsB!=NULL)        { _ptsB         -> Delete(); }
00033         if (_lineBActor!=NULL)  { _lineBActor   -> Delete(); }
00034         if (_lineBMapper!=NULL) { _lineBMapper  -> Delete(); }
00035         if (_pdB!=NULL)         { _pdB          -> Delete(); }
00036 }


Member Function Documentation

void wxVtkMPR2DView::ChangeAxisColor ( double  x,
double  y,
double  z 
)

Definition at line 455 of file wxVtkMPR2DView.cxx.

References _direction, _lineAActor, _lineBActor, IfMouseTouchX(), IfMouseTouchY(), IfMouseTouchZ(), and Refresh().

Referenced by vtkInteractorStyleMPRView::OnMouseMove().

00456 {
00457         double c1r=1,c1g=1,c1b=0;
00458         double c2r=1,c2g=0,c2b=0;
00459 
00460         if (_direction==0) 
00461         { 
00462                 if (IfMouseTouchY(x,y,z)==true)
00463                 {
00464                         _lineBActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
00465                 } else {
00466                         _lineBActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
00467                 }
00468                 if (IfMouseTouchZ(x,y,z)==true)
00469                 {
00470                         _lineAActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
00471                 } else {
00472                         _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
00473                 }
00474         }
00475 
00476         if (_direction==1) 
00477         { 
00478                 if (IfMouseTouchX(x,y,z)==true)
00479                 {
00480                         _lineBActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
00481                 } else {
00482                         _lineBActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
00483                 }
00484                 if (IfMouseTouchZ(x,y,z)==true)
00485                 {
00486                         _lineAActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
00487                 } else {
00488                         _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
00489                 }
00490         }
00491 
00492         if (_direction==2) 
00493         { 
00494                 if (IfMouseTouchX(x,y,z)==true)
00495                 {
00496                         _lineBActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
00497                 } else {
00498                         _lineBActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
00499                 }
00500                 if (IfMouseTouchY(x,y,z)==true)
00501                 {
00502                         _lineAActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
00503                 } else {
00504                         _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
00505                 }
00506         }
00507         Refresh();
00508 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtk2DBaseView::Configure ( bool  okimage = true  )  [virtual, inherited]

Definition at line 123 of file wxVtk2DBaseView.cxx.

References wxVtk2DBaseView::_imageViewer2XYZ, wxVtk2DBaseView::_vtkIinfoTextImage, wxVtk2DBaseView::_vtkIinfoTextImageInteractor, vtkInfoTextImage::Configure(), wxVtkBaseView::Configure(), marImageData::GetImageData(), wxVtkBaseView::GetInteractorStyleBaseView(), vtkBaseData::GetMarImageData(), wxVtk2DBaseView::GetVtkBaseData(), vtkImageViewer2_XYZ::GetVtkImageViewer2(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), vtkInteractorStyleBaseView2D::New(), vtkImageViewer2_XYZ::SetExtentDimension(), vtkInteractorStyleBaseView2D::SetInteractorScrollZ(), wxVtk2DBaseView::SetInteractorStyleImage(), vtkInteractorStyleBaseView2D::SetInteractorWindowLevel(), vtkInfoTextImage::SetMarImageData(), vtkInfoTextImageInteractor::SetModelVtkInfoTextImage(), and vtkInfoTextImage::SetWxVtk2DBaseView().

Referenced by wxMaracas_ViewerWidget::ConfigureVTK(), wxQuantificationWidgetCT::ConfigureVTK(), wxProcessingCTWidget::ConfigureVTK(), wxEmptyPanel_3_Widget::ConfigureVTK(), and wxMaracasImageBrowser02::LoadData().

00124 {
00125         double spx,spy,spz;
00126         int x1,x2,y1,y2,z1,z2;
00127         wxVtkBaseView::Configure();
00128 
00129 // EED 17 Oct 2007
00130         if (_imageViewer2XYZ==NULL)
00131         {
00132                 _imageViewer2XYZ = new vtkImageViewer2_XYZ();
00133                 wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
00134                 _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
00135 
00137                 //RaC 04-2010 Look for the description of new changes in vtkInteractorStyleBaseView2D constructor.
00138                 //
00139                 // Previous version
00140                 // SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
00141                 //
00142                 // Actual version
00143                 vtkInteractorStyleBaseView2D *style2D = vtkInteractorStyleBaseView2D::New();
00144 
00145                 manualInteractorWindowLevel *_manualinteractorwindowlevel= new manualInteractorWindowLevel();
00146                 style2D->SetInteractorWindowLevel( _manualinteractorwindowlevel );
00147 
00148                 vtkInteractorScrollZ *_vtkInteractorScrollZ = new vtkInteractorScrollZ();
00149                 style2D->SetInteractorScrollZ(_vtkInteractorScrollZ);
00150 
00151                 SetInteractorStyleImage( style2D );
00152 
00153                 // RaC
00155         }
00156 
00157 
00158         vtkImageData *imageData = GetVtkBaseData()->GetMarImageData()->GetImageData();
00159         if (imageData!=NULL){
00160                 
00161                 imageData->UpdateInformation();
00162                 imageData->SetUpdateExtent( imageData->GetWholeExtent());
00163                 imageData->Update();
00164                 if (okimage==true){
00165                         imageData->GetSpacing (spx,spy,spz);
00166                         imageData->GetExtent (x1,x2,y1,y2,z1,z2);
00167                         _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
00168                         _imageViewer2XYZ->SetExtentDimension(x1,x2,y1,y2,z1,z2);
00169                         double range[2];
00170                         imageData->GetScalarRange(range);
00171                         if (range[1]<20000){
00172                                  _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow( (range[1]-range[0])/2 );
00173                                  _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel( (range[1]+range[0])/4 );
00174                         } else {
00175                                  _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow( 1000 );
00176                                  _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel( 500 );
00177                         }
00178 // EED 31 Janvier 2007
00179 //vtkImageActor *vtkimageactor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor ();
00180 //vtkimageactor->InterpolateOff ();
00181 //vtkLookupTable * _collookup = vtkLookupTable::New( );
00182 //_collookup->SetNumberOfColors( 256 );
00183 //_collookup->SetTableRange( 0 , 255 );
00184 //_collookup->Build( );
00185 //_collookup->SetTableValue( 0  , 1 , 0 , 0 , 1 );
00186 //_collookup->SetTableValue(128 , 0 , 0 , 1 , 1 );
00187 //_collookup->SetTableValue(255 , 0 , 1 , 0 , 1 );
00188 //_imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel ()->SetLookupTable(_collookup );
00189 
00190 
00191 // EED 17 Oct 2007
00192 //                      SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
00193 
00194 
00195                         vtkImageViewer2 *IV2=_imageViewer2XYZ->GetVtkImageViewer2();
00196                         vtkCamera *camera = IV2->GetRenderer()->GetActiveCamera();
00197 
00198 //EED 17Avril2009       
00199 /*                      
00200                         camera->SetViewUp               ( spx*0                 , -spy*1                        , spz*0         );
00201                         camera->SetPosition             ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , -spz*10000    ); 
00202                         camera->SetFocalPoint   ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0         ); 
00203 */ 
00204                         camera->SetViewUp               ( spx*0                 , spy*1                 , spz*0         );
00205                         camera->SetPosition             ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*10000     ); 
00206                         camera->SetFocalPoint   ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0         ); 
00207                         
00208                         
00209                         camera->SetClippingRange( 0.01                  , 1000000 );
00210                         camera->ComputeViewPlaneNormal();
00211                         camera->SetParallelScale( spx*(x2-x1)/3.0 );
00212                         
00213                         // text information over the graphic window
00214                         if(_vtkIinfoTextImage == NULL){
00215                                 _vtkIinfoTextImage              = new vtkInfoTextImage();
00216                                 _vtkIinfoTextImageInteractor    = new vtkInfoTextImageInteractor();                             
00217                                 ((vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView())->AddInteractorStyleMaracas(_vtkIinfoTextImageInteractor);
00218                         }
00219                         _vtkIinfoTextImage->SetWxVtk2DBaseView(this);
00220                         _vtkIinfoTextImage->SetMarImageData( GetVtkBaseData()->GetMarImageData() );
00221                         _vtkIinfoTextImageInteractor->SetModelVtkInfoTextImage(_vtkIinfoTextImage);                             
00222                         _vtkIinfoTextImage->Configure();
00223                         
00224                 } // okimage
00225         } // imageData
00226 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkMPR2DView::Configure (  )  [virtual]

Reimplemented from wxVtkBaseView.

Definition at line 43 of file wxVtkMPR2DView.cxx.

References _direction, wxVtk2DBaseView::_imageViewer2XYZ, _interactorstylemprview, _lineAActor, _lineAMapper, _lineBActor, _lineBMapper, _pdA, _pdB, _ptsA, _ptsB, _visibleAxis, vtkBaseData::GetImageData(), wxVtkBaseView::GetInteractorStyleBaseView(), vtkImageViewer2_XYZ::GetVtkImageViewer2(), and GetVtkmprbasedata().

Referenced by wxMaracas_ViewerWidget::ConfigureVTK().

00043                               {
00044         wxVtk2DBaseView::Configure();
00045         
00046 
00047         int x1,x2,y1,y2,z1,z2;
00048         GetVtkmprbasedata()     -> GetDimensionExtention(&x1,&x2,&y1,&y2,&z1,&z2);
00049 
00050         double spc[3];
00051         vtkImageData* img =  GetVtkmprbasedata()->GetImageData();
00052         if(_interactorstylemprview==NULL)       
00053         {
00054                 _interactorstylemprview = new vtkInteractorStyleMPRView();
00055                 ((vtkInteractorStyleBaseView*)GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _interactorstylemprview );
00056         }
00057         
00058         if(img!=NULL){
00059                 double* origin = img->GetOrigin();
00060                 img->GetExtent(x1,x2,y1,y2,z1,z2);
00061                 img->GetSpacing(spc);
00062                 x1 += origin[0];
00063                 x2 += origin[0];
00064                 y1 += origin[1];
00065                 y2 += origin[1];
00066                 z1 += origin[2];
00067                 z2 += origin[2];
00068                 x1 = (int)(x1*spc[0]);
00069                 y1 = (int)(y1*spc[1]);
00070                 z1 = (int)(z1*spc[2]);
00071 
00072                 x2 = (int)(x2*spc[0]);
00073                 y2 = (int)(y2*spc[1]);
00074                 z2 = (int)(z2*spc[2]);
00075 
00076                 _visibleAxis = true;
00077                 
00078                 
00079                 
00080         }
00081         
00082         // Axe A
00083         if(_lineAActor==NULL){
00084                 _lineAActor = vtkActor::New();
00085                 _lineAActor->GetProperty()->SetDiffuseColor(1,0,0);
00086                 _lineAActor->GetProperty()->SetLineWidth(2);
00087                 
00088                 _ptsA = vtkPoints::New();
00089                 _ptsA->SetNumberOfPoints(2);
00090                 _ptsA->SetPoint(0, -1000        , -1000 , -1000 );
00091                 _ptsA->SetPoint(1,  1000        ,  1000 ,  1000 );
00092                 
00093                 _pdA = vtkPolyData::New();
00094                 
00095                 _lineAMapper = vtkPolyDataMapper::New();
00096                 
00097                 _lineAMapper->SetInput(_pdA);
00098                 _lineAMapper->ImmediateModeRenderingOn();
00099                 _lineAActor->SetMapper(_lineAMapper);
00100         }       
00101         
00102         vtkCellArray *linesA = vtkCellArray::New();
00103         linesA->InsertNextCell(2);
00104         linesA->InsertCellPoint(0);
00105         linesA->InsertCellPoint(1);
00106         _pdA->SetPoints( _ptsA );
00107         _pdA->SetLines( linesA );
00108         linesA->Delete();  //do not delete lines ??
00109 //              _lineAActor->GetProperty()->BackfaceCullingOn();
00110         
00111 
00112 // Axe B
00113         if(_lineBActor==NULL){
00114                 _lineBActor                                             =       vtkActor::New();
00115                 _lineBActor->GetProperty()->SetDiffuseColor(1,0,0);
00116                 _lineBActor->GetProperty()->SetLineWidth(2);
00117                 _lineBMapper                                    =       vtkPolyDataMapper::New();               
00118                 _lineBActor->SetMapper(_lineBMapper);
00119                 
00120                 _ptsB = vtkPoints::New();
00121                 _ptsB->SetNumberOfPoints(2);
00122                 _ptsB->SetPoint(0, -1000        , -1000 , -1000 );
00123                 _ptsB->SetPoint(1,  1000        ,  1000 ,  1000 );
00124                 
00125 //              _lineBActor->GetProperty()->BackfaceCullingOn();
00126         }
00127         
00128         vtkCellArray *linesB;
00129         linesB = vtkCellArray::New();
00130         linesB->InsertNextCell(2);
00131         linesB->InsertCellPoint(0);
00132         linesB->InsertCellPoint(1);
00133         _pdB = vtkPolyData::New();
00134         _pdB->SetPoints( _ptsB );
00135         _pdB->SetLines( linesB );
00136         linesB->Delete();  //do not delete lines ??
00137         
00138         
00139         _lineBMapper->SetInput(_pdB);
00140         _lineBMapper->ImmediateModeRenderingOn();
00141 
00142 
00143         if(_imageViewer2XYZ){
00144                 _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
00145                 _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor );
00146                 vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera();
00147                 
00148         //EED 17Avril2009
00149         /*              
00150                 if (_direction==0) {
00151                         camera->SetViewUp               (   0   ,    -1         ,     0         );
00152                         camera->SetPosition             ( -10000,(y1+y2)/2      , (z1+z2)/2     ); 
00153                         camera->SetFocalPoint   (   0   , (y1+y2)/2     , (z1+z2)/2     );
00154                         camera->SetParallelScale( (z2-z1)/3.0 );
00155                 }
00156 
00157                 if (_direction==1) { 
00158                         camera->SetViewUp               (       0               ,       0       ,       -1              );
00159                         camera->SetPosition             ((x1+x2)/2      , 10000 , (z1+z2)/2     ); 
00160                         camera->SetFocalPoint   ((x1+x2)/2      ,   0   , (z1+z2)/2     );
00161                         camera->SetParallelScale( (x2-x1)/3.0 );
00162                 }
00163 
00164                 if (_direction==2) { 
00165                         camera->SetViewUp               (       0               ,       -1              ,       0       );
00166                         camera->SetPosition             ((x1+x2)/2      , (y1+y2)/2     , -10000); 
00167                         camera->SetFocalPoint   ((x1+x2)/2      , (y1+y2)/2     ,       0       ); 
00168                         camera->SetParallelScale( (x2-x1)/3.0 );
00169                 }
00170         */
00171 
00172                 if (_direction==0) {    // YZ
00173                         camera->SetViewUp               (   0   ,     1         ,     0         );
00174                         camera->SetPosition             (  10000,(y1+y2)/2      , (z1+z2)/2     ); 
00175                         camera->SetFocalPoint   (   0   , (y1+y2)/2     , (z1+z2)/2     );
00176                         camera->SetParallelScale( (z2-z1)/3.0 );
00177                 }
00178                 
00179                 if (_direction==1) {    // XZ
00180                         camera->SetViewUp               (       0               ,       0       ,       -1              );
00181                         camera->SetPosition             ((x1+x2)/2      , 10000 , (z1+z2)/2     ); 
00182                         camera->SetFocalPoint   ((x1+x2)/2      ,   0   , (z1+z2)/2     );
00183                         camera->SetParallelScale( (x2-x1)/3.0 );
00184                 }
00185                 
00186                 if (_direction==2) {    // XY
00187                         camera->SetViewUp               (       0               ,       1               ,       0       );
00188                         camera->SetPosition             ((x1+x2)/2      , (y1+y2)/2     ,  10000); 
00189                         camera->SetFocalPoint   ((x1+x2)/2      , (y1+y2)/2     ,       0       ); 
00190                         camera->SetParallelScale( (x2-x1)/3.0 );
00191                 }
00192                 
00193 
00194         //      _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow (160);
00195         //      _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel (800);
00196         }
00197 
00198 }

Here is the call graph for this function:

Here is the caller graph for this function:

int wxVtkMPR2DView::GetActualSlice (  )  [virtual]

Reimplemented from wxVtk2DBaseView.

Definition at line 304 of file wxVtkMPR2DView.cxx.

References _direction, GetVtkmprbasedata(), vtkMPRBaseData::GetX(), vtkMPRBaseData::GetY(), and vtkBaseData::GetZ().

00305 {
00306         int result;
00307         if (_direction==0) 
00308         { 
00309                 result = (int)(GetVtkmprbasedata()->GetX());
00310         }
00311         if (_direction==1) 
00312         { 
00313                 result = (int)(GetVtkmprbasedata()->GetY());
00314         }
00315         if (_direction==2) 
00316         { 
00317                 result = (int)(GetVtkmprbasedata()->GetZ());
00318         }
00319         return result;
00320 }

Here is the call graph for this function:

vtkInteractorStyleImage * wxVtkBaseView::GetInteractorStyleBaseView (  )  [inherited]
vtkRenderer * wxVtk2DBaseView::GetRenderer (  )  [virtual, inherited]

Reimplemented from wxVtkBaseView.

Definition at line 285 of file wxVtk2DBaseView.cxx.

References wxVtk2DBaseView::_imageViewer2XYZ, and vtkImageViewer2_XYZ::GetVtkImageViewer2().

Referenced by vtkInfoTextImage::Create_Text_Label().

00286 {
00287    return _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer();
00288 }

Here is the call graph for this function:

Here is the caller graph for this function:

vtkRenderWindow * wxVtk2DBaseView::GetRenWin (  )  [virtual, inherited]

Reimplemented from wxVtkBaseView.

Definition at line 290 of file wxVtk2DBaseView.cxx.

References wxVtk2DBaseView::_imageViewer2XYZ, and vtkImageViewer2_XYZ::GetVtkImageViewer2().

Referenced by wxMaracasSuperpositionPanel::Refresh().

00291 {
00292    return _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderWindow();
00293 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtk2DBaseView::GetSpacing ( double  spc[3]  )  [virtual, inherited]

Reimplemented from wxVtkBaseView.

Definition at line 297 of file wxVtk2DBaseView.cxx.

References vtkBaseData::GetImageData(), and wxVtk2DBaseView::GetVtkBaseData().

00298 {
00299    vtkImageData *imageData      = GetVtkBaseData()->GetImageData();
00300    if(imageData){
00301         imageData->GetSpacing(spc);
00302    }else{
00303          spc[0] = 0; 
00304          spc[1] = 0;
00305          spc[2] = 0;
00306    }
00307 }

Here is the call graph for this function:

vtkBaseData * wxVtk2DBaseView::GetVtkBaseData (  )  [inherited]
vtkMPRBaseData * wxVtkMPR2DView::GetVtkmprbasedata (  ) 

Definition at line 38 of file wxVtkMPR2DView.cxx.

References wxVtk2DBaseView::GetVtkBaseData().

Referenced by Configure(), GetActualSlice(), wxMaracasSuperpositionPanel::GetX(), wxMaracasSuperpositionPanel::GetY(), wxMaracasSuperpositionPanel::GetZ(), IfMouseTouchX(), IfMouseTouchY(), IfMouseTouchZ(), MoveX(), MoveY(), MoveZ(), Refresh(), and SetActualSlice().

00039 {
00040         return (vtkMPRBaseData*)GetVtkBaseData();
00041 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxVTKRenderWindowInteractor * wxVtkBaseView::GetWxVTKRenderWindowInteractor (  )  throw (char*) [inherited]

Reimplemented in wxVtk2DView_TMP.

Definition at line 36 of file wxVtkBaseView.cxx.

References wxVtkBaseView::_iren.

Referenced by wxMaracasRenderTabbedPanel::addRemoveActorMPR(), wxVtkClipping3DView::Configure(), wxVtk3DBaseView::Configure(), wxVtk2DBaseView::Configure(), vtkPlane2DView::Configure(), wxWidgetMesure2D::ConfigureA(), wxManualRegistration3D::Create3DView(), wxManualTree_MPRWidget::Create3DViewContour(), wxSegmentationFM3DWidget::Create3DViewContour(), wxManualSegmentation_MPRWidget::Create3DViewContour(), wxMPRWidget::CreateMPRPanel4View(), wxPanelCuttingImageData::CreatePlotHistogrammeInterface(), wxMaracas_ManualContour_Panel::CreateSplitePanel(), wxMPRWidget::CreateView(), wxQuantificationWidgetCT::CreateView2DPanel(), wxProcessingCTWidget::CreateViewPanel(), wxEmptyPanelWidget::CreateViewPanel(), wxEmptyPanel_3_Widget::CreateViewPanel(), vtkInteractorStyleBaseView::EvaluateToRefresh(), wxMaracasImageBrowser02::LoadData(), wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(), wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(), wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(), manualContourBaseControler::OnChar(), wxVtkClipping3DViewCntrlPanel::OnColor(), wxPanelCuttingImageData::OnExtract(), wxVtkClipping3DViewCntrlPanel::OnIsoValue(), manualContourBaseControler::OnLeftButtonDown(), manualContour3DControler::OnLeftButtonDown(), vtkInteractorStyleSphere::OnLeftButtonUp(), manualContourBaseControler::OnLeftButtonUp(), vtkInteractorStyleMPRView::OnLeftDClick(), manualContourBaseControler::OnLeftDClick(), manualInteractorWindowLevel::OnMiddleButtonDown(), manualContourBaseControler::OnMiddleButtonDown(), vtkInfoTextImageInteractorPlane2D::OnMouseMove(), vtkInfoTextImageInteractor::OnMouseMove(), vtkInteractorManualPaint::OnMouseMove(), manualInteractorWindowLevel::OnMouseMove(), manualContourBaseControler::OnMouseMove(), wxVtkClipping3DViewCntrlPanel::OnOpacity(), wxVtkMPR3DViewCntrlPanel::OnPositionX(), wxVtkMPR3DViewCntrlPanel::OnPositionY(), wxVtkMPR3DViewCntrlPanel::OnPositionZ(), wxMaracasRenderTabbedPanel::OnRefreshView(), wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame(), manualContourBaseControler::OnRightButtonDown(), wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX(), wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY(), wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ(), wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(), wxVtkClipping3DViewVolCntrlPanel::OnVisibleVolume(), wxVtkClipping3DViewCntrlPanel::OnVisibleVolume(), wxVtkBaseView::Refresh(), wxVtk3DBaseView::Refresh(), manualViewBaseContour::Refresh(), wxVtk2DBaseView::ResetView(), vtkInteractorStyle3DView::SelectMarchibCubePoint(), wxVtk2DBaseView::SetInteractorStyleImage(), wxVtkMPR3DViewCntrlPanel::SetVisibleX(), wxVtkMPR3DViewCntrlPanel::SetVisibleY(), wxVtkMPR3DViewCntrlPanel::SetVisibleZ(), and wxMaracas_ViewerWidget::wxMaracas_ViewerWidget().

00037 {
00038 
00039         if(_iren==NULL){
00040                 throw "wxVtkBaseView::GetWxVTKRenderWindowInteractor() _iren wxVTKRenderWindowInteractorPlus =NULL";
00041         }
00042    return _iren;
00043 }

bool wxVtkMPR2DView::IfMouseTouchX ( double  x,
double  y,
double  z 
)

Definition at line 338 of file wxVtkMPR2DView.cxx.

References _direction, and GetVtkmprbasedata().

Referenced by ChangeAxisColor(), and vtkInteractorStyleMPRView::OnLeftButtonDown().

00339 {
00340         double delta=5;
00341         bool result=false;
00342         if (_direction==0) 
00343         { 
00344         }
00345         if (_direction==1) 
00346         { 
00347                 if (( x<GetVtkmprbasedata()->GetX()+delta ) && ( x>GetVtkmprbasedata()->GetX()-delta ))
00348                 {
00349                         result = true;
00350                 }
00351         }
00352         if (_direction==2) 
00353         { 
00354                 if (( x<GetVtkmprbasedata()->GetX()+delta ) && ( x>GetVtkmprbasedata()->GetX()-delta ))
00355                 {
00356                         result = true;
00357                 }
00358         }
00359         return result;
00360 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool wxVtkMPR2DView::IfMouseTouchY ( double  x,
double  y,
double  z 
)

Definition at line 362 of file wxVtkMPR2DView.cxx.

References _direction, and GetVtkmprbasedata().

Referenced by ChangeAxisColor(), and vtkInteractorStyleMPRView::OnLeftButtonDown().

00363 {
00364         double delta=5;
00365         bool result=false;
00366         if (_direction==0) 
00367         { 
00368                 if (( y<GetVtkmprbasedata()->GetY()+delta ) && ( y>GetVtkmprbasedata()->GetY()-delta ))
00369                 {
00370                         result = true;
00371                 }
00372         }
00373         if (_direction==1) 
00374         { 
00375         }
00376         if (_direction==2) 
00377         { 
00378                 if (( y<GetVtkmprbasedata()->GetY()+delta ) && ( y>GetVtkmprbasedata()->GetY()-delta ))
00379                 {
00380                         result = true;
00381                 }
00382         }
00383         return result;
00384 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool wxVtkMPR2DView::IfMouseTouchZ ( double  x,
double  y,
double  z 
)

Definition at line 386 of file wxVtkMPR2DView.cxx.

References _direction, and GetVtkmprbasedata().

Referenced by ChangeAxisColor(), and vtkInteractorStyleMPRView::OnLeftButtonDown().

00387 {
00388         double delta=5;
00389         bool result=false;
00390         if (_direction==0) 
00391         { 
00392                 if (( z<GetVtkmprbasedata()->GetZ()+delta ) && ( z>GetVtkmprbasedata()->GetZ()-delta ))
00393                 {
00394                         result = true;
00395                 }
00396         }
00397         if (_direction==1) 
00398         { 
00399                 if (( z<GetVtkmprbasedata()->GetZ()+delta ) && ( z>GetVtkmprbasedata()->GetZ()-delta ))
00400                 {
00401                         result = true;
00402                 }
00403         }
00404         if (_direction==2) 
00405         { 
00406         }
00407         return result;
00408 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkMPR2DView::MoveX ( double  x,
double  y,
double  z 
)

Definition at line 410 of file wxVtkMPR2DView.cxx.

References _direction, GetVtkmprbasedata(), and vtkMPRBaseData::SetX().

Referenced by vtkInteractorStyleMPRView::OnLeftDClick().

00411 {
00412         if (_direction==0) 
00413         { 
00414         }
00415         if (_direction==1) 
00416         { 
00417                 GetVtkmprbasedata()->SetX(x);
00418         }
00419         if (_direction==2) 
00420         { 
00421                 GetVtkmprbasedata()->SetX(x);
00422         }
00423 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkMPR2DView::MoveY ( double  x,
double  y,
double  z 
)

Definition at line 425 of file wxVtkMPR2DView.cxx.

References _direction, GetVtkmprbasedata(), and vtkMPRBaseData::SetY().

Referenced by vtkInteractorStyleMPRView::OnLeftDClick(), and vtkInteractorStyleMPRView::OnMouseMove().

00426 {
00427         if (_direction==0) 
00428         { 
00429                 GetVtkmprbasedata()->SetY(y);
00430         }
00431         if (_direction==1) 
00432         { 
00433         }
00434         if (_direction==2) 
00435         { 
00436                 GetVtkmprbasedata()->SetY(y);
00437         }
00438 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkMPR2DView::MoveZ ( double  x,
double  y,
double  z 
)

Definition at line 440 of file wxVtkMPR2DView.cxx.

References _direction, GetVtkmprbasedata(), and vtkBaseData::SetZ().

Referenced by vtkInteractorStyleMPRView::OnLeftDClick(), and vtkInteractorStyleMPRView::OnMouseMove().

00441 {
00442         if (_direction==0) 
00443         { 
00444                 GetVtkmprbasedata()->SetZ(z);
00445         }
00446         if (_direction==1) 
00447         { 
00448                 GetVtkmprbasedata()->SetZ(z);
00449         }
00450         if (_direction==2) 
00451         { 
00452         }
00453 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkMPR2DView::Refresh (  )  [virtual]

Reimplemented from wxVtk2DBaseView.

Definition at line 220 of file wxVtkMPR2DView.cxx.

References _backX, _backY, _backZ, _direction, wxVtk2DBaseView::_imageViewer2XYZ, _ptsA, _ptsB, vtkBaseData::GetImageData(), GetVtkmprbasedata(), vtkMPRBaseData::GetX(), vtkMPRBaseData::GetY(), vtkBaseData::GetZ(), vtkImageViewer2_XYZ::SetXSlice(), vtkImageViewer2_XYZ::SetYSlice(), and vtkImageViewer2_XYZ::SetZSlice().

Referenced by ChangeAxisColor(), and wxMaracas_ViewerWidget::RefreshView().

00221 {
00222         //wxVtk2DBaseView::Refresh();
00223 
00224 
00225         //vtkImageViewer2 *IV2=_imageViewer2XYZ->GetVtkImageViewer2(); // JPRx
00226         //vtkCamera *camera = IV2->GetRenderer()->GetActiveCamera(); // JPRx
00227 
00228 
00229 
00230         int x1 = 0,x2 = 0,y1 = 0,y2 = 0,z1 = 0,z2 = 0, x = 0, y = 0, z = 0;
00231         double *spc = 0;
00232         double *origin = 0;
00233         
00234         
00235         //GetVtkmprbasedata()->GetDimensionExtention(&x1,&x2,&y1,&y2,&z1,&z2);
00236         
00237         
00238         vtkImageData* img = GetVtkmprbasedata()->GetImageData();
00239         if(img!=NULL){
00240                 origin = img->GetOrigin();
00241                 img->GetExtent(x1,x2,y1,y2,z1,z2);
00242                 spc = img->GetSpacing();
00243                 x1 += origin[0];
00244                 x2 += origin[0];
00245                 y1 += origin[1];
00246                 y2 += origin[1];
00247                 z1 += origin[2];
00248                 z2 += origin[2];
00249                 x1 = (int)(x1*spc[0]);
00250                 y1 = (int)(y1*spc[1]);
00251                 z1 = (int)(z1*spc[2]);
00252 
00253                 x2 = (int)(x2*spc[0]);
00254                 y2 = (int)(y2*spc[1]);
00255                 z2 = (int)(z2*spc[2]);
00256 
00257                 x = (int)(GetVtkmprbasedata()->GetX());
00258                 y = (int)(GetVtkmprbasedata()->GetY());
00259                 z = (int)(GetVtkmprbasedata()->GetZ());
00260 
00261                 x =  (int)(x*spc[0]);
00262                 y =  (int)(y*spc[1]);
00263                 z =  (int)(z*spc[2]);
00264 
00265                 if ((x!=_backX) || (y!=_backY) || (z!=_backZ)) {
00266 
00267                         if (_direction==0) {    // YZ 
00268                                 if(_imageViewer2XYZ)
00269                                         _imageViewer2XYZ->SetXSlice( (int)(GetVtkmprbasedata()->GetX()) ); 
00270                                 _ptsA->SetPoint(0, x2, y1  , z );
00271                                 _ptsA->SetPoint(1, x2, y2  , z );
00272                                 _ptsB->SetPoint(0, x2, y   , z1);
00273                                 _ptsB->SetPoint(1, x2, y   , z2);
00274                         }
00275                         if (_direction==1) {    // XZ
00276                                 if(_imageViewer2XYZ)
00277                                         _imageViewer2XYZ->SetYSlice( (int)(GetVtkmprbasedata()->GetY()) ); 
00278                             _ptsA->SetPoint(0, x1 , y2 , z );
00279                                 _ptsA->SetPoint(1, x2 , y2 , z );
00280                                 _ptsB->SetPoint(0, x  , y2 , z1);
00281                                 _ptsB->SetPoint(1, x  , y2 , z2);
00282                         }
00283                         if (_direction==2) {    // XY
00284                                 if(_imageViewer2XYZ)
00285                                         _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); 
00286                         //      _ptsA->SetPoint(0, x1 , y , -z2 );
00287                         //      _ptsA->SetPoint(1, x2 , y , -z2 );
00288                         //      _ptsB->SetPoint(0, x  , y1, -z2 );
00289                         //      _ptsB->SetPoint(1, x  , y2, -z2 );
00290                                 
00291                                 _ptsA->SetPoint(0, x1 , y , z2 );
00292                                 _ptsA->SetPoint(1, x2 , y , z2 );
00293                                 _ptsB->SetPoint(0, x  , y1, z2 );
00294                                 _ptsB->SetPoint(1, x  , y2, z2 );
00295                         }
00296                         _backX=x;
00297                         _backY=y;
00298                         _backZ=z;
00299                 }
00300                 wxVtkBaseView::Refresh();
00301         }
00302 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkBaseView::RefreshView (  )  [virtual, inherited]
void wxVtk2DBaseView::ResetView (  )  [virtual, inherited]

Definition at line 76 of file wxVtk2DBaseView.cxx.

References wxVtk2DBaseView::_imageViewer2XYZ, wxVtkBaseView::Configure(), vtkBaseData::GetImageData(), wxVtk2DBaseView::GetVtkBaseData(), vtkImageViewer2_XYZ::GetVtkImageViewer2(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), vtkInteractorStyleBaseView2D::New(), vtkInteractorStyleBaseView2D::SetInteractorScrollZ(), wxVtk2DBaseView::SetInteractorStyleImage(), and vtkInteractorStyleBaseView2D::SetInteractorWindowLevel().

Referenced by wxQuantificationWidgetCT::RefreshView().

00077 {
00078         double spx = 0,spy = 0,spz = 0;
00079         int x1 = 1,x2 = 1,y1 = 1,y2 = 1,z1 = 1,z2 = 1;
00080         wxVtkBaseView::Configure();
00081         
00082         wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
00083         vtkImageData *imageData = GetVtkBaseData()->GetImageData();
00084         if(imageData){
00085                 imageData->UpdateInformation();
00086                 imageData->SetUpdateExtent( imageData->GetWholeExtent());
00087                 imageData->Update();
00088                 _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
00089                 imageData->GetSpacing (spx,spy,spz);
00090                 imageData->GetExtent (x1,x2,y1,y2,z1,z2);
00091         }
00092 
00093         
00094         _imageViewer2XYZ -> SetExtentDimension(x1,x2,y1,y2,z1,z2);
00095         _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
00096 
00097         _imageViewer2XYZ->GetVtkImageViewer2()->Render();
00098 
00100         //RaC 04-2010 Look for the description of new changes in vtkInteractorStyleBaseView2D constructor.
00101         //
00102         // Previous version
00103         // SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
00104         //
00105         // Actual version
00106         vtkInteractorStyleBaseView2D *style2D = vtkInteractorStyleBaseView2D::New();
00107 
00108         manualInteractorWindowLevel *_manualinteractorwindowlevel= new manualInteractorWindowLevel();
00109         style2D->SetInteractorWindowLevel( _manualinteractorwindowlevel );
00110 
00111         vtkInteractorScrollZ *_vtkInteractorScrollZ = new vtkInteractorScrollZ();
00112         style2D->SetInteractorScrollZ(_vtkInteractorScrollZ);
00113 
00114         SetInteractorStyleImage( style2D );
00115 
00116         // RaC
00118         
00119 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkMPR2DView::SetActualSlice ( int  slice  )  [virtual]

Reimplemented from wxVtk2DBaseView.

Definition at line 322 of file wxVtkMPR2DView.cxx.

References _direction, GetVtkmprbasedata(), vtkMPRBaseData::SetX(), vtkMPRBaseData::SetY(), and vtkBaseData::SetZ().

00323 {
00324         if (_direction==0) 
00325         { 
00326                 GetVtkmprbasedata()->SetX(slice);
00327         }
00328         if (_direction==1) 
00329         { 
00330                 GetVtkmprbasedata()->SetY(slice);
00331         }
00332         if (_direction==2) 
00333         { 
00334                 GetVtkmprbasedata()->SetZ(slice);
00335         }
00336 }

Here is the call graph for this function:

void wxVtk2DBaseView::setColorLevel ( double  level  )  [inherited]

Definition at line 324 of file wxVtk2DBaseView.cxx.

References wxVtk2DBaseView::_imageViewer2XYZ, vtkImageViewer2_XYZ::GetVtkImageViewer2(), and wxVtk2DBaseView::Refresh().

Referenced by wxMaracas_ViewerWidget::setColorLevel().

00324                                                {
00325 //      _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel(level);
00326         vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel();
00327         imagemaptowindowlevel->SetLevel(level);
00328         this->Refresh();
00329 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtk2DBaseView::setColorTransferFunction ( vtkColorTransferFunction *  colortable  )  [inherited]

Definition at line 309 of file wxVtk2DBaseView.cxx.

References wxVtk2DBaseView::_imageViewer2XYZ, wxVtk2DBaseView::Refresh(), and vtkImageViewer2_XYZ::setColorTransferFunction().

Referenced by wxMaracas_ViewerWidget::setColorTransferFunction().

00309                                                                                   {
00310         if(_imageViewer2XYZ!=NULL){
00311                 _imageViewer2XYZ->setColorTransferFunction(colortable);
00312                 this->Refresh();
00313         }
00314 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkBaseView::SetInteractorStyleBaseView ( vtkInteractorStyleImage *  interactorStyle  )  [inherited]

Definition at line 173 of file wxVtkBaseView.cxx.

References wxVtkBaseView::_interactorStyle.

Referenced by wxVtk3DBaseView::Configure(), wxVtk2DView_TMP::Configure(), and wxVtk2DBaseView::SetInteractorStyleImage().

00174 {
00175         _interactorStyle = interactorStyle;
00176 }

Here is the caller graph for this function:

void wxVtk2DBaseView::SetInteractorStyleImage ( vtkInteractorStyleBaseView interactorstylebaseview  )  [inherited]

Definition at line 267 of file wxVtk2DBaseView.cxx.

References wxVtk2DBaseView::_imageViewer2XYZ, vtkImageViewer2_XYZ::GetVtkImageViewer2(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), vtkMaracasImageViewer2Callback::IV, vtkMaracasImageViewer2Callback::New(), wxVtkBaseView::SetInteractorStyleBaseView(), and vtkInteractorStyleBaseView::SetwxVtkBaseView().

Referenced by wxVtk2DBaseView::Configure(), vtkPlane2DView::Configure(), and wxVtk2DBaseView::ResetView().

00268 {
00269         SetInteractorStyleBaseView(interactorstylebaseview);
00270 
00271         wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
00272         interactorstylebaseview->SetInteractor ( iren );
00273         iren->SetInteractorStyle(interactorstylebaseview);
00274         interactorstylebaseview->SetwxVtkBaseView(this);        
00275 
00276         vtkMaracasImageViewer2Callback * cbk = vtkMaracasImageViewer2Callback::New();
00277         cbk->IV = _imageViewer2XYZ->GetVtkImageViewer2();
00278         interactorstylebaseview->AddObserver( vtkCommand::WindowLevelEvent, cbk );
00279         interactorstylebaseview->AddObserver( vtkCommand::StartWindowLevelEvent, cbk );
00280         interactorstylebaseview->AddObserver( vtkCommand::ResetWindowLevelEvent, cbk );
00281         cbk->Delete();
00282 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkMPR2DView::SetVisibleAxis ( bool  ok  ) 

Definition at line 200 of file wxVtkMPR2DView.cxx.

References wxVtk2DBaseView::_imageViewer2XYZ, _lineAActor, _lineBActor, _visibleAxis, and vtkImageViewer2_XYZ::GetVtkImageViewer2().

Referenced by wxMaracasSuperpositionPanel::SetVisibleAxis().

00201 {
00202         if (ok!=_visibleAxis)
00203         {
00204                 _visibleAxis=ok;
00205                 if (_visibleAxis==true)
00206                 {
00207                         _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
00208                         _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor );
00209                 }
00210                 if (_visibleAxis==false)
00211                 {
00212                         _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineAActor );
00213                         _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineBActor );
00214                 }
00215 
00216         }
00217 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtk2DBaseView::SetVtkBaseData ( vtkBaseData vtkbasedata  )  [inherited]
void wxVtk2DBaseView::setWindowLevel ( double  level  )  [inherited]

Definition at line 316 of file wxVtk2DBaseView.cxx.

References wxVtk2DBaseView::_imageViewer2XYZ, vtkImageViewer2_XYZ::GetVtkImageViewer2(), and wxVtk2DBaseView::Refresh().

Referenced by wxMaracas_ViewerWidget::setWindowLevel().

00316                                                 {
00317 //      _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow(level);  
00318 
00319         vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel();
00320         imagemaptowindowlevel->SetWindow(level);
00321         this->Refresh();
00322 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkBaseView::TransCoordScreenToWorld ( double &  X,
double &  Y,
double &  Z,
int  type = 2 
) [inherited]

Definition at line 92 of file wxVtkBaseView.cxx.

References wxVtkBaseView::GetRenderer().

Referenced by wxVtkBaseView::TransFromCoordScreenToWorld().

00093 {
00094         GetRenderer()->SetDisplayPoint((int)X, (int)Y, (int)Z);
00095         GetRenderer()->DisplayToWorld();
00096         double fP[4];
00097         GetRenderer()->GetWorldPoint( fP );
00098         if ( fP[3] ){
00099                 fP[0] /= fP[3];
00100                 fP[1] /= fP[3];
00101                 fP[2] /= fP[3];
00102         }
00103 
00104         if (type!=0)
00105         {
00106                 X=fP[0];
00107         }
00108         if (type!=1)
00109         {
00110                 Y=fP[1];
00111         }
00112         if (type!=2)
00113         {
00114                 Z=fP[2];
00115         } 
00116 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtk2DBaseView::TransformCoordinate_spacing_ModelToView ( double &  X,
double &  Y,
double &  Z 
) [virtual, inherited]

Definition at line 54 of file wxVtk2DBaseView.cxx.

References wxVtk2DBaseView::_imageViewer2XYZ, and vtkImageViewer2_XYZ::GetVtkImageViewer2().

00055 {
00056 //EEDx5
00057         double spc[3];
00058 //      GetVtkBaseData()->GetImageData()->GetSpacing(spc);
00059 //JCP 04/08/10  W/O Image this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc);
00060         vtkImageData* image = this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput();
00061         if(image){
00062                 image->GetSpacing(spc);
00063         }else{
00064                 spc[0] = 1;
00065                 spc[1] = 1;
00066                 spc[2] = 1;
00067         }
00068 //
00069         X=X*spc[0];
00070         Y=Y*spc[1];
00071         Z=Z*spc[2];
00072 
00073 }

Here is the call graph for this function:

void wxVtk2DBaseView::TransformCoordinate_spacing_ViewToModel ( double &  X,
double &  Y,
double &  Z 
) [virtual, inherited]

Definition at line 31 of file wxVtk2DBaseView.cxx.

References wxVtk2DBaseView::_imageViewer2XYZ, and vtkImageViewer2_XYZ::GetVtkImageViewer2().

Referenced by wxVtkBaseView::TransFromCoordScreenToWorld().

00032 {
00033 //EEDx5
00034         double spc[3];
00035 //      GetVtkBaseData()->GetImageData()->GetSpacing(spc);
00036 //JCP 04/08/10  W/O Image this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc);
00037         vtkImageData* image = this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput();
00038         if(image){
00039                 image->GetSpacing(spc);
00040         }else{
00041                 spc[0] = 1;
00042                 spc[1] = 1;
00043                 spc[2] = 1;
00044         }
00045         
00046 
00047         X = X / spc[0];
00048         Y = Y / spc[1];
00049         Z = Z / spc[2];
00050 
00051 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkMPR2DView::TransFromCoordScreenToWorld ( double &  X,
double &  Y,
double &  Z,
bool  keepNormalDirection = false,
int  type = 2 
) [virtual]

Reimplemented from wxVtkBaseView.

Definition at line 513 of file wxVtkMPR2DView.cxx.

References _direction, and wxVtk2DBaseView::GetVtkBaseData().

00514 {
00515                 
00516         wxVtkBaseView::TransFromCoordScreenToWorld(X,Y,Z,keepNormalDirection,_direction);
00517 
00518         if ((_direction==0) && (keepNormalDirection==true) )
00519         {
00520                 X = ((vtkMPRBaseData*)GetVtkBaseData())->GetX();
00521         }
00522         
00523         if ((_direction==1) && (keepNormalDirection==true) )
00524         {
00525                 Y = ((vtkMPRBaseData*)GetVtkBaseData())->GetY();
00526         }
00527         
00528         if ((_direction==2) && (keepNormalDirection==true) )
00529         {
00530                 Z = ((vtkMPRBaseData*)GetVtkBaseData())->GetZ();
00531         }
00532         
00533 }

Here is the call graph for this function:


Member Data Documentation

int wxVtkMPR2DView::_backX [private]

Definition at line 40 of file wxVtkMPR2DView.h.

Referenced by Refresh(), and wxVtkMPR2DView().

int wxVtkMPR2DView::_backY [private]

Definition at line 41 of file wxVtkMPR2DView.h.

Referenced by Refresh(), and wxVtkMPR2DView().

int wxVtkMPR2DView::_backZ [private]

Definition at line 42 of file wxVtkMPR2DView.h.

Referenced by Refresh(), and wxVtkMPR2DView().

Definition at line 56 of file wxVtkMPR2DView.h.

Referenced by Configure(), and wxVtkMPR2DView().

vtkActor* wxVtkMPR2DView::_lineAActor [private]
vtkPolyDataMapper* wxVtkMPR2DView::_lineAMapper [private]

Definition at line 49 of file wxVtkMPR2DView.h.

Referenced by Configure(), wxVtkMPR2DView(), and ~wxVtkMPR2DView().

vtkActor* wxVtkMPR2DView::_lineBActor [private]
vtkPolyDataMapper* wxVtkMPR2DView::_lineBMapper [private]

Definition at line 53 of file wxVtkMPR2DView.h.

Referenced by Configure(), wxVtkMPR2DView(), and ~wxVtkMPR2DView().

vtkPolyData* wxVtkMPR2DView::_pdA [private]

Definition at line 50 of file wxVtkMPR2DView.h.

Referenced by Configure(), wxVtkMPR2DView(), and ~wxVtkMPR2DView().

vtkPolyData* wxVtkMPR2DView::_pdB [private]

Definition at line 54 of file wxVtkMPR2DView.h.

Referenced by Configure(), wxVtkMPR2DView(), and ~wxVtkMPR2DView().

vtkPoints* wxVtkMPR2DView::_ptsA [private]

Definition at line 47 of file wxVtkMPR2DView.h.

Referenced by Configure(), Refresh(), wxVtkMPR2DView(), and ~wxVtkMPR2DView().

vtkPoints* wxVtkMPR2DView::_ptsB [private]

Definition at line 51 of file wxVtkMPR2DView.h.

Referenced by Configure(), Refresh(), wxVtkMPR2DView(), and ~wxVtkMPR2DView().

Definition at line 44 of file wxVtkMPR2DView.h.

Referenced by Configure(), and SetVisibleAxis().


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

Generated on 20 Oct 2010 for creaMaracasVisu_lib by  doxygen 1.6.1