wxImageViewerWidgetRoi Class Reference

#include <wxImageViewerWidget.h>

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

List of all members.

Public Member Functions

 wxImageViewerWidgetRoi (wxWindow *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxSUNKEN_BORDER, const wxString &name=wxPanelNameStr)
 ~wxImageViewerWidgetRoi ()
void GetROI (int extent[6])
virtual void ConstructVTK (vtkImageData *imageData)
void TransfromeCoordViewWorld (int &X, int &Y, int &Z)
bool GetRoiSelected ()
void ExecuteEvent1 (vtkObject *wdg, unsigned long event, void *calldata)
void ExecuteEvent2 (vtkObject *wdg, unsigned long event, void *calldata)
void SetImage (vtkImageData *imagedata)
void SetInterfaceVtkPanelWidgets (InterfaceVtkPanelWidgets *intVtkPanWid)
void SetState (int state)
void SetStateManualContour (int state)
void CreateNewManualContour ()
int GetNumberOfPointsSplineManualContour ()
double * GetVectorPointsXManualContour ()
double * GetVectorPointsYManualContour ()
void EraseManualContour ()
void SetZSlice (int z)
int GetZSlice ()
void Render ()
void AddObserver_1 ()
void AddObserver_2 ()

Protected Attributes

int _state
marZoomROIObserver_Observer
vtkInteractorStyle2DMaracas_interactorStyle2DMaracas
vtkImageViewer2 * _imageViewer
InterfaceVtkPanelWidgets_intVtkPanWid
wxVTKRenderWindowInteractorEditContour_wxVTKiren

Private Member Functions

virtual void ExecuteEvent (vtkObject *wdg, unsigned long event, void *calldata)

Private Attributes

bool _bboxEnabled
bool _sliceEnabled
bool _RoiSelected
vtkPoints * _pts
vtkActor * _bboxActor
vtkPolyDataMapper * _bboxMapper
vtkPolyData * _pd

Detailed Description

Definition at line 112 of file wxImageViewerWidget.h.


Constructor & Destructor Documentation

wxImageViewerWidgetRoi::wxImageViewerWidgetRoi ( wxWindow *  parent,
wxWindowID  id = -1,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxSUNKEN_BORDER,
const wxString &  name = wxPanelNameStr 
)

Definition at line 383 of file wxImageViewerWidget.cxx.

References _bboxEnabled, _RoiSelected, and _sliceEnabled.

00388                                                            :
00389                    wxImageViewerWidget( parent, id, pos, size, style, name )
00390 {
00391   _bboxEnabled  = false;
00392   _sliceEnabled = false;
00393   _RoiSelected  = false;
00394 }
//----------------------------------------------------------------------------

wxImageViewerWidgetRoi::~wxImageViewerWidgetRoi (  ) 

Definition at line 396 of file wxImageViewerWidget.cxx.

References _bboxActor, _bboxMapper, _pd, and _pts.

00397 {
00398     _pts                ->Delete();
00399     _bboxActor  ->Delete();
00400         _bboxMapper     ->Delete();
00401         _pd                     ->Delete();
00402 }


Member Function Documentation

void wxImageViewerWidget::AddObserver_1 (  )  [inherited]

Definition at line 248 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_Observer, and wxImageViewerWidget::_wxVTKiren.

Referenced by wxImageViewerWidget::ConstructVTK().

00248                                        {
00249 
00250   //wxVTKiren->AddObserver(vtkCommand::MiddleButtonPressEvent, _Observer);
00251   //use interactor style to override -for real- the default behavior
00252   _wxVTKiren->GetInteractorStyle()->AddObserver( vtkCommand::MiddleButtonPressEvent , _Observer);
00253   _wxVTKiren->AddObserver(vtkCommand::MouseMoveEvent, _Observer);
00254   //wxVTKiren->AddObserver(vtkCommand::MiddleButtonReleaseEvent, _Observer);
00255    _wxVTKiren->GetInteractorStyle()->AddObserver( vtkCommand::MiddleButtonReleaseEvent , _Observer);
00256 
00257   //EED  _wxVTKiren->AddObserver(vtkCommand::MouseWheelForwardEvent, _Observer);
00258   _wxVTKiren->AddObserver( wxEVT_MOUSEWHEEL+10000 , _Observer);
00259 
00260   //EED  _wxVTKiren->AddObserver(vtkCommand::MouseWheelBackwardEvent, _Observer);
00261   _wxVTKiren->AddObserver( wxEVT_MOUSEWHEEL+10001 , _Observer);
00262 
00263 }

Here is the caller graph for this function:

void wxImageViewerWidget::AddObserver_2 (  )  [inherited]

Definition at line 268 of file wxImageViewerWidget.cxx.

00268                                        {
00269 /*
00270 //  _wxVTKiren->AddObserver(vtkCommand::LeftButtonPressEvent    , _Observer);
00271 //  _wxVTKiren->AddObserver(vtkCommand::LeftButtonReleaseEvent, _Observer);
00272 
00273   _wxVTKiren->AddObserver(vtkCommand::MiddleButtonPressEvent    , _Observer);
00274   _wxVTKiren->AddObserver(vtkCommand::MiddleButtonReleaseEvent, _Observer);
00275 
00276 //      _wxVTKiren->AddObserver(vtkCommand::RightButtonPressEvent       , _Observer);
00277   _wxVTKiren->AddObserver(vtkCommand::MouseMoveEvent            , _Observer);
00278 */
00279 }

void wxImageViewerWidgetRoi::ConstructVTK ( vtkImageData *  imageData  )  [virtual]

Reimplemented from wxImageViewerWidget.

Definition at line 584 of file wxImageViewerWidget.cxx.

References _bboxActor, _bboxMapper, wxImageViewerWidget::_imageViewer, wxImageViewerWidget::_interactorStyle2DMaracas, wxImageViewerWidget::_Observer, _pd, _pts, and vtkInteractorStyle2DMaracas::SetObserver().

Referenced by wxMaracasImageBrowser::LoadData().

00584                                                                 {
00585 
00586   wxImageViewerWidget::ConstructVTK(imageData);
00587   _interactorStyle2DMaracas->SetObserver(_Observer);
00588 
00589   //Supporting data for callbacks
00590   _pts = vtkPoints::New();
00591   _pts->SetNumberOfPoints(4);
00592   _pts->SetPoint(0, -1000       , -1000 , -1000 );
00593   _pts->SetPoint(1,  1000       , -1000 ,     0 );
00594   _pts->SetPoint(2,  1000       ,  1000 ,  1000 );
00595   _pts->SetPoint(3, -1000       ,  1000 ,     0 );
00596 
00597 
00598   vtkCellArray *lines = vtkCellArray::New();
00599   lines->InsertNextCell(5);
00600   lines->InsertCellPoint(0);
00601   lines->InsertCellPoint(1);
00602   lines->InsertCellPoint(2);
00603   lines->InsertCellPoint(3);
00604   lines->InsertCellPoint(0);
00605 
00606   _pd = vtkPolyData::New();
00607   _pd->SetPoints( _pts );
00608   _pd->SetLines( lines );
00609   lines->Delete();  //do not delete lines ??
00610 
00611 
00612         _bboxActor                                              =       vtkActor::New();
00613     _bboxMapper                                         =       vtkPolyDataMapper::New();
00614 
00615         _bboxMapper->SetInput(_pd);
00616         _bboxMapper->ImmediateModeRenderingOn();
00617         _bboxActor->SetMapper(_bboxMapper);
00618         _bboxActor->GetProperty()->BackfaceCullingOn();
00619         _bboxActor->GetProperty()->SetDiffuseColor(1,0,0);
00620         _bboxActor->GetProperty()->SetLineWidth(2);
00621 
00622     _imageViewer->GetRenderer()->AddActor( _bboxActor );
00623 //      _imageViewer->Render( );
00624 
00625 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxImageViewerWidget::CreateNewManualContour (  )  [inherited]

Definition at line 236 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_manContControl, wxImageViewerWidget::_mViewContour, manualContourBaseControler::CreateNewManualContour(), manualViewBaseContour::Refresh(), and InteractorStyleMaracas::SetActive().

Referenced by wxQuantificationWidget::SetManualContour_2DWorld().

00236                                                 {
00237         _manContControl->CreateNewManualContour();
00238         _manContControl->SetActive(true);
00239         _mViewContour->Refresh();
00240         Refresh();
00241 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxImageViewerWidget::EraseManualContour (  )  [inherited]

Definition at line 243 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_manContControl, and manualContourBaseControler::DeleteContour().

Referenced by wxQuantificationWidget::SetManualContour_2DWorld().

00243                                             {
00244         _manContControl->DeleteContour();
00245 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxImageViewerWidgetRoi::ExecuteEvent ( vtkObject *  wdg,
unsigned long  event,
void *  calldata 
) [private, virtual]

Reimplemented from wxImageViewerWidget.

Definition at line 462 of file wxImageViewerWidget.cxx.

References _bboxActor, _bboxEnabled, wxImageViewerWidget::_imageViewer, wxImageViewerWidget::_intVtkPanWid, _pts, _RoiSelected, wxImageViewerWidget::_wxVTKiren, InterfaceVtkPanelWidgets::CallBackOnMouseWheel(), min, and TransfromeCoordViewWorld().

00463 {
00464   int X, Y, Z=0;
00465   int XX,YY,ZZ;
00466   int slice = _imageViewer->GetZSlice();
00467   int min,max; 
00468   min = _imageViewer->GetWholeZMin();
00469   max = _imageViewer->GetWholeZMax();
00470 
00471 // EED Borrame  if ( event == vtkCommand::MiddleButtonPressEvent ) {
00472   if ( event == vtkCommand::LeftButtonPressEvent ) {
00473 //       Dans l'absolu il faudrait 2 modes, un par defaut celui de imageViewer2 qui semble pas mal
00474 //        et un deuxieme pour la manipulation exclusive du polydata 2D...
00475 
00476 //      if( wxVTKiren->GetShiftKey () )
00477       {
00478         //def StartZoom(obj, event):
00479         _wxVTKiren->GetEventPosition( X, Y );
00480                 XX=X; YY=Y; ZZ=Z;
00481                 TransfromeCoordViewWorld(XX,YY,ZZ);
00482         _pts->SetPoint(0, XX, YY, ZZ);
00483         _pts->SetPoint(1, XX, YY, ZZ);
00484         _pts->SetPoint(2, XX, YY, ZZ);
00485         _pts->SetPoint(3, XX, YY, ZZ);
00486 
00487          _bboxEnabled = true;
00488          _bboxActor->VisibilityOn();
00489 
00490          _imageViewer->Render();
00491       }
00492   } else if ( event == vtkCommand::MouseMoveEvent ){
00493       if ( _bboxEnabled ){
00494                 _RoiSelected=true;
00495         double p0[3];
00496         _pts->GetPoint(0, p0);
00497         _wxVTKiren->GetEventPosition(X, Y);
00498                 XX=X; YY=Y; ZZ=Z;
00499                 TransfromeCoordViewWorld(XX,YY,ZZ);
00500         _pts->SetPoint(1, XX    , p0[1] , p0[2]);
00501         _pts->SetPoint(2, XX    , YY    , p0[2]);
00502         _pts->SetPoint(3, p0[0] , YY    , p0[2]);
00503         _imageViewer->Render();
00504       }
00505     }
00506   if ( event == vtkCommand::LeftButtonReleaseEvent ){
00507        _bboxEnabled = false;
00508     //EED} else if ( event == vtkCommand::MouseWheelForwardEvent ){
00509     } else if ( event == wxEVT_MOUSEWHEEL+10000 ){
00510       
00511 //        mouse wheel:
00512 //          * if no ctrl or shift is press then 5 slices are done
00513 //          * if ctrl is press ->               10 slices are done
00514 //          * if shirt id press ->              1 slice is done
00515 
00516             if( _wxVTKiren->GetControlKey () ){
00517           slice += 10;
00518         } else if( _wxVTKiren->GetShiftKey () ) {
00519           slice++;
00520         } else {
00521           //neither ctrl nor shift has been pressed:
00522           slice += 5;
00523         }
00524 
00525         slice = slice > min ? slice : min;
00526         slice = slice < max ? slice : max;
00527 
00528 #if (VTK_MAJOR_VERSION >= 5)
00529                 _imageViewer->SetSlice( slice );
00530 #else
00531                 _imageViewer->SetZSlice( slice );
00532 #endif
00533 
00534 
00535         //This is not nedeed any more since vtkImageViewer2.cxx -r1.9
00536         //imageViewer->GetRenderer()->ResetCameraClippingRange();
00537 
00538                 wxMouseEvent mouseEvent;
00539                 mouseEvent.m_wheelRotation=130;
00540                 if (_intVtkPanWid!=NULL) { 
00541                         _intVtkPanWid->CallBackOnMouseWheel(mouseEvent);
00542                 }
00543         _imageViewer->Render();
00544 
00545     //EED } else if ( event == vtkCommand::MouseWheelBackwardEvent ){
00546     } else if ( event == wxEVT_MOUSEWHEEL+10001 ){
00547 
00548 //      _sliceEnabled = false;
00549         if( _wxVTKiren->GetControlKey () ){
00550           slice -= 10;
00551         } else if( _wxVTKiren->GetShiftKey () ) {
00552           slice--;
00553         } else {
00554           //neither ctrl nor shift has been pressed:
00555           slice -= 5;
00556                   slice = (slice /5) * 5;
00557         }
00558 
00559         slice = slice > min ? slice : min;
00560         slice = slice < max ? slice : max;
00561 
00562 
00563 #if (VTK_MAJOR_VERSION >= 5)
00564                 _imageViewer->SetSlice( slice );
00565 #else
00566                 _imageViewer->SetZSlice( slice );
00567 #endif
00568 
00569 
00570         //This is not nedeed any more since vtkImageViewer2.cxx -r1.9
00571         //imageViewer->GetRenderer()->ResetCameraClippingRange();
00572 
00573                 wxMouseEvent mouseEvent;
00574                 mouseEvent.m_wheelRotation=-130;
00575                 if (_intVtkPanWid!=NULL) { 
00576                         _intVtkPanWid->CallBackOnMouseWheel(mouseEvent);
00577                 }
00578         _imageViewer->Render();
00579 
00580     }
00581 
00582 }

Here is the call graph for this function:

void wxImageViewerWidget::ExecuteEvent1 ( vtkObject *  wdg,
unsigned long  event,
void *  calldata 
) [inherited]

Definition at line 290 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_intVtkPanWid, and InterfaceVtkPanelWidgets::CallBackOnMouseWheel().

Referenced by wxImageViewerWidget::ExecuteEvent().

00290                                                                                           {
00291 
00292         if ( event == vtkCommand::MiddleButtonPressEvent ){
00293         }else if ( event == vtkCommand::MouseMoveEvent ){
00294         }
00295 
00296         if ( event == vtkCommand::MiddleButtonReleaseEvent ){
00297                 //EED } else if ( event == vtkCommand::MouseWheelForwardEvent ){
00298         } else if ( event == wxEVT_MOUSEWHEEL+10000 ){
00299                         wxMouseEvent mouseEvent;
00300                         mouseEvent.m_wheelRotation=130;
00301                         if (_intVtkPanWid!=NULL) { _intVtkPanWid->CallBackOnMouseWheel(mouseEvent);}
00302                 //EED }else if ( event == vtkCommand::MouseWheelBackwardEvent ){
00303         }else if ( event == wxEVT_MOUSEWHEEL+10001 ){
00304                         wxMouseEvent mouseEvent;
00305                         mouseEvent.m_wheelRotation=-130;
00306                         if (_intVtkPanWid!=NULL) { _intVtkPanWid->CallBackOnMouseWheel(mouseEvent);}
00307         }
00308 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxImageViewerWidget::ExecuteEvent2 ( vtkObject *  wdg,
unsigned long  event,
void *  calldata 
) [inherited]

Definition at line 312 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_manContControl, wxImageViewerWidget::_wxVTKiren, manualContourBaseControler::DeleteActualMousePoint(), manualContourControler::MouseClickLeft(), manualContourBaseControler::MouseClickRight(), manualContourControler::MouseDLeft(), manualContourControler::MouseMove(), and manualContourBaseControler::MouseReleaseLeft().

Referenced by wxImageViewerWidget::ExecuteEvent().

00312                                                                                           {
00313         int X,Y;
00314         _wxVTKiren->GetEventPosition(X, Y);
00315         if (event==wxEVT_LEFT_DOWN ){
00316                 _manContControl->MouseClickLeft(X,Y);
00317         }
00318 
00319         if (event==wxEVT_RIGHT_DOWN ){
00320                 _manContControl->MouseClickRight(X,Y);
00321         }
00322 
00323         if (event==wxEVT_LEFT_UP){
00324                 _manContControl->MouseReleaseLeft(X,Y);
00325         }
00326 
00327         if (event==wxEVT_LEFT_DCLICK){
00328                 _manContControl->MouseDLeft(X,Y);
00329         }
00330 
00331         if (event==wxEVT_MOTION){
00332                 _manContControl->MouseMove(X,Y);
00333         }
00334 
00335         if (event==WXK_CLEAR){
00336                 _manContControl->DeleteActualMousePoint(X,Y);
00337         }
00338 }

Here is the call graph for this function:

Here is the caller graph for this function:

int wxImageViewerWidget::GetNumberOfPointsSplineManualContour (  )  [inherited]

Definition at line 348 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_manContControl, and manualContourBaseControler::GetNumberOfPointsSplineManualContour().

Referenced by wxQuantificationWidget::SetManualContour_ReplaceContour().

00348                                                              {
00349         return _manContControl->GetNumberOfPointsSplineManualContour();
00350 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxImageViewerWidgetRoi::GetROI ( int  extent[6]  ) 

Definition at line 404 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_imageViewer, and _pts.

Referenced by wxMaracasImageBrowser::GetROI().

00405 {
00406   //retrieve a point
00407   double P[3];
00408   double Q[3];
00409   _pts->GetPoint(0, P);
00410   _pts->GetPoint(2, Q);
00411   if (P[0]<Q[0]) { extent[0]=(int)(P[0]); extent[1]=(int)(Q[0]); } else { extent[0]=(int)(Q[0]); extent[1]=(int)(P[0]); }
00412   if (P[1]<Q[1]) { extent[2]=(int)(P[1]); extent[3]=(int)(Q[1]); } else { extent[2]=(int)(Q[1]); extent[3]=(int)(P[1]); }
00413   //In case the user selects outside of the image but still in the render window
00414   int border[6];
00415   _imageViewer->GetInput()->GetExtent( border );
00416 
00417   if (extent[0] < border[0]) extent[0]=border[0];
00418   if (extent[1] > border[1]) extent[1]=border[1];
00419   if (extent[2] < border[2]) extent[2]=border[2];
00420   if (extent[3] > border[3]) extent[3]=border[3];
00421   extent[4] = border[4];
00422   extent[5] = border[5];
00423 
00424   //grrrrr do not forget about image with spacing <> 1 !!
00425   double spacing[3];
00426   _imageViewer->GetInput()->GetSpacing( spacing );
00427   extent[0] = (int)( extent[0]/spacing[0] );
00428   extent[1] = (int)( extent[1]/spacing[0] );
00429   extent[2] = (int)( extent[2]/spacing[1] );
00430   extent[3] = (int)( extent[3]/spacing[1] );
00431 //  extent[4] /= spacing[2];
00432 //  extent[5] /= spacing[2];
00433 
00434   //Now we should take care of the difficult cases:
00435   //1. The user forgot to select a region, or want the whole region
00436   //2. The user only click one point (-> extent ~ x,x,y,y !!)
00437 
00438   if(extent[1]<=extent[0] || extent[3]<=extent[2]){
00439     extent[0] = border[0];
00440     extent[1] = border[1];
00441     extent[2] = border[2];
00442     extent[3] = border[3];
00443   }
00444 }

Here is the caller graph for this function:

bool wxImageViewerWidgetRoi::GetRoiSelected (  ) 

Definition at line 628 of file wxImageViewerWidget.cxx.

References _RoiSelected.

00628                                            {
00629         return _RoiSelected;
00630 }

double * wxImageViewerWidget::GetVectorPointsXManualContour (  )  [inherited]

Definition at line 352 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_manContControl, and manualContourBaseControler::GetVectorPointsXManualContour().

Referenced by wxQuantificationWidget::SetManualContour_ReplaceContour().

00352                                                           {
00353         return _manContControl->GetVectorPointsXManualContour();
00354 }

Here is the call graph for this function:

Here is the caller graph for this function:

double * wxImageViewerWidget::GetVectorPointsYManualContour (  )  [inherited]

Definition at line 356 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_manContControl, and manualContourBaseControler::GetVectorPointsYManualContour().

Referenced by wxQuantificationWidget::SetManualContour_ReplaceContour().

00356                                                           {
00357         return _manContControl->GetVectorPointsYManualContour();
00358 }

Here is the call graph for this function:

Here is the caller graph for this function:

int wxImageViewerWidget::GetZSlice (  )  [inherited]

Definition at line 369 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_imageViewer.

00369                                   {
00370         return _imageViewer->GetZSlice();
00371 }

void wxImageViewerWidget::Render (  )  [inherited]

Definition at line 373 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_imageViewer.

Referenced by wxQuantificationWidget::SetManualContour_2DWorld().

00373                                 {
00374         _imageViewer->Render();
00375 }

Here is the caller graph for this function:

void wxImageViewerWidget::SetImage ( vtkImageData *  imagedata  )  [inherited]

Definition at line 342 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_imageViewer.

Referenced by wxQuantificationWidget::RefreshAxis().

00342                                                          {
00343   _imageViewer->SetInput(imagedata);
00344   _imageViewer->Render( );
00345 }

Here is the caller graph for this function:

void wxImageViewerWidget::SetInterfaceVtkPanelWidgets ( InterfaceVtkPanelWidgets intVtkPanWid  )  [inline, inherited]

Definition at line 78 of file wxImageViewerWidget.h.

References wxImageViewerWidget::_intVtkPanWid.

00078 { _intVtkPanWid = intVtkPanWid; };

void wxImageViewerWidget::SetState ( int  state  )  [inherited]

Definition at line 227 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_state, wxImageViewerWidget::_wxVTKiren, and wxVTKRenderWindowInteractorEditContour::SetState().

Referenced by wxImageViewerWidget::ConstructVTK(), and wxQuantificationWidget::SetManualContour_2DWorld().

00227                                            {
00228         _state=state;
00229         _wxVTKiren->SetState(state);
00230 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxImageViewerWidget::SetStateManualContour ( int  state  )  [inherited]
void wxImageViewerWidget::SetZSlice ( int  z  )  [inherited]

Definition at line 360 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_imageViewer.

00360                                         {
00361 #if (VTK_MAJOR_VERSION >= 5)
00362                 _imageViewer->SetSlice( z );
00363 #else
00364                 _imageViewer->SetZSlice( z );
00365 #endif
00366 
00367 }

void wxImageViewerWidgetRoi::TransfromeCoordViewWorld ( int &  X,
int &  Y,
int &  Z 
)

Definition at line 446 of file wxImageViewerWidget.cxx.

References wxImageViewerWidget::_imageViewer.

Referenced by ExecuteEvent().

00447 {
00448         _imageViewer->GetRenderer()->SetDisplayPoint(X, Y, Z);
00449         _imageViewer->GetRenderer()->DisplayToWorld();
00450         double fP[4];
00451         _imageViewer->GetRenderer()->GetWorldPoint( fP );
00452         if ( fP[3] ){
00453                 fP[0] /= fP[3];
00454                 fP[1] /= fP[3];
00455                 fP[2] /= fP[3];
00456         }
00457         X=(int)(fP[0]);
00458         Y=(int)(fP[1]);
00459         Z=(int)(fP[2]);
00460 }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 134 of file wxImageViewerWidget.h.

Referenced by ConstructVTK(), ExecuteEvent(), and ~wxImageViewerWidgetRoi().

Definition at line 130 of file wxImageViewerWidget.h.

Referenced by ExecuteEvent(), and wxImageViewerWidgetRoi().

vtkPolyDataMapper* wxImageViewerWidgetRoi::_bboxMapper [private]

Definition at line 135 of file wxImageViewerWidget.h.

Referenced by ConstructVTK(), and ~wxImageViewerWidgetRoi().

vtkImageViewer2* wxImageViewerWidget::_imageViewer [protected, inherited]

Definition at line 98 of file wxImageViewerWidget.h.

Referenced by ConstructVTK(), and wxImageViewerWidget::ConstructVTK().

vtkPolyData* wxImageViewerWidgetRoi::_pd [private]

Definition at line 136 of file wxImageViewerWidget.h.

Referenced by ConstructVTK(), and ~wxImageViewerWidgetRoi().

vtkPoints* wxImageViewerWidgetRoi::_pts [private]

Definition at line 133 of file wxImageViewerWidget.h.

Referenced by ConstructVTK(), ExecuteEvent(), GetROI(), and ~wxImageViewerWidgetRoi().

Definition at line 132 of file wxImageViewerWidget.h.

Referenced by ExecuteEvent(), GetRoiSelected(), and wxImageViewerWidgetRoi().

Definition at line 131 of file wxImageViewerWidget.h.

Referenced by wxImageViewerWidgetRoi().

int wxImageViewerWidget::_state [protected, inherited]

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

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1