ContourVOIWidget Class Reference

#include <ContourVOIWidget.h>

Collaboration diagram for ContourVOIWidget:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ContourVOIWidget (wxWindow *parent, wxVtkBaseView *wxvtkbaseview, vtkImageData *imagedata)
 ~ContourVOIWidget ()
void ConfigureVTK ()
wxVtkBaseViewGetWxVtkBaseView ()
void GetVOI (int voi[6])

Private Attributes

mBarRangembarrange
vtkImageData * imagedata
wxVtkBaseViewwxvtkbaseview
manualRoiControler_manRoiControl
manualContourModel_mContourModel
manualViewRoi_mViewRoi


Detailed Description

Definition at line 56 of file ContourVOIWidget.h.


Constructor & Destructor Documentation

ContourVOIWidget::ContourVOIWidget ( wxWindow *  parent,
wxVtkBaseView wxvtkbaseview,
vtkImageData *  imagedata 
)

Definition at line 71 of file ContourVOIWidget.cxx.

References mbarrange.

00072     : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
00073   {
00074 //EED    this->mbbtkContourCrown        = contourcrown;
00075     this->imagedata                                     = imagedata;
00076         this->wxvtkbaseview                             = wxvtkbaseview;
00077         wxPanel *panel                                  = this;
00078     wxSizer *sizer                                      = NULL;
00079         
00080         mbarrange = new mBarRange(panel,200, 65); 
00081         mbarrange -> SetOrientation( true );
00082         mbarrange -> setActiveStateTo(true);
00083         mbarrange -> setVisibleLabels( true );
00084         mbarrange -> setDeviceEndMargin(10);
00085         mbarrange -> setRepresentedValues( 0 , 100 );
00086         mbarrange -> setDeviceBlitStart(10,10); 
00087         mbarrange -> setIfWithActualDrawed( true );
00088         mbarrange -> SetStart( 10 );
00089         mbarrange -> SetEnd( 90 );  
00090 
00091         //wxWidgetSliderMinMaxVOI * eventHandler = new wxWidgetSliderMinMaxVOI(this, mbarrange); // JPRx
00092 
00093         wxFlexGridSizer *sizer1 = new wxFlexGridSizer(10);
00094         sizer1->AddGrowableCol(0);
00095         sizer1->Add(mbarrange,1,wxGROW);
00096         sizer = sizer1;
00097         panel -> SetSizer(sizer);
00098 
00099     panel       ->      SetAutoLayout(true);
00100     panel       ->      Layout();  
00101   }

ContourVOIWidget::~ContourVOIWidget (  ) 

Definition at line 105 of file ContourVOIWidget.cxx.

00106   {
00107   }


Member Function Documentation

void ContourVOIWidget::ConfigureVTK (  ) 

Definition at line 119 of file ContourVOIWidget.cxx.

References _manRoiControl, _mContourModel, _mViewRoi, manualContourBaseControler::CreateNewManualContour(), imagedata, mbarrange, manualViewRoi::RefreshContour(), InteractorStyleMaracas::SetActive(), manualViewBaseContour::SetModel(), manualContourBaseControler::SetModelView(), manualViewBaseContour::SetRange(), manualViewBaseContour::SetSpacing(), manualViewBaseContour::SetWxVtkBaseView(), and manualViewBaseContour::SetZ().

00120   {
00121           double spc[3];
00122           this->imagedata->GetSpacing(spc);
00123 
00124           // LG 14 dec 2007
00125           int dim[3];
00126           this->imagedata->GetDimensions(dim);
00127           mbarrange -> setRepresentedValues( 0 , dim[2] );
00128         
00129         // Rectangulo
00130         _manRoiControl  = new manualRoiControler();
00131         _mContourModel  = new manualContourModelRoi();
00132         _mViewRoi               = new manualViewRoi();
00133         _mViewRoi->SetModel( _mContourModel );
00134         _mViewRoi->SetWxVtkBaseView( this->wxvtkbaseview );
00135         _mViewRoi->SetRange( 2 );
00136         _mViewRoi->SetZ( 1000 );
00137 
00138 //EED 3 oct 2006
00139         _mViewRoi->SetSpacing(spc);
00140 
00141         _manRoiControl->SetModelView( _mContourModel , _mViewRoi );
00142         ((vtkInteractorStyleBaseView*)this->wxvtkbaseview->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manRoiControl );
00143         _manRoiControl->CreateNewManualContour();
00144         _manRoiControl->SetActive(true);
00145         _mViewRoi->RefreshContour();
00146 
00147 
00148   }

Here is the call graph for this function:

wxVtkBaseView * ContourVOIWidget::GetWxVtkBaseView (  ) 

Definition at line 110 of file ContourVOIWidget.cxx.

References wxvtkbaseview.

Referenced by wxWidgetSliderMinMaxVOI::onActualChange_Bar(), wxWidgetSliderMinMaxVOI::onEndChange_Bar(), and wxWidgetSliderMinMaxVOI::onStartChange_Bar().

00111         {
00112                 return this->wxvtkbaseview;
00113         }

Here is the caller graph for this function:

void ContourVOIWidget::GetVOI ( int  voi[6]  ) 

Definition at line 151 of file ContourVOIWidget.cxx.

References _mViewRoi, mBarRange::GetEnd(), vtkBaseData::GetImageData(), manualViewRoi::GetMinMax(), mBarRange::GetStart(), wxVtk2DBaseView::GetVtkBaseData(), mbarrange, and wxvtkbaseview.

00152 {
00153         double minX,minY,maxX,maxY;
00154         _mViewRoi->GetMinMax(minX,minY,maxX,maxY);
00155         voi[0]=(int)minX;
00156         voi[1]=(int)maxX;
00157         voi[2]=(int)minY;
00158         voi[3]=(int)maxY;
00159 
00160         voi[4] =  mbarrange->GetStart();
00161         voi[5] =  mbarrange->GetEnd();
00162 
00163         int border[6];
00164         wxVtk2DBaseView *wxvtk2dbaseview = (wxVtk2DBaseView*)wxvtkbaseview;
00165         wxvtk2dbaseview->GetVtkBaseData()->GetImageData()->GetExtent( border );
00166 
00167         if ( (voi[0]==voi[1]) || (voi[2]==voi[3]) || (voi[4]==voi[5]) )
00168         {
00169                         voi[0] = border[0];
00170                         voi[1] = border[1];
00171                         voi[2] = border[2];
00172                         voi[3] = border[3];
00173                         voi[4] = border[4];
00174                         voi[5] = border[5];
00175         }
00176 
00177         // border min
00178         if (voi[0]<border[0]) { voi[0]=border[0]; }
00179         if (voi[2]<border[2]) { voi[2]=border[2]; }
00180         if (voi[4]<border[4]) { voi[4]=border[4]; }
00181 
00182         // border max
00183         if (voi[1]>border[1]) { voi[1]=border[1]; }
00184         if (voi[3]>border[3]) { voi[3]=border[3]; }
00185         if (voi[5]>border[5]) { voi[5]=border[5]; }
00186 }

Here is the call graph for this function:


Member Data Documentation

mBarRange* ContourVOIWidget::mbarrange [private]

Definition at line 68 of file ContourVOIWidget.h.

Referenced by ConfigureVTK(), ContourVOIWidget(), and GetVOI().

vtkImageData* ContourVOIWidget::imagedata [private]

Definition at line 70 of file ContourVOIWidget.h.

Referenced by ConfigureVTK().

wxVtkBaseView* ContourVOIWidget::wxvtkbaseview [private]

Definition at line 71 of file ContourVOIWidget.h.

Referenced by GetVOI(), and GetWxVtkBaseView().

manualRoiControler* ContourVOIWidget::_manRoiControl [private]

Definition at line 73 of file ContourVOIWidget.h.

Referenced by ConfigureVTK().

manualContourModel* ContourVOIWidget::_mContourModel [private]

Definition at line 74 of file ContourVOIWidget.h.

Referenced by ConfigureVTK().

manualViewRoi* ContourVOIWidget::_mViewRoi [private]

Definition at line 75 of file ContourVOIWidget.h.

Referenced by ConfigureVTK(), and GetVOI().


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