wxSphereView Class Reference

#include <wxSphereView.h>

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

List of all members.

Public Member Functions

 wxSphereView (wxWindow *parent, vtkMPRBaseData *vtkmprbasedata, vtkImageData *imageData)
 ~wxSphereView ()
virtual void Configure ()
void RotationEnd ()
void RotationStart (double vx, double vy, bool ok_v, bool ok_ang)
virtual void RefreshView ()
virtual void SetVoxel (double i, double j, int delta, double id, unsigned short gris)
void SetDeltaVoxel (int delta)
double GetRadio ()
void SetRadio (double radio)
int GetIdOfImage (double radio)
void SetXYZtoParent (double i, double j)
void RefreshPoint ()
virtual void Configure (bool okimage=true)
vtkBaseDataGetVtkBaseData ()
void SetVtkBaseData (vtkBaseData *vtkbasedata)
virtual void Refresh ()
virtual void ResetView ()
virtual int GetActualSlice ()
virtual void SetActualSlice (int slice)
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 TransFromCoordScreenToWorld (double &X, double &Y, double &Z, bool keepNormalDirection=false, int type=2)
void SetInteractorStyleBaseView (vtkInteractorStyleImage *interactorStyle)
vtkInteractorStyleImage * GetInteractorStyleBaseView ()

Public Attributes

vtkImageViewer2_XYZ_imageViewer2XYZ

Private Member Functions

void FiltreImage (int id, double radio)
void FiltreImageB (int id, double radio, bool ok, int deltaTMP)
void DefineImageSphere ()
void ResetlstId ()
void InitSphere (double points[4][3])
double SphereFindCenter (double P[4][3], double cc[3])
double determinant (double a[4][4], int n)
void GetPointSphere (double p[3], double r1, double angA, double angB)
void RotatePointOverTheSphere (double pp[3], double p[3], double cc[3])
void TransferePoints (double pp1[3], double pp2[3], double AngX, double AngY, vtkImageData *image)

Private Attributes

std::vector< idAlBeRa * > _lstId
int _centerX
int _centerY
int _centerZ
double _radio
double _ang
double _vxb
double _vyb
int _delta
vtkImageData * _imageDataOriginal
vtkImageData * _imageSphere
vtkMPRBaseData_vtkmprbasedata
vtkInteractorStyleSphere_vtkinteractorstylesphere
vtkTransform * _transform
vtkTransform * _transform1
vtkTransform * _transform2

Detailed Description

Definition at line 11 of file wxSphereView.h.


Constructor & Destructor Documentation

wxSphereView::wxSphereView ( wxWindow *  parent,
vtkMPRBaseData vtkmprbasedata,
vtkImageData *  imageData 
)

Definition at line 4 of file wxSphereView.cxx.

References _delta, _imageDataOriginal, _imageSphere, _radio, _transform, _transform1, _transform2, _vtkmprbasedata, vtkBaseData::SetMarImageData(), and wxVtk2DBaseView::SetVtkBaseData().

00005 : wxVtk2DBaseView(parent)
00006 {
00007         _delta                          =       1;
00008         _vtkmprbasedata         =       vtkmprbasedata;
00009         _imageDataOriginal      =       imageData;
00010 
00011         _imageSphere            =       vtkImageData::New();
00012         _imageSphere->SetDimensions (150,150,500);
00013         _imageSphere->SetScalarTypeToUnsignedShort();
00014         _imageSphere->AllocateScalars();   
00015         _imageSphere->Update();   
00016 
00017 
00018         vtkBaseData *vtkbasedata = new vtkBaseData();
00019         vtkbasedata->SetMarImageData( new marImageData(_imageSphere) );
00020         this->SetVtkBaseData(vtkbasedata);
00021 
00022     _transform                  =       vtkTransform::New();
00023     _transform1                 =       vtkTransform::New();
00024     _transform2                 =       vtkTransform::New();
00025         _transform ->Identity();
00026         _transform1->Identity();
00027         _transform2->Identity();
00028 
00029         _radio=25;
00030 }

Here is the call graph for this function:

wxSphereView::~wxSphereView (  ) 

Definition at line 34 of file wxSphereView.cxx.

References _transform, _transform1, _transform2, and ResetlstId().

00035 {
00036         _transform  -> Delete();
00037         _transform1 -> Delete();
00038         _transform2 -> Delete();
00039         ResetlstId();
00040 }

Here is the call graph for this function:


Member Function Documentation

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

Definition at line 84 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(), wxVtk2DBaseView::SetInteractorStyleImage(), vtkInfoTextImage::SetMarImageData(), vtkInfoTextImageInteractor::SetModelVtkInfoTextImage(), and vtkInfoTextImage::SetWxVtk2DBaseView().

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

00085 {
00086         double spx,spy,spz;
00087         int x1,x2,y1,y2,z1,z2;
00088         wxVtkBaseView::Configure();
00089 
00090 // EED 17 Oct 2007
00091         if (_imageViewer2XYZ==NULL)
00092         {
00093                 _imageViewer2XYZ = new vtkImageViewer2_XYZ();
00094                 wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
00095                 _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
00096                 SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
00097         }
00098 
00099 
00100         vtkImageData *imageData = GetVtkBaseData()->GetMarImageData()->GetImageData();
00101         if (imageData!=NULL){
00102                 imageData->UpdateInformation();
00103                 imageData->SetUpdateExtent( imageData->GetWholeExtent());
00104                 imageData->Update();
00105                 if (okimage==true){
00106                         imageData->GetSpacing (spx,spy,spz);
00107                         imageData->GetExtent (x1,x2,y1,y2,z1,z2);
00108 
00109 
00110                         _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
00111                         _imageViewer2XYZ->SetExtentDimension(x1,x2,y1,y2,z1,z2);
00112                         double range[2];
00113                           imageData->GetScalarRange(range);
00114                           if (range[1]<20000){
00115                                  _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow( (range[1]-range[0])/2 );
00116                                  _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel( (range[1]+range[0])/4 );
00117                           } else {
00118                                  _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow( 1000 );
00119                                  _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel( 500 );
00120                           }
00121 // EED 31 Janvier 2007
00122 //vtkImageActor *vtkimageactor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor ();
00123 //vtkimageactor->InterpolateOff ();
00124 //vtkLookupTable * _collookup = vtkLookupTable::New( );
00125 //_collookup->SetNumberOfColors( 256 );
00126 //_collookup->SetTableRange( 0 , 255 );
00127 //_collookup->Build( );
00128 //_collookup->SetTableValue( 0  , 1 , 0 , 0 , 1 );
00129 //_collookup->SetTableValue(128 , 0 , 0 , 1 , 1 );
00130 //_collookup->SetTableValue(255 , 0 , 1 , 0 , 1 );
00131 //_imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel ()->SetLookupTable(_collookup );
00132 
00133 
00134 // EED 17 Oct 2007
00135 //                      SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
00136 
00137 
00138                         vtkImageViewer2 *IV2=_imageViewer2XYZ->GetVtkImageViewer2();
00139                         vtkCamera *camera = IV2->GetRenderer()->GetActiveCamera();
00140 
00141 //EED 17Avril2009       
00142 /*                      
00143                         camera->SetViewUp               ( spx*0                 , -spy*1                        , spz*0         );
00144                         camera->SetPosition             ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , -spz*10000    ); 
00145                         camera->SetFocalPoint   ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0         ); 
00146 */ 
00147                         camera->SetViewUp               ( spx*0                 , spy*1                 , spz*0         );
00148                         camera->SetPosition             ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*10000     ); 
00149                         camera->SetFocalPoint   ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0         ); 
00150                         
00151                         
00152                         camera->SetClippingRange( 0.01                  , 1000000 );
00153                         camera->ComputeViewPlaneNormal();
00154                         camera->SetParallelScale( spx*(x2-x1)/3.0 );
00155                         
00156                         // text information over the graphic window
00157                         if(_vtkIinfoTextImage == NULL){
00158                                 _vtkIinfoTextImage              = new vtkInfoTextImage();
00159                                 _vtkIinfoTextImageInteractor    = new vtkInfoTextImageInteractor();                             
00160                                 ((vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView())->AddInteractorStyleMaracas(_vtkIinfoTextImageInteractor);
00161                         }
00162                         _vtkIinfoTextImage->SetWxVtk2DBaseView(this);
00163                         _vtkIinfoTextImage->SetMarImageData( GetVtkBaseData()->GetMarImageData() );
00164                         _vtkIinfoTextImageInteractor->SetModelVtkInfoTextImage(_vtkIinfoTextImage);                             
00165                         _vtkIinfoTextImage->Configure();
00166                         
00167                 } // okimage
00168         } // imageData
00169 
00170 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSphereView::Configure (  )  [virtual]

Reimplemented from wxVtkBaseView.

Definition at line 62 of file wxSphereView.cxx.

References _vtkinteractorstylesphere, DefineImageSphere(), wxVtkBaseView::GetInteractorStyleBaseView(), and InitSphere().

00063 {
00064         wxVtk2DBaseView::Configure();
00065 
00066         _vtkinteractorstylesphere = new vtkInteractorStyleSphere();
00067         ((vtkInteractorStyleBaseView*)GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _vtkinteractorstylesphere );
00068         double points[4][3];
00069 
00070 // EED purify 12/sep/2006
00071         int i,j;
00072         for (i=0;i<4;i++)
00073         {
00074                 for (j=0;j<3;j++)
00075                 {
00076                         points[i][j]=0;
00077                 }
00078         }
00079 
00080         InitSphere(points);
00081         DefineImageSphere();
00082 }

Here is the call graph for this function:

void wxSphereView::DefineImageSphere (  )  [private]

Definition at line 267 of file wxSphereView.cxx.

References _radio, GetIdOfImage(), wxVtk2DBaseView::GetVtkBaseData(), and vtkBaseData::SetZ().

Referenced by Configure(), and RefreshView().

00268 {
00269         int id;
00270         id=GetIdOfImage( _radio );
00271         GetVtkBaseData()->SetZ( id );
00272 }

Here is the call graph for this function:

Here is the caller graph for this function:

double wxSphereView::determinant ( double  a[4][4],
int  n 
) [private]

Definition at line 677 of file wxSphereView.cxx.

Referenced by SphereFindCenter().

00678 {
00679     int i, j, j1, j2;
00680     double d;
00681         double m[4][4];
00682 
00683         for (i=0;i<4;i++)
00684         {
00685                 for (j=0;j<4;j++)
00686                 {
00687                         m[i][j]=0;
00688                 }
00689         }
00690 
00691     if (n == 2)                                // terminate recursion
00692     {
00693         d = a[0][0]*a[1][1] - a[1][0]*a[0][1];
00694     }
00695     else 
00696     {
00697         d = 0;
00698         for (j1 = 0; j1 < n; j1++ )            // do each column
00699         {
00700             for (i = 1; i < n; i++)            // create minor
00701             {
00702                 j2 = 0;
00703                 for (j = 0; j < n; j++)
00704                 {
00705                     if (j == j1) continue;
00706                     m[i-1][j2] = a[i][j];
00707                     j2++;
00708                 }
00709             }
00710             
00711             // sum (+/-)cofactor * minor  
00712             d = d + pow(-1.0, j1)*a[0][j1]*determinant( m, n-1 );
00713         }
00714     }
00715 
00716     return d;
00717 }

Here is the caller graph for this function:

void wxSphereView::FiltreImage ( int  id,
double  radio 
) [private]

Definition at line 430 of file wxSphereView.cxx.

References _delta, _transform, _transform1, _transform2, and FiltreImageB().

Referenced by GetIdOfImage().

00431 {
00432 
00433         _transform -> Identity();
00434         _transform -> Concatenate(_transform1);
00435         _transform -> Concatenate(_transform2);
00436 
00437         FiltreImageB(id,radio,false, _delta);
00438         FiltreImageB(id,radio,true, 1);
00439 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSphereView::FiltreImageB ( int  id,
double  radio,
bool  ok,
int  deltaTMP 
) [private]

Definition at line 349 of file wxSphereView.cxx.

References _centerX, _centerY, _centerZ, _imageDataOriginal, _imageSphere, RotatePointOverTheSphere(), and SetVoxel().

Referenced by FiltreImage().

00350 {       
00351         double factor = 0.75;
00352         double radioB   = radio/3;
00353         double radio2   = radio*radio;
00354         double pxx,pyy,d2x,d2y;
00355         double cc[3],p[3],pp[3];
00356         cc[0]=_centerX;
00357         cc[1]=_centerY;
00358         cc[2]=_centerZ;
00359         double aa;
00360         unsigned short *pOrig;
00361         int dimRes[3],dimOrig[3];
00362         double i,j;
00363         int ext[6];
00364         _imageSphere->GetExtent(ext);
00365         _imageSphere->GetDimensions(dimRes);
00366         //JCP 24 - 04 -09
00367         //_imageSphere->SetExtent(0,dimRes[0]-1,0,dimRes[1]-1,0,dimRes[2]-1);
00368         _imageSphere->SetExtent(ext);
00369         //JCP 24 - 04 -09
00370         d2x=dimRes[0]/2;
00371         d2y=dimRes[1]/2;
00372 //      double deltaTMP=_delta;
00373         _imageDataOriginal->GetDimensions(dimOrig);
00374 
00375         int start,end;
00376         int limitA,limitB;
00377         limitA  = (int) ( (-radioB/factor)+d2x );
00378         limitB  = (int) ( (radioB/factor)+d2x );
00379         if (ok==true){
00380                 start   = limitA;
00381                 end             = limitB;
00382         } else {
00383                 start=0;
00384                 end=dimRes[0];
00385         }
00386 
00387         for ( i=start ; i<end ; i=i+deltaTMP )
00388         {
00389                 p[0]  = (i - d2x)*factor;
00390                 pxx=p[0]*p[0];
00391                 for (j=start;j<end;j=j+deltaTMP)
00392                 {
00393                         p[1]  = (j - d2y)*factor;
00394                         pyy=p[1]*p[1];
00395                         aa = pxx + pyy;
00396 
00397                         if  (( ((ok==false) && (!((i>limitA) && (i<limitB) && (j>limitA) && (j<limitB)))) )
00398                                     ||
00399                                         (ok==true))
00400                         {
00401                                 if (radio2>aa){
00402                                         aa=radio2-aa;
00403                                         p[2]  = sqrt(aa);
00404                                         RotatePointOverTheSphere( pp, p,cc);
00405                                         if ( (pp[0]>=0) && (pp[0]<dimOrig[0]) && 
00406                                                  (pp[1]>=0) && (pp[1]<dimOrig[1]) && 
00407                                                  (pp[2]>=0) && (pp[2]<dimOrig[2]) )
00408                                         {
00409                                                 pOrig=(unsigned short*)_imageDataOriginal->GetScalarPointer( (int)(pp[0]) , (int)(pp[1]) , (int)(pp[2]) ); 
00410                                                 SetVoxel(i,j,deltaTMP,id,*pOrig);
00411                                         } else {
00412                                                 SetVoxel(i,j,deltaTMP,id,2000);
00413                                         }
00414                                 } else {
00415                                         SetVoxel(i,j,deltaTMP,id,0);
00416                                 }
00417                         }
00418                 }
00419         }
00420 
00421         _imageSphere->Modified();  
00422         _imageSphere->Update();
00423 }

Here is the call graph for this function:

Here is the caller graph for this function:

int wxVtk2DBaseView::GetActualSlice (  )  [virtual, inherited]

Reimplemented in vtkPlane2DView, and wxVtkMPR2DView.

Definition at line 174 of file wxVtk2DBaseView.cxx.

References wxVtk2DBaseView::_vtkbasedata, and vtkBaseData::GetZ().

00175 {
00176    return (int)(_vtkbasedata->GetZ());
00177 }

Here is the call graph for this function:

int wxSphereView::GetIdOfImage ( double  radio  ) 

Definition at line 231 of file wxSphereView.cxx.

References _delta, _imageSphere, _lstId, _radio, and FiltreImage().

Referenced by DefineImageSphere(), and vtkInteractorStyleSphere::OnRightButtonUp().

00232 {
00233         int id=0;
00234         int dim[3];     
00235         _imageSphere->GetDimensions(dim);       
00236         int sizeMaxList = dim[2];
00237         // Search in list >> alpha beta radio
00238         int i,size=_lstId.size();
00239         for (i=0; i<size;i++)
00240         {
00241                 //idAlBeRa *tmp=_lstId[i]; // JPRx
00242                 if ((_lstId[i]->_radio==radio) && (_lstId[i]->_deltavoxel==_delta)) 
00243                 {
00244                         return _lstId[i]->_id;
00245                 }
00246         }
00247         if (size>sizeMaxList)
00248         {
00249                 delete _lstId[size-1];
00250                 _lstId.pop_back(); 
00251         }
00252         if (size!=0){
00253                 id=_lstId[0]->_id+1;
00254                 id = id % sizeMaxList;
00255         } else {
00256                 id = 0;
00257         }
00258 
00259         FiltreImage(id,radio);
00260         _lstId.insert(_lstId.begin(),1,new idAlBeRa(id,radio,_delta) ); 
00261 
00262         return id;
00263 }

Here is the call graph for this function:

Here is the caller graph for this function:

vtkInteractorStyleImage * wxVtkBaseView::GetInteractorStyleBaseView (  )  [inherited]
void wxSphereView::GetPointSphere ( double  p[3],
double  r1,
double  angA,
double  angB 
) [private]

Definition at line 146 of file wxSphereView.cxx.

00147 {
00148         double in[3],out[3];
00149         in[0]=0;   
00150         in[1]=r1;   
00151         in[2]=0;
00152         vtkTransform *transform = vtkTransform::New();
00153         transform->Identity();
00154         transform->RotateX(angB);
00155         transform->RotateZ(angA);
00156         transform->TransformPoint(in,out);
00157         p[0]=out[0];
00158         p[1]=out[1];
00159         p[2]=out[2];
00160         transform->Delete(); 
00161 }

double wxSphereView::GetRadio (  ) 

Definition at line 44 of file wxSphereView.cxx.

References _radio.

Referenced by vtkInteractorStyleSphere::OnRightButtonDown(), and vtkInteractorStyleSphere::OnRightButtonUp().

00045 {
00046         return _radio;
00047 }

Here is the caller graph for this function:

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

Reimplemented from wxVtkBaseView.

Definition at line 229 of file wxVtk2DBaseView.cxx.

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

Referenced by vtkInfoTextImage::Create_Text_Label().

00230 {
00231    return _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer();
00232 }

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 234 of file wxVtk2DBaseView.cxx.

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

Referenced by wxMaracasSuperpositionPanel::Refresh().

00235 {
00236    return _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderWindow();
00237 }

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 241 of file wxVtk2DBaseView.cxx.

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

00242 {
00243    vtkImageData *imageData      = GetVtkBaseData()->GetImageData();
00244    imageData->GetSpacing(spc);
00245 }

Here is the call graph for this function:

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

Reimplemented in wxVtk2DView_TMP.

Definition at line 38 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(), 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().

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

void wxSphereView::InitSphere ( double  points[4][3]  )  [private]

Definition at line 583 of file wxSphereView.cxx.

References _centerX, _centerY, _centerZ, _imageDataOriginal, and SphereFindCenter().

Referenced by Configure().

00584 {
00585         double cc[3];
00586     double r = SphereFindCenter(points,cc); // 4-points , center
00587     if (r > 0)
00588     {
00589         _centerX        = (int)(cc[0]);
00590         _centerY        = (int)(cc[1]);
00591         _centerZ        = (int)(cc[2]);
00592     } else {
00593                 int dim[3];
00594                 _imageDataOriginal->GetDimensions(dim);
00595         _centerX        = (int)(dim[0]/2);
00596         _centerY        = (int)(dim[1]/2);
00597         _centerZ        = (int)(dim[2]/2);
00598         }
00599 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtk2DBaseView::Refresh (  )  [virtual, inherited]
void wxSphereView::RefreshPoint (  ) 

Definition at line 86 of file wxSphereView.cxx.

References _centerX, _centerY, _centerZ, _radio, _transform1, _vtkmprbasedata, vtkMPRBaseData::GetX(), vtkMPRBaseData::GetY(), vtkBaseData::GetZ(), and RefreshView().

00087 {
00088         double x        = _vtkmprbasedata->GetX() - _centerX;
00089         double y        = _vtkmprbasedata->GetY() - _centerY;
00090         double z        = _vtkmprbasedata->GetZ() - _centerZ;
00091         double alpha= atan2(x,z);
00092         double beta = atan2( y , sqrt(z*z+x*x) );
00093 
00094         alpha           = alpha*180/3.1416;
00095         beta            = beta*180/3.1416;
00096 
00097         _transform1->Identity();
00098         _transform1->RotateY(alpha);
00099         _transform1->RotateX(-beta);
00100 
00101         _radio= sqrt(x*x + y*y +z*z);
00102 
00103         RefreshView();
00104 }

Here is the call graph for this function:

void wxSphereView::RefreshView (  )  [virtual]

Reimplemented from wxVtkBaseView.

Definition at line 108 of file wxSphereView.cxx.

References DefineImageSphere(), and wxVtk2DBaseView::Refresh().

Referenced by vtkInteractorStyleSphere::OnLeftButtonUp(), vtkInteractorStyleSphere::OnMouseMove(), vtkInteractorStyleSphere::OnRightButtonUp(), and RefreshPoint().

00109 {
00110         DefineImageSphere();
00111         wxVtk2DBaseView::Refresh();
00112 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSphereView::ResetlstId (  )  [private]

Definition at line 219 of file wxSphereView.cxx.

References _lstId.

Referenced by RotationEnd(), RotationStart(), and ~wxSphereView().

00220 {
00221         int i,size=_lstId.size();
00222         for (i=size-1;i>=0;i--)
00223         {
00224                 delete _lstId[i];
00225         }
00226         _lstId.clear();
00227 }

Here is the caller graph for this function:

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

Definition at line 59 of file wxVtk2DBaseView.cxx.

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

Referenced by wxQuantificationWidgetCT::RefreshView().

00060 {
00061         double spx,spy,spz;
00062         int x1,x2,y1,y2,z1,z2;
00063         wxVtkBaseView::Configure();
00064         
00065         wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
00066         vtkImageData *imageData = GetVtkBaseData()->GetImageData();
00067         imageData->UpdateInformation();
00068         imageData->SetUpdateExtent( imageData->GetWholeExtent());
00069         imageData->Update();
00070 
00071         _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
00072         imageData->GetSpacing (spx,spy,spz);
00073         imageData->GetExtent (x1,x2,y1,y2,z1,z2);
00074         _imageViewer2XYZ -> SetExtentDimension(x1,x2,y1,y2,z1,z2);
00075         _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
00076 
00077         _imageViewer2XYZ->GetVtkImageViewer2()->Render();
00078         SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
00079         
00080 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSphereView::RotatePointOverTheSphere ( double  pp[3],
double  p[3],
double  cc[3] 
) [private]

Definition at line 165 of file wxSphereView.cxx.

References _transform.

Referenced by FiltreImageB(), and SetXYZtoParent().

00166 {
00167 
00168         double out[3];
00169         _transform->TransformPoint(p,out);
00170         pp[0] = out[0] + cc[0];
00171         pp[1] = out[1] + cc[1];
00172         pp[2] = out[2] + cc[2];
00173 
00174 }

Here is the caller graph for this function:

void wxSphereView::RotationEnd (  ) 

Definition at line 116 of file wxSphereView.cxx.

References _ang, _transform1, _transform2, _vxb, _vyb, ResetlstId(), and SetDeltaVoxel().

Referenced by vtkInteractorStyleSphere::OnLeftButtonUp().

00117 {
00118         _transform1->RotateWXYZ(_ang,_vxb,_vyb,0);
00119         _transform2->Identity();
00120         SetDeltaVoxel(1);
00121         ResetlstId();
00122 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSphereView::RotationStart ( double  vx,
double  vy,
bool  ok_v,
bool  ok_ang 
)

Definition at line 126 of file wxSphereView.cxx.

References _ang, _transform2, _vxb, _vyb, ResetlstId(), and SetDeltaVoxel().

Referenced by vtkInteractorStyleSphere::OnMouseMove().

00127 {
00128         if (ok_ang==false)
00129         {
00130                 _ang = -sqrt( vx*vx + vy*vy ) / 1.0;
00131         }
00132 
00133         if (ok_v==false){
00134                 _vxb=-vy;
00135                 _vyb=vx;
00136         }
00137 
00138         _transform2->Identity();
00139         _transform2->RotateWXYZ(_ang,_vxb,_vyb,0);
00140         SetDeltaVoxel(3);
00141         ResetlstId();
00142 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtk2DBaseView::SetActualSlice ( int  slice  )  [virtual, inherited]

Reimplemented in vtkPlane2DView, and wxVtkMPR2DView.

Definition at line 180 of file wxVtk2DBaseView.cxx.

References wxVtk2DBaseView::_vtkbasedata, and vtkBaseData::SetZ().

Referenced by wxQuantificationWidgetCT::RefreshView().

00181 {
00182    _vtkbasedata->SetZ(slice);
00183 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 262 of file wxVtk2DBaseView.cxx.

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

Referenced by wxMaracas_ViewerWidget::setColorLevel().

00262                                                {
00263 //      _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel(level);
00264         vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel();
00265         imagemaptowindowlevel->SetLevel(level);
00266         this->Refresh();
00267 }

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 247 of file wxVtk2DBaseView.cxx.

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

Referenced by wxMaracas_ViewerWidget::setColorTransferFunction().

00247                                                                                   {
00248         if(_imageViewer2XYZ!=NULL){
00249                 _imageViewer2XYZ->setColorTransferFunction(colortable);
00250                 this->Refresh();
00251         }
00252 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSphereView::SetDeltaVoxel ( int  delta  ) 

Definition at line 276 of file wxSphereView.cxx.

References _delta.

Referenced by vtkInteractorStyleSphere::OnMouseMove(), vtkInteractorStyleSphere::OnRightButtonUp(), RotationEnd(), and RotationStart().

00277 {
00278         _delta=delta;
00279 }

Here is the caller graph for this function:

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

Definition at line 142 of file wxVtkBaseView.cxx.

References wxVtkBaseView::_interactorStyle.

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

00143 {
00144         _interactorStyle = interactorStyle;
00145 }

Here is the caller graph for this function:

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

Definition at line 211 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().

00212 {
00213         SetInteractorStyleBaseView(interactorstylebaseview);
00214 
00215         wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
00216         interactorstylebaseview->SetInteractor ( iren );
00217         iren->SetInteractorStyle(interactorstylebaseview);
00218         interactorstylebaseview->SetwxVtkBaseView(this);        
00219 
00220         vtkMaracasImageViewer2Callback * cbk = vtkMaracasImageViewer2Callback::New();
00221         cbk->IV = _imageViewer2XYZ->GetVtkImageViewer2();
00222         interactorstylebaseview->AddObserver( vtkCommand::WindowLevelEvent, cbk );
00223         interactorstylebaseview->AddObserver( vtkCommand::StartWindowLevelEvent, cbk );
00224         interactorstylebaseview->AddObserver( vtkCommand::ResetWindowLevelEvent, cbk );
00225         cbk->Delete();
00226 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSphereView::SetRadio ( double  radio  ) 

Definition at line 51 of file wxSphereView.cxx.

References _radio.

Referenced by vtkInteractorStyleSphere::OnMouseMove().

00052 {
00053         if (radio<0)
00054         {
00055                 radio=0;
00056         }
00057         _radio=radio;
00058 }

Here is the caller graph for this function:

void wxSphereView::SetVoxel ( double  i,
double  j,
int  delta,
double  id,
unsigned short  gris 
) [virtual]

Definition at line 282 of file wxSphereView.cxx.

References _imageSphere.

Referenced by FiltreImageB().

00283 {
00284         int ii,jj,delta2;
00285         unsigned short *pRes;
00286         int dimRes[3];
00287         _imageSphere->GetDimensions(dimRes);
00288 
00289         delta2=delta-1;
00290         for ( ii=(int)(i-delta2) ; ii<=(int)(i+delta2) ; ii++ )
00291         {
00292                 for ( jj=(int)(j-delta2) ; jj<=(int)(j+delta2) ; jj++ )
00293                 {
00294                         if ( (ii>=0)&&(ii<dimRes[0]) &&  
00295                                  (jj>=0)&&(jj<dimRes[1]) )
00296                         {
00297                                 pRes = (unsigned short*)_imageSphere->GetScalarPointer( ii , jj , (int)id );
00298                                 *pRes=gris;
00299                         }
00300                 }
00301         }
00302 
00303 }

Here is the caller graph for this function:

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

Definition at line 254 of file wxVtk2DBaseView.cxx.

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

Referenced by wxMaracas_ViewerWidget::setWindowLevel().

00254                                                 {
00255 //      _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow(level);  
00256 
00257         vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel();
00258         imagemaptowindowlevel->SetWindow(level);
00259         this->Refresh();
00260 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSphereView::SetXYZtoParent ( double  i,
double  j 
)

Definition at line 307 of file wxSphereView.cxx.

References _centerX, _centerY, _centerZ, _imageDataOriginal, _imageSphere, _radio, _vtkmprbasedata, RotatePointOverTheSphere(), vtkMPRBaseData::SetX(), vtkMPRBaseData::SetY(), and vtkBaseData::SetZ().

Referenced by vtkInteractorStyleSphere::OnLeftButtonUp().

00308 {
00309 
00310         double factor = 0.75;
00311         double radio2   = _radio*_radio;
00312         double pxx,pyy,d2x,d2y;
00313         double cc[3],p[3],pp[3];
00314         cc[0]=_centerX;
00315         cc[1]=_centerY;
00316         cc[2]=_centerZ;
00317         double aa;
00318         int dimRes[3],dimOrig[3];
00319         _imageSphere->GetDimensions(dimRes);
00320         d2x=dimRes[0]/2;
00321         d2y=dimRes[1]/2;
00322         _imageDataOriginal->GetDimensions(dimOrig);
00323 
00324         p[0]  = (i - d2x)*factor;
00325         pxx=p[0]*p[0];
00326         p[1]  = (j - d2y)*factor;
00327         pyy=p[1]*p[1];
00328         aa = pxx + pyy;
00329         if (radio2>aa){
00330                 aa=radio2-aa;
00331                 p[2]  = sqrt(aa);
00332                 RotatePointOverTheSphere( pp, p,cc);
00333                 if ( (pp[0]>=0) && (pp[0]<dimOrig[0]) && 
00334                          (pp[1]>=0) && (pp[1]<dimOrig[1]) && 
00335                          (pp[2]>=0) && (pp[2]<dimOrig[2]) )
00336                 {
00337                         if (_vtkmprbasedata){
00338                                 _vtkmprbasedata->SetX(pp[0]);
00339                                 _vtkmprbasedata->SetY(pp[1]);
00340                                 _vtkmprbasedata->SetZ(pp[2]);
00341                         }
00342                 }
00343         }
00344 }

Here is the call graph for this function:

Here is the caller graph for this function:

double wxSphereView::SphereFindCenter ( double  P[4][3],
double  cc[3] 
) [private]

Definition at line 606 of file wxSphereView.cxx.

References determinant().

Referenced by InitSphere().

00607 {
00608     int i;
00609     double r, m11, m12, m13, m14, m15;
00610         double a[4][4];
00611 
00612     for (i = 0; i < 4; i++)                    // find minor 11
00613     {
00614         a[i][0] = P[i][0];
00615         a[i][1] = P[i][1];
00616         a[i][2] = P[i][2];
00617         a[i][3] = 1;
00618     }
00619     m11 = determinant( a, 4 );
00620 
00621     for (i = 0; i < 4; i++)                    // find minor 12 
00622     {
00623         a[i][0] = P[i][0]*P[i][0] + P[i][1]*P[i][1] + P[i][2]*P[i][2];
00624         a[i][1] = P[i][1];
00625         a[i][2] = P[i][2];
00626         a[i][3] = 1;
00627     }
00628     m12 = determinant( a, 4 );
00629 
00630     for (i = 0; i < 4; i++)                    // find minor 13
00631     {
00632         a[i][0] = P[i][0]*P[i][0] + P[i][1]*P[i][1] + P[i][2]*P[i][2];
00633         a[i][1] = P[i][0];
00634         a[i][2] = P[i][2];
00635         a[i][3] = 1;
00636     }
00637     m13 = determinant( a, 4 );
00638 
00639     for (i = 0; i < 4; i++)                    // find minor 14
00640     {
00641         a[i][0] = P[i][0]*P[i][0] + P[i][1]*P[i][1] + P[i][2]*P[i][2];
00642         a[i][1] = P[i][0];
00643         a[i][2] = P[i][1];
00644         a[i][3] = 1;
00645     }
00646     m14 = determinant( a, 4 );
00647 
00648 
00649     for (i = 0; i < 4; i++)                    // find minor 15
00650     {
00651         a[i][0] = P[i][0]*P[i][0] + P[i][1]*P[i][1] + P[i][2]*P[i][2];
00652         a[i][1] = P[i][0];
00653         a[i][2] = P[i][1];
00654         a[i][3] = P[i][2];
00655     }
00656     m15 = determinant( a, 4 );
00657 
00658     if (m11 == 0)
00659     {
00660         r = 0;
00661     }
00662     else
00663     {
00664                 // center of sphere
00665         cc[0] =  0.5*m12/m11;   //cx                  
00666         cc[1] = -0.5*m13/m11;   //cy
00667         cc[2] =  0.5*m14/m11;   //cz
00668                 // Sphere radio 
00669         r  = sqrt( cc[0]*cc[0] + cc[1]*cc[1] + cc[2]*cc[2] - m15/m11 );
00670     }
00671 
00672     return r;                                  // the radius
00673 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxSphereView::TransferePoints ( double  pp1[3],
double  pp2[3],
double  AngX,
double  AngY,
vtkImageData *  image 
) [private]

Definition at line 178 of file wxSphereView.cxx.

References _imageDataOriginal.

00179 {
00180         double t;
00181         double difX = pp2[0]-pp1[0];
00182         double difY = pp2[1]-pp1[1];
00183         double difZ = pp2[2]-pp1[2];
00184 
00185         double  max             = 200;
00186 
00187         int dimOrg[3];
00188         int dimRes[3];
00189         int z;
00190         _imageDataOriginal->GetDimensions(dimOrg);              
00191         image->GetDimensions(dimRes);           
00192 
00193         int i;
00194         double x1=pp1[0];
00195         double y1=pp1[1];
00196         double z1=pp1[2];
00197         int xx=-1,yy=-1,zz=-1;
00198 
00199         for (i=0;i<max;i++)
00200         {
00201                 t  = i/max;
00202                 xx = (int) (x1+t*difX);
00203                 yy = (int) (y1+t*difY);
00204                 zz = (int) (z1+t*difZ);
00205 
00206                 z=i;
00207                 if ((xx>=0) && (xx<dimOrg[0]) && (yy>=0) && (yy<dimOrg[1]) && (zz>=0) && (zz<dimOrg[2]) &&
00208                         (AngX>=0) && (AngX<dimRes[0]) && (AngY>=0) && (AngY<dimRes[1]) && (z>=0) && (z<dimRes[2]) )
00209                 {
00210                         unsigned short *pOrg=(unsigned short*)_imageDataOriginal->GetScalarPointer (xx,yy,zz); 
00211                         unsigned short *pRes=(unsigned short*)image->GetScalarPointer( (int)AngX , (int)AngY , z ); 
00212                         *pRes=*pOrg;
00213                 }
00214         }
00215 }

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

Definition at line 45 of file wxVtk2DBaseView.cxx.

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

00046 {
00047 //EEDx5
00048         double spc[3];
00049 //      GetVtkBaseData()->GetImageData()->GetSpacing(spc);
00050         this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc);
00051 
00052         X=X*spc[0];
00053         Y=Y*spc[1];
00054         Z=Z*spc[2];
00055 
00056 }

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         this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc);
00037 
00038         X = X / spc[0];
00039         Y = Y / spc[1];
00040         Z = Z / spc[2];
00041 
00042 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented in wxVtkMPR2DView.

Definition at line 94 of file wxVtkBaseView.cxx.

References wxVtkBaseView::GetInteractorStyleBaseView(), wxVtkBaseView::GetRenderer(), vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), and wxVtk2DBaseView::TransformCoordinate_spacing_ViewToModel().

Referenced by manualViewPerpPlaneContour::ifTouchContour(), vtkInfoTextImageInteractor::OnMouseMove(), manualViewBaseContour::TransfromCoordViewWorld(), and vtkPlane2DView::TransfromCoordViewWorld2().

00095 {  
00096         GetRenderer()->SetDisplayPoint((int)X, (int)Y, (int)Z);
00097         GetRenderer()->DisplayToWorld();
00098         double fP[4];
00099         GetRenderer()->GetWorldPoint( fP );
00100         if ( fP[3] ){
00101                 fP[0] /= fP[3];
00102                 fP[1] /= fP[3];
00103                 fP[2] /= fP[3];
00104         }
00105 
00106 // EEDx5
00107         //JCP 13/05/2009
00108         vtkInteractorStyleBaseView* interactorstyle = (vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView();
00109         wxVtk2DBaseView* baseview = (wxVtk2DBaseView*)interactorstyle->GetWxVtk2DBaseView();
00110         baseview->TransformCoordinate_spacing_ViewToModel( fP[0] , fP[1] , fP[2] );
00111         //JCP 13/05/2009
00112 
00113         if (type!=0)
00114         {
00115                 X=fP[0];
00116         }
00117         if (type!=1)
00118         {
00119                 Y=fP[1];
00120         }
00121         if (type!=2)
00122         {
00123                 Z=fP[2];
00124         } 
00125 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

double wxSphereView::_ang [private]

Definition at line 36 of file wxSphereView.h.

Referenced by RotationEnd(), and RotationStart().

int wxSphereView::_centerX [private]

Definition at line 31 of file wxSphereView.h.

Referenced by FiltreImageB(), InitSphere(), RefreshPoint(), and SetXYZtoParent().

int wxSphereView::_centerY [private]

Definition at line 32 of file wxSphereView.h.

Referenced by FiltreImageB(), InitSphere(), RefreshPoint(), and SetXYZtoParent().

int wxSphereView::_centerZ [private]

Definition at line 33 of file wxSphereView.h.

Referenced by FiltreImageB(), InitSphere(), RefreshPoint(), and SetXYZtoParent().

int wxSphereView::_delta [private]

Definition at line 40 of file wxSphereView.h.

Referenced by FiltreImage(), GetIdOfImage(), SetDeltaVoxel(), and wxSphereView().

vtkImageData* wxSphereView::_imageDataOriginal [private]
vtkImageData* wxSphereView::_imageSphere [private]

Definition at line 43 of file wxSphereView.h.

Referenced by FiltreImageB(), GetIdOfImage(), SetVoxel(), SetXYZtoParent(), and wxSphereView().

std::vector<idAlBeRa*> wxSphereView::_lstId [private]

Definition at line 29 of file wxSphereView.h.

Referenced by GetIdOfImage(), and ResetlstId().

double wxSphereView::_radio [private]
vtkTransform* wxSphereView::_transform [private]

Definition at line 48 of file wxSphereView.h.

Referenced by FiltreImage(), RotatePointOverTheSphere(), wxSphereView(), and ~wxSphereView().

vtkTransform* wxSphereView::_transform1 [private]

Definition at line 49 of file wxSphereView.h.

Referenced by FiltreImage(), RefreshPoint(), RotationEnd(), wxSphereView(), and ~wxSphereView().

vtkTransform* wxSphereView::_transform2 [private]

Definition at line 50 of file wxSphereView.h.

Referenced by FiltreImage(), RotationEnd(), RotationStart(), wxSphereView(), and ~wxSphereView().

Definition at line 46 of file wxSphereView.h.

Referenced by Configure().

Definition at line 45 of file wxSphereView.h.

Referenced by RefreshPoint(), SetXYZtoParent(), and wxSphereView().

double wxSphereView::_vxb [private]

Definition at line 37 of file wxSphereView.h.

Referenced by RotationEnd(), and RotationStart().

double wxSphereView::_vyb [private]

Definition at line 38 of file wxSphereView.h.

Referenced by RotationEnd(), and RotationStart().


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

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1