creaContours_lib
wxContourViewPanel Class Reference

#include <wxContourViewPanel.h>

Inheritance diagram for wxContourViewPanel:
Collaboration diagram for wxContourViewPanel:

Public Member Functions

 wxContourViewPanel (vtkImageData *theShowingImage, wxWindow *parent, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxSUNKEN_BORDER, int vertStart=1, int vertEnd=1, int horzStart=1, int horzEnd=1)
 
 ~wxContourViewPanel ()
 
void setWxEventHandler (wxEvtHandler *theEventHandler)
 
void createHorizontalBar (int horzStart, int horzEnd)
 
void createVerticalBar (int vertStart, int vertEnd)
 
void createViewPanel ()
 
void onBarrange_Horizontal (wxCommandEvent &event)
 
void onActualChange_Bar_Horizontal (wxCommandEvent &event)
 
void onStartChange_Bar_Horizontal (wxCommandEvent &event)
 
void onEndChange_Bar_Horizontal (wxCommandEvent &event)
 
void onSelectionEnd_Horizontal (wxCommandEvent &event)
 
void onMovedBar_Horizontal (wxCommandEvent &event)
 
void onBarrange_Vertical (wxCommandEvent &event)
 
void onActualChange_Bar_Vertical (wxCommandEvent &event)
 
void onStartChange_Bar_Vertical (wxCommandEvent &event)
 
void onEndChange_Bar_Vertical (wxCommandEvent &event)
 
void onSelectionEnd_Vertical (wxCommandEvent &event)
 
void onMovedBar_Vertical (wxCommandEvent &event)
 
void setVerticalRepresentedValues (int minRepresented, int maxRepresented)
 
void setHorizontalRepresentedValues (int minRepresented, int maxRepresented)
 
int getStartVertical ()
 
int getEndVertical ()
 
int getActualVertical ()
 
void setStartVertical (int nwValue)
 
void setEndVertical (int nwValue)
 
void setActualVertical (int nwValue)
 
int getStartHorizontal ()
 
int getEndHorizontal ()
 
int getActualHorizontal ()
 
void setStartHorizontal (int nwValue)
 
void setEndHorizontal (int nwValue)
 
void setActualHorizontal (int nwValue)
 
void setHorizontalConcept (std::string theHorizontalConcept, int minRepresent, int maxRepresent, int minShowed, int maxShowed, int actualShow)
 
void setVerticalConcept (std::string theVerticalConcept, int minRepresent, int maxRepresent, int minShowed, int maxShowed, int actualShow)
 
void setHorizontalConceptName (std::string theHorizontalConcept)
 
std::string getHorizontalConceptName ()
 
void setVerticalConceptName (std::string theVerticalConcept)
 
std::string getVerticalConceptName ()
 
void getSpacing (double *spacing)
 
wxVtkBaseView * getWxVtkBaseView ()
 
double getCurrentDeep ()
 
void SetVisibleAxis (bool ok)
 
int GetX ()
 
int GetY ()
 
int GetZ ()
 
void Refresh ()
 
wxVtkBaseView_SceneManagergetSceneManager ()
 
void initializeScenceManager ()
 
bool isEditableCControler (std::string theKeyName)
 
void removeFromScene (std::string theKeyName)
 
void onChangeInstant (wxCommandEvent &event)
 
void onCreateMultipleROI (wxCommandEvent &event)
 
void onCreateROI (wxCommandEvent &event)
 
void onStopCreateROI (wxCommandEvent &event)
 
void onChangedDeep (wxCommandEvent &event)
 
void onActionButtonPressed (wxCommandEvent &event)
 
void removeSceneContours ()
 
void addNameWrapperToScene ()
 
std::vector< std::string > getSelectedObjects ()
 
void RefreshInterface ()
 
vtkImageData * getImageData ()
 
void configureViewControlTo (std::string theName, manualBaseModel *manModelContour, double *spc, int typeofcontour)
 
int GetImageDataSizeZ ()
 
void GetImageDataRange (double *range)
 
void SetWidthContour (double width)
 
int getColorWindow ()
 
int getWindowLevel ()
 
void onBrigthnessColorWindowLevel (int colorwindow, int windowlevel)
 
void onInterpolation (bool interpolate)
 
void GetPointsOfActualContour (std::vector< double > *vecX, std::vector< double > *vecY, std::vector< double > *vecZ)
 
void changeImage (vtkImageData *img)
 
void changeDeep ()
 
void setImageSlice (int z)
 

Private Member Functions

wxVtkMPR2DView * GetwxVtkMPR2DView ()
 

Private Attributes

wxVtkBaseView_SceneManager_sceneManager
 
wxFlexGridSizer * outSizer
 
wxMaracas_N_ViewersWidget * theViewPanel
 
mBarRange * _verticalBar
 
mBarRange * _horizontalBar
 
vtkImageData * showingVID
 
std::string _verticalConceptName
 
std::string _horizontalConceptName
 
double last_spacing [3]
 
bool _useVerticalBar
 
bool _useHorizontalBar
 
wxEvtHandler * _eventHandler
 

Detailed Description

file wx

ViewPanel.h

Definition at line 78 of file wxContourViewPanel.h.

Constructor & Destructor Documentation

wxContourViewPanel::wxContourViewPanel ( vtkImageData *  theShowingImage,
wxWindow *  parent,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,
int  vertStart = 1,
int  vertEnd = 1,
int  horzStart = 1,
int  horzEnd = 1 
)

Definition at line 115 of file wxContourViewPanel.cxx.

References onActualChange_Bar_Horizontal(), onActualChange_Bar_Vertical(), onBarrange_Horizontal(), onBarrange_Vertical(), onEndChange_Bar_Horizontal(), onEndChange_Bar_Vertical(), onMovedBar_Horizontal(), onMovedBar_Vertical(), onSelectionEnd_Horizontal(), onSelectionEnd_Vertical(), onStartChange_Bar_Horizontal(), and onStartChange_Bar_Vertical().

116  :wxPanel(parent, -1, pos, size, style)
117  {
118  theShowingImage->GetSpacing(last_spacing);
119  showingVID = theShowingImage;
120  int gapH = 20;
121  int gapV = 10;
124  createHorizontalBar(1,80);
125  createVerticalBar(1,200);
126  createViewPanel();
127  _eventHandler = NULL;
128 
129  wxFlexGridSizer * panelSizer = new wxFlexGridSizer(1, 4, gapV, gapH);
130  panelSizer -> AddGrowableCol(2);
131  panelSizer -> AddGrowableRow(2);
132  panelSizer->Add(_verticalBar, 1, wxGROW);
133  panelSizer->AddSpacer(gapV);
134  panelSizer->Add(theViewPanel, 1, wxGROW);
135  panelSizer->AddSpacer(gapV);
136 
137  outSizer = new wxFlexGridSizer(3, 1, gapH, gapV);
138  outSizer -> AddGrowableCol(1);
139  outSizer -> AddGrowableRow(1);
140  outSizer->Add( _horizontalBar, 1, wxGROW);
141  outSizer->Add( panelSizer, 1, wxGROW);
142  outSizer->AddSpacer(gapH);
143 
144  _horizontalBar->setDeviceBlitStart( _verticalBar->GetWidth() + 2*gapH, gapV);
145  _horizontalBar->setDeviceEndMargin( 2*gapH+10 );
146 
147  //Connecting the events to the horizontal bar
148  Connect(_horizontalBar->GetId(),wxEVT_TSBAR,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onBarrange_Horizontal );
149  Connect(_horizontalBar->GetId(),wxEVT_TSBAR_ACTUAL,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onActualChange_Bar_Horizontal );
150  Connect(_horizontalBar->GetId(),wxEVT_TSBAR_START,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onStartChange_Bar_Horizontal );
151  Connect(_horizontalBar->GetId(),wxEVT_TSBAR_END,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onEndChange_Bar_Horizontal );
152  Connect(_horizontalBar->GetId(),wxEVT_SELECTION_END,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onSelectionEnd_Horizontal );
153  Connect(_horizontalBar->GetId(),wxEVT_TSBAR_MOVED,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onMovedBar_Horizontal );
154 
155  //Connecting the events to the vertical bar
156  Connect(_verticalBar->GetId(),wxEVT_TSBAR,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onBarrange_Vertical );
157  Connect(_verticalBar->GetId(),wxEVT_TSBAR_ACTUAL,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onActualChange_Bar_Vertical );
158  Connect(_verticalBar->GetId(),wxEVT_TSBAR_START,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onStartChange_Bar_Vertical );
159  Connect(_verticalBar->GetId(),wxEVT_TSBAR_END,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onEndChange_Bar_Vertical );
160  Connect(_verticalBar->GetId(),wxEVT_SELECTION_END,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onSelectionEnd_Vertical );
161  Connect(_verticalBar->GetId(),wxEVT_TSBAR_MOVED,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onMovedBar_Vertical );
162 
163 
164  this->SetSizer( outSizer );
165  this->SetAutoLayout( true );
166  this->Layout();
167 
168  //SetSize(1900,1900);
169  //theViewPanel->SetSize(800,600);
170  //theViewPanel->GetWindow(1)->SetSize(800,600);
171 
172  //outSizer->Fit( this );
173 
175  }

Here is the call graph for this function:

wxContourViewPanel::~wxContourViewPanel ( )

Definition at line 178 of file wxContourViewPanel.cxx.

References _sceneManager.

179  {
180  delete _sceneManager;
181  }

Member Function Documentation

void wxContourViewPanel::addNameWrapperToScene ( )

Definition at line 761 of file wxContourViewPanel.cxx.

References _sceneManager, wxVtkBaseView_SceneManager::addToScene(), wxContourMainFrame::getInstance(), wxContourMainFrame::getNamesWrappingSize(), and wxContourMainFrame::getNameWrapping().

Referenced by wxContourMainFrame::updateInstantOutlines().

761  {
763  for(int i = 0; i < size;i++){
764  std::string name = wxContourMainFrame::getInstance()->getNameWrapping(i);
765  _sceneManager->addToScene(name, true, true, true, false, false );
766  }
767  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::changeDeep ( )

Definition at line 714 of file wxContourViewPanel.cxx.

References getCurrentDeep(), and setActualVertical().

714  {
715  double val = getCurrentDeep();
716  setActualVertical( (int)val );
717  }

Here is the call graph for this function:

void wxContourViewPanel::changeImage ( vtkImageData *  img)

Definition at line 253 of file wxContourViewPanel.cxx.

References theViewPanel.

Referenced by wxContourMainFrame::updateInstantImageData().

253  {
254 
255  theViewPanel->SetImage(img);
256 
257  }

Here is the caller graph for this function:

void wxContourViewPanel::configureViewControlTo ( std::string  theName,
manualBaseModel *  manModelContour,
double *  spc,
int  typeofcontour 
)

Definition at line 781 of file wxContourViewPanel.cxx.

References _sceneManager, and wxVtkBaseView_SceneManager::configureViewControlTo().

Referenced by wxContourMainFrame::onSpreadGo(), wxContourMainFrame::SegmentationOneSlice(), and wxContourMainFrame::SegmentationOneSliceITK().

782  {
783  _sceneManager->configureViewControlTo(theName, manModelContour, spc, typeofcontour);
784  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::createHorizontalBar ( int  horzStart,
int  horzEnd 
)

Definition at line 214 of file wxContourViewPanel.cxx.

References _horizontalBar.

215  {
216  _horizontalBar = new mBarRange(this, 1500,80);
217  _horizontalBar -> setVisibleLabels (true);
218  _horizontalBar -> setRepresentedValues (horzStart, horzEnd);
219  _horizontalBar -> setActiveStateTo(true);
220  _horizontalBar -> SetActual( horzStart );
221  _horizontalBar -> setDeviceBlitStart (10,10);
222  _horizontalBar -> setDeviceEndMargin (10);
223  }
void wxContourViewPanel::createVerticalBar ( int  vertStart,
int  vertEnd 
)

Definition at line 225 of file wxContourViewPanel.cxx.

References _verticalBar.

226  {
227  _verticalBar = new mBarRange(this, 1500,40);
228  _verticalBar -> SetOrientation(false);
229  _verticalBar -> setVisibleLabels (false);
230  _verticalBar -> setRepresentedValues (vertStart, vertEnd);
231  _verticalBar -> setActiveStateTo(true);
232  _verticalBar -> SetActual( vertStart );
233  _verticalBar -> setDeviceBlitStart (10,10);
234  _verticalBar -> setDeviceEndMargin (10);
235  }
void wxContourViewPanel::createViewPanel ( )

Definition at line 238 of file wxContourViewPanel.cxx.

References SetVisibleAxis(), showingVID, and theViewPanel.

239  {
240  std::vector<int> * numViews = new std::vector<int> ();
241  numViews->push_back(0);
242  theViewPanel = new wxMaracas_N_ViewersWidget( this, showingVID, numViews );
243  SetVisibleAxis(false);
244 
245  theViewPanel->SetBackgroundColour(wxColour(0,0,0));
246 
247  theViewPanel->SetSize(800,600);
248  theViewPanel->GetWindow(1)->SetSize(800,600);
249 
250  }

Here is the call graph for this function:

int wxContourViewPanel::getActualHorizontal ( )

Gets the ActualHorizontal value

Returns
The ActualHorizontal

Definition at line 536 of file wxContourViewPanel.cxx.

References _horizontalBar.

Referenced by onActualChange_Bar_Horizontal().

537  {
538  return _horizontalBar->GetActual();
539  }

Here is the caller graph for this function:

int wxContourViewPanel::getActualVertical ( )

Gets the ActualVertical value

Returns
The ActualVertical

Definition at line 486 of file wxContourViewPanel.cxx.

References _verticalBar.

Referenced by onActualChange_Bar_Vertical().

487  {
488  return _verticalBar->GetActual();//GetEnd();
489  }

Here is the caller graph for this function:

int wxContourViewPanel::getColorWindow ( )

Definition at line 801 of file wxContourViewPanel.cxx.

References getWxVtkBaseView().

Referenced by wxContourMainFrame::getColorWindow().

802  {
803  wxVtk2DBaseView *wxvtk2dbaseview = (wxVtk2DBaseView*)getWxVtkBaseView();
804  vtkImageViewer2 *imageviewer = wxvtk2dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();
805  int colorwindow = (int)imageviewer->GetWindowLevel()->GetLevel();
806  return colorwindow;
807  }

Here is the call graph for this function:

Here is the caller graph for this function:

double wxContourViewPanel::getCurrentDeep ( )

Definition at line 655 of file wxContourViewPanel.cxx.

References theViewPanel.

Referenced by changeDeep(), onChangedDeep(), and wxContourMainFrame::setVectImages().

656  {
657 //EED 08/04/2008
658 // return theViewPanel->GetZ(1);
659  return theViewPanel->GetZ();
660  //return GetZ();
661  }

Here is the caller graph for this function:

int wxContourViewPanel::getEndHorizontal ( )

Gets the EndHorizontal value

Returns
The EndHorizontal

Definition at line 528 of file wxContourViewPanel.cxx.

References _horizontalBar.

529  {
530  return _horizontalBar->GetEnd();
531  }
int wxContourViewPanel::getEndVertical ( )

Gets the EndVertical value

Returns
The EndVertical

Definition at line 478 of file wxContourViewPanel.cxx.

References _verticalBar.

479  {
480  return _verticalBar->GetEnd();
481  }
std::string wxContourViewPanel::getHorizontalConceptName ( )

Gets the horizontal concept name

Returns
_horizontalConcept The name of the concept for setting at the horizontal bar

Gets the horizontal concept name

Returns
_horizontalConceptName The name of the concept for setting at the horizontal bar

Definition at line 616 of file wxContourViewPanel.cxx.

References _horizontalConceptName.

Referenced by onChangeInstant(), and wxContourMainFrame::onChangeInstantInstantPanel().

617  {
618  return _horizontalConceptName;
619  }

Here is the caller graph for this function:

vtkImageData * wxContourViewPanel::getImageData ( )
void wxContourViewPanel::GetImageDataRange ( double *  range)

Definition at line 791 of file wxContourViewPanel.cxx.

References _sceneManager, and wxVtkBaseView_SceneManager::GetImageDataRange().

Referenced by wxContourMainFrame::GetImageDataRange().

792  {
794  }

Here is the call graph for this function:

Here is the caller graph for this function:

int wxContourViewPanel::GetImageDataSizeZ ( )

Definition at line 786 of file wxContourViewPanel.cxx.

References _sceneManager, and wxVtkBaseView_SceneManager::GetImageDataSizeZ().

Referenced by wxContourMainFrame::GetImageDataSizeZ().

787  {
789  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::GetPointsOfActualContour ( std::vector< double > *  vecX,
std::vector< double > *  vecY,
std::vector< double > *  vecZ 
)

Definition at line 837 of file wxContourViewPanel.cxx.

References _sceneManager, and wxVtkBaseView_SceneManager::GetPointsOfActualContour().

Referenced by wxContourMainFrame::onSnakePressed(), and wxContourMainFrame::onSpreadAdd().

838  {
839  _sceneManager->GetPointsOfActualContour(vecX, vecY, vecZ);
840  }

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< std::string > wxContourViewPanel::getSelectedObjects ( )
void wxContourViewPanel::getSpacing ( double *  spacing)
int wxContourViewPanel::getStartHorizontal ( )

Gets the StartHorizontal value

Returns
The StartHorizontal

Definition at line 520 of file wxContourViewPanel.cxx.

References _horizontalBar.

521  {
522  return _horizontalBar->GetStart();
523  }
int wxContourViewPanel::getStartVertical ( )

Gets the StartVertical value

Returns
The StartVertical

Definition at line 470 of file wxContourViewPanel.cxx.

References _verticalBar.

471  {
472  return _verticalBar->GetActual();
473  }
std::string wxContourViewPanel::getVerticalConceptName ( )

Gets the vertical concept name

Returns
_verticalConcept The name of the concept for setting at the vertical bar

Gets the vertical concept name

Returns
_verticalConceptName The name of the concept for setting at the vertical bar

Definition at line 634 of file wxContourViewPanel.cxx.

References _verticalConceptName.

Referenced by onChangeInstant(), and wxContourMainFrame::onChangeInstantInstantPanel().

635  {
636  return _verticalConceptName;
637  }

Here is the caller graph for this function:

int wxContourViewPanel::getWindowLevel ( )

Definition at line 809 of file wxContourViewPanel.cxx.

References getWxVtkBaseView().

Referenced by wxContourMainFrame::getWindowLevel().

810  {
811  wxVtk2DBaseView *wxvtk2dbaseview = (wxVtk2DBaseView*)getWxVtkBaseView();
812  vtkImageViewer2 *imageviewer = wxvtk2dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();
813  int windowlevel = (int)imageviewer->GetWindowLevel()->GetWindow();
814  return windowlevel;
815  }

Here is the call graph for this function:

Here is the caller graph for this function:

wxVtkMPR2DView * wxContourViewPanel::GetwxVtkMPR2DView ( )
private

Definition at line 258 of file wxContourViewPanel.cxx.

References theViewPanel.

Referenced by GetX(), GetY(), GetZ(), Refresh(), and SetVisibleAxis().

259  {
260  return (wxVtkMPR2DView *) (theViewPanel->GetwxVtkBaseView(1));
261  }

Here is the caller graph for this function:

int wxContourViewPanel::GetX ( )

Definition at line 270 of file wxContourViewPanel.cxx.

References GetwxVtkMPR2DView().

Referenced by wxContourMainFrame::onSegmentationAllSlice(), wxContourMainFrame::onSegmentationOneSlice(), and wxContourMainFrame::onSegmentationOneSliceITK().

271  {
272  return GetwxVtkMPR2DView()->GetVtkmprbasedata()->GetX();
273  }

Here is the call graph for this function:

Here is the caller graph for this function:

int wxContourViewPanel::GetY ( )

Definition at line 275 of file wxContourViewPanel.cxx.

References GetwxVtkMPR2DView().

Referenced by wxContourMainFrame::onSegmentationAllSlice(), wxContourMainFrame::onSegmentationOneSlice(), and wxContourMainFrame::onSegmentationOneSliceITK().

276  {
277  return GetwxVtkMPR2DView()->GetVtkmprbasedata()->GetY();
278  }

Here is the call graph for this function:

Here is the caller graph for this function:

int wxContourViewPanel::GetZ ( )

Definition at line 280 of file wxContourViewPanel.cxx.

References GetwxVtkMPR2DView().

Referenced by wxContourMainFrame::onSegmentationOneSlice(), and wxContourMainFrame::onSegmentationOneSliceITK().

281  {
282  return GetwxVtkMPR2DView()->GetVtkmprbasedata()->GetZ();
283  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::initializeScenceManager ( )

Definition at line 183 of file wxContourViewPanel.cxx.

References _sceneManager, getSpacing(), getWxVtkBaseView(), onActionButtonPressed(), onChangedDeep(), onChangeInstant(), onCreateMultipleROI(), onCreateROI(), and onStopCreateROI().

183  {
184 
185  //_theViewPanel = theViewPanel;
186  //_theViewPanel->setWxEventHandler( this );
187 
188  double spc[3];
189  this->getSpacing(spc);
190  _sceneManager = new wxVtkBaseView_SceneManager ( this->getWxVtkBaseView(), this, spc );
191 
192  Connect( this->GetId(), wxINSTANT_CHANGE, (wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onChangeInstant );
193  Connect( wxID_ANY, wxEVT_START_CREATE_MULT_ROI, (wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onCreateMultipleROI );
194  Connect( wxID_ANY, wxEVT_START_CREATE_ROI, (wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onCreateROI );
195  Connect( wxID_ANY, wxEVT_STOP_CREATE_ROI, (wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onStopCreateROI );
196  Connect( wxID_ANY, wxEVT_CHANGED_DEEP, (wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onChangedDeep );
197  Connect( wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContourViewPanel :: onActionButtonPressed );
198 
199  }

Here is the call graph for this function:

bool wxContourViewPanel::isEditableCControler ( std::string  theKeyName)

Definition at line 664 of file wxContourViewPanel.cxx.

References _sceneManager, and wxVtkBaseView_SceneManager::isEditableCControler().

Referenced by wxContourMainFrame::deleteContour().

664  {
665  return _sceneManager->isEditableCControler(theKeyName);
666  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::onActionButtonPressed ( wxCommandEvent &  event)

Definition at line 718 of file wxContourViewPanel.cxx.

References _sceneManager, wxContourMainFrame::getInstance(), wxVtkBaseView_SceneManager::getLastKeyCode(), wxVtkBaseView_SceneManager::getSelectedObjects(), wxVtkBaseView_SceneManager::isCtrlPressed(), wxContourMainFrame::onCopy(), wxContourMainFrame::onDeleteContour(), wxContourMainFrame::onLoad(), wxContourMainFrame::onPaste(), wxContourMainFrame::onRedo(), wxContourMainFrame::onUndo(), and wxContourMainFrame::saveFileWithContoursAutomatique().

Referenced by initializeScenceManager().

718  {
719 
720 
721  std::vector<std::string> currentSelection = _sceneManager->getSelectedObjects();
722 // int elementsSelected = currentSelection.size();
723  bool ctrlKey = _sceneManager->isCtrlPressed();
724  char toolCommand = _sceneManager->getLastKeyCode();
725 
726 
727  if ( toolCommand == 3 && ctrlKey ) //'C' || 'c'
728  {
730  }
731  else if( toolCommand == 22 && ctrlKey ) //'V' || 'v'
732  {
734  }
735  else if( toolCommand == 8 || (toolCommand==127) ) // backspace Delete
736  {
738  }
739  else if( toolCommand == 14 && ctrlKey ) //'N' || 'n'
740  {
741  //toolCommand = &(CREATE_CONTOUR_KEY);
742  }
743  else if( toolCommand == 15 && ctrlKey ) //'O' || 'o'
744  {
746  }
747  else if( toolCommand == 19 && ctrlKey ) //'S' || 's'
748  {
750  }else if( toolCommand == 26 ){
752  }else if( toolCommand == 25 ){
754  }
755  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::onActualChange_Bar_Horizontal ( wxCommandEvent &  event)

Handles the event wxEVT_TSBAR_ACTUAL from the horizontal bar

Definition at line 306 of file wxContourViewPanel.cxx.

References _horizontalConceptName, getActualHorizontal(), wxContourMainFrame::getInstance(), and wxContourMainFrame::onChangeInstant().

Referenced by wxContourViewPanel().

307  {
308 
309  int actual = getActualHorizontal();
310 
312 
313  //JCP 26 - 11 - 08
314  //int nxActual_h = getActualHorizontal();
315 
316 
317  //if (_eventHandler!=NULL)
318  //{
319  //-------------------------------------------------
320  // Sending the event of wxINSTANT_CHANGE
321  //-------------------------------------------------
322  // wxCommandEvent newevent(wxINSTANT_CHANGE,GetId());
323 
324  // ConceptDataWrap * cWrap = new ConceptDataWrap( _horizontalConceptName );
325  // cWrap->setActualValue( nxActual_h );
326 
327  // newevent.SetClientData( (void *)cWrap );
328  // _eventHandler->ProcessEvent(newevent);
329 
330  //}
331  //JCP 26 - 11 - 08
332  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::onActualChange_Bar_Vertical ( wxCommandEvent &  event)

Handles the event wxEVT_TSBAR_ACTUAL from the vertical bar

Definition at line 378 of file wxContourViewPanel.cxx.

References _verticalConceptName, getActualVertical(), wxContourMainFrame::getInstance(), and wxContourMainFrame::onChangeInstant().

Referenced by wxContourViewPanel().

379  {
380  int actual = getActualVertical();
382  //JCP 26 - 11 - 08
383  /*
384  int nxActual_v = getActualVertical();
385 
386  if (_eventHandler!=NULL)
387  {
388  //-------------------------------------------------
389  // Sending the event of wxINSTANT_CHANGE
390  //-------------------------------------------------
391  wxCommandEvent newevent(wxINSTANT_CHANGE,GetId());
392 
393  ConceptDataWrap * cWrap = new ConceptDataWrap( _verticalConceptName );
394  cWrap->setActualValue( nxActual_v );
395 
396  newevent.SetClientData( (void *)cWrap );
397  _eventHandler->ProcessEvent(newevent);
398  }*/
399  //JCP 26 - 11 - 08
400  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::onBarrange_Horizontal ( wxCommandEvent &  event)

Handles the event wxEVT_TSBAR from the horizontal bar

Definition at line 299 of file wxContourViewPanel.cxx.

Referenced by wxContourViewPanel().

300  {
301 
302  }

Here is the caller graph for this function:

void wxContourViewPanel::onBarrange_Vertical ( wxCommandEvent &  event)

Handles the event wxEVT_TSBAR from the vertical bar

Definition at line 371 of file wxContourViewPanel.cxx.

Referenced by wxContourViewPanel().

372  {
373 
374  }

Here is the caller graph for this function:

void wxContourViewPanel::onBrigthnessColorWindowLevel ( int  colorwindow,
int  windowlevel 
)

Definition at line 817 of file wxContourViewPanel.cxx.

References getWxVtkBaseView().

Referenced by wxContourMainFrame::onBrigthnessColorWindowLevel().

818  {
819  wxVtk2DBaseView *wxvtk2dbaseview = (wxVtk2DBaseView*)getWxVtkBaseView();
820  vtkImageViewer2 *imageviewer = wxvtk2dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();
821  imageviewer->SetColorWindow(colorwindow);
822  imageviewer->SetColorLevel(windowlevel);
823  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::onChangedDeep ( wxCommandEvent &  event)

Definition at line 706 of file wxContourViewPanel.cxx.

References getCurrentDeep(), wxContourMainFrame::getInstance(), and wxContourMainFrame::onChangeDeep().

Referenced by initializeScenceManager().

706  {
707  double val = getCurrentDeep();
708  //setActualVertical( (int)val );
710  //_instantPanel->setConceptValue( "Axe Depth", (int)val );
711 
712 // changeInstant();
713  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::onChangeInstant ( wxCommandEvent &  event)

Definition at line 675 of file wxContourViewPanel.cxx.

References wxContourMainFrame::changeInstant(), ConceptDataWrap::getActualValue(), getHorizontalConceptName(), wxContourMainFrame::getIfConceptCheckedAt(), wxContourMainFrame::getInstance(), wxContourMainFrame::getLastConceptData(), ConceptDataWrap::getMaxShowedValue(), ConceptDataWrap::getMinShowedValue(), ConceptDataWrap::getName(), getVerticalConceptName(), setActualVertical(), wxContourMainFrame::setConceptValue(), and setHorizontalConcept().

Referenced by initializeScenceManager().

675  {
676  ConceptDataWrap * dataConcept = NULL;
677  if ( GetId() == event.GetId() )
678  {
679  dataConcept = (ConceptDataWrap *)event.GetClientData();
680  int value = dataConcept->getActualValue();
681  //_instantPanel->setConceptValue( dataConcept->getName(), value );
682  wxContourMainFrame::getInstance()->setConceptValue( dataConcept->getName(), value );
683  }
684  else
685  {
687  if( dataConcept->getName().compare( getVerticalConceptName() ) == 0)
688  {
689  setActualVertical( dataConcept->getActualValue());
690  //_theViewPanel->setVerticalConcept( dataConcept->getName(), dataConcept->getMinShowedValue()/*dataConcept->getMinValue()*/, /*dataConcept->getMaxValue()*/ dataConcept->getMaxShowedValue(), dataConcept->getMinShowedValue(), dataConcept->getMaxShowedValue(), dataConcept->getActualValue());
691  }
692  else if( dataConcept->getName().compare( getHorizontalConceptName() ) == 0|| wxContourMainFrame::getInstance()->getIfConceptCheckedAt( dataConcept->getName(), 0 ) )
693  {
694  setHorizontalConcept( dataConcept->getName(), dataConcept->getMinShowedValue()/*dataConcept->getMinValue()*/, /*dataConcept->getMaxValue()*/ dataConcept->getMaxShowedValue(), dataConcept->getMinShowedValue(), dataConcept->getMaxShowedValue(), dataConcept->getActualValue());
695  }
696  }
698  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::onCreateMultipleROI ( wxCommandEvent &  event)

Definition at line 700 of file wxContourViewPanel.cxx.

Referenced by initializeScenceManager().

700  {
701  }

Here is the caller graph for this function:

void wxContourViewPanel::onCreateROI ( wxCommandEvent &  event)

Definition at line 702 of file wxContourViewPanel.cxx.

Referenced by initializeScenceManager().

702  {
703  }

Here is the caller graph for this function:

void wxContourViewPanel::onEndChange_Bar_Horizontal ( wxCommandEvent &  event)

Handles the event wxEVT_TSBAR_END from the horizontal bar

Definition at line 343 of file wxContourViewPanel.cxx.

Referenced by wxContourViewPanel().

344  {
345 // int nxEnd_h = getEndHorizontal();
346  }

Here is the caller graph for this function:

void wxContourViewPanel::onEndChange_Bar_Vertical ( wxCommandEvent &  event)

Handles the event wxEVT_TSBAR_END from the vertical bar

Definition at line 411 of file wxContourViewPanel.cxx.

Referenced by wxContourViewPanel().

412  {
413 // int nxEnd_v = getEndVertical();
414  }

Here is the caller graph for this function:

void wxContourViewPanel::onInterpolation ( bool  interpolate)

Definition at line 825 of file wxContourViewPanel.cxx.

References getWxVtkBaseView().

Referenced by wxContourMainFrame::onInterpolation().

826  {
827  wxVtk2DBaseView *wxvtk2dbaseview = (wxVtk2DBaseView*)getWxVtkBaseView();
828  vtkImageViewer2 *imageviewer = wxvtk2dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();
829 
830  if (interpolate){
831  imageviewer->GetImageActor()->InterpolateOn();
832  } else {
833  imageviewer->GetImageActor()->InterpolateOff();
834  }
835  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::onMovedBar_Horizontal ( wxCommandEvent &  event)

Handles the event wxEVT_TSBAR_MOVED from the horizontal bar

Definition at line 357 of file wxContourViewPanel.cxx.

Referenced by wxContourViewPanel().

358  {
359 // int nxStart_h = getStartHorizontal();
360 // int nxEnd_h = getEndHorizontal();
361  }

Here is the caller graph for this function:

void wxContourViewPanel::onMovedBar_Vertical ( wxCommandEvent &  event)

Handles the event wxEVT_TSBAR_MOVED from the vertical bar

Definition at line 425 of file wxContourViewPanel.cxx.

Referenced by wxContourViewPanel().

426  {
427 // int nxStart_v = getStartVertical();
428 // int nxEnd_v = getEndVertical();
429  }

Here is the caller graph for this function:

void wxContourViewPanel::onSelectionEnd_Horizontal ( wxCommandEvent &  event)

Handles the event wxEVT_SELECTION_END from the horizontal bar

Definition at line 350 of file wxContourViewPanel.cxx.

Referenced by wxContourViewPanel().

351  {
352 
353  }

Here is the caller graph for this function:

void wxContourViewPanel::onSelectionEnd_Vertical ( wxCommandEvent &  event)

Handles the event wxEVT_SELECTION_END from the vertical bar

Definition at line 418 of file wxContourViewPanel.cxx.

Referenced by wxContourViewPanel().

419  {
420 
421  }

Here is the caller graph for this function:

void wxContourViewPanel::onStartChange_Bar_Horizontal ( wxCommandEvent &  event)

Handles the event wxEVT_TSBAR_START from the horizontal bar

Definition at line 336 of file wxContourViewPanel.cxx.

Referenced by wxContourViewPanel().

337  {
338 // int nxStart_h = getStartHorizontal();
339  }

Here is the caller graph for this function:

void wxContourViewPanel::onStartChange_Bar_Vertical ( wxCommandEvent &  event)

Handles the event wxEVT_TSBAR_START from the vertical bar

Definition at line 404 of file wxContourViewPanel.cxx.

Referenced by wxContourViewPanel().

405  {
406 // int nxStart_v = getStartVertical();
407  }

Here is the caller graph for this function:

void wxContourViewPanel::onStopCreateROI ( wxCommandEvent &  event)

Definition at line 704 of file wxContourViewPanel.cxx.

Referenced by initializeScenceManager().

704  {
705  }

Here is the caller graph for this function:

void wxContourViewPanel::Refresh ( )

Definition at line 286 of file wxContourViewPanel.cxx.

References GetwxVtkMPR2DView().

Referenced by wxContourMainFrame::showAxis().

287  {
288  GetwxVtkMPR2DView()->GetRenWin()->Render();
289  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::RefreshInterface ( )

Definition at line 773 of file wxContourViewPanel.cxx.

References getWxVtkBaseView().

Referenced by wxContourMainFrame::RefreshInterface(), and setImageSlice().

773  {
774  getWxVtkBaseView()->Refresh();
775  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::removeFromScene ( std::string  theKeyName)

Definition at line 668 of file wxContourViewPanel.cxx.

References _sceneManager, and wxVtkBaseView_SceneManager::deleteCViewerCControler().

Referenced by wxContourMainFrame::deleteContour().

668  {
669 
671 
672 
673  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::removeSceneContours ( )

Definition at line 757 of file wxContourViewPanel.cxx.

References _sceneManager, and wxVtkBaseView_SceneManager::removeSceneContours().

Referenced by wxContourMainFrame::onWidthOfContour(), and wxContourMainFrame::updateInstantOutlines().

757  {
759  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::setActualHorizontal ( int  nwValue)

Sets the ActualHorizontal value

Parameters
nwValueThe new value for the ActualHorizontal

Definition at line 561 of file wxContourViewPanel.cxx.

References _horizontalBar.

Referenced by setHorizontalConcept().

562  {
563  _horizontalBar->SetActual( nwValue );
564  }

Here is the caller graph for this function:

void wxContourViewPanel::setActualVertical ( int  nwValue)

Sets the ActualVertical value

Parameters
nwValueThe new value for the ActualVertical

Definition at line 511 of file wxContourViewPanel.cxx.

References _verticalBar.

Referenced by changeDeep(), onChangeInstant(), wxContourMainFrame::onChangeInstantInstantPanel(), and setVerticalConcept().

512  {
513  _verticalBar->SetActual( nwValue );
514  }

Here is the caller graph for this function:

void wxContourViewPanel::setEndHorizontal ( int  nwValue)

Sets the EndHorizontal value

Parameters
nwValueThe new value for the EndHorizontal

Definition at line 553 of file wxContourViewPanel.cxx.

References _horizontalBar.

Referenced by setHorizontalConcept().

554  {
555  _horizontalBar->SetEnd( nwValue );
556  }

Here is the caller graph for this function:

void wxContourViewPanel::setEndVertical ( int  nwValue)

Sets the EndVertical value

Parameters
nwValueThe new value for the EndVertical

Definition at line 503 of file wxContourViewPanel.cxx.

References _verticalBar.

Referenced by setVerticalConcept().

504  {
505  _verticalBar->SetEnd( nwValue );
506  }

Here is the caller graph for this function:

void wxContourViewPanel::setHorizontalConcept ( std::string  theHorizontalConcept,
int  minRepresent,
int  maxRepresent,
int  minShowed,
int  maxShowed,
int  actualShow 
)

Sets the horizontal concept values and name

Parameters
theHorizontalConceptThe name of the concept for setting at the horizontal bar
minRepresentThe minRepresent value of the concept for setting at the horizontal bar
maxRepresentThe maxRepresent value of the concept for setting at the horizontal bar
minShowedThe minShowed value of the concept for setting at the horizontal bar
maxShowedThe maxShowed value of the concept for setting at the horizontal bar
actualShowThe actualShow value of the concept for setting at the horizontal bar

Definition at line 575 of file wxContourViewPanel.cxx.

References setActualHorizontal(), setEndHorizontal(), setHorizontalConceptName(), setHorizontalRepresentedValues(), and setStartHorizontal().

Referenced by onChangeInstant(), and wxContourMainFrame::onChangeInstantInstantPanel().

576  {
577  setHorizontalConceptName( theHorizontalConcept );
578  setHorizontalRepresentedValues( minRepresent, maxRepresent );
579  setActualHorizontal( actualShow );
580  setStartHorizontal( minShowed );
581  setEndHorizontal( maxShowed );
582  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::setHorizontalConceptName ( std::string  theHorizontalConcept)

Sets the horizontal concept name

Parameters
theHorizontalConceptThe name of the concept for setting at the horizontal bar

Definition at line 607 of file wxContourViewPanel.cxx.

References _horizontalConceptName.

Referenced by setHorizontalConcept().

608  {
609  _horizontalConceptName = theHorizontalConcept;
610  }

Here is the caller graph for this function:

void wxContourViewPanel::setHorizontalRepresentedValues ( int  minRepresented,
int  maxRepresented 
)

Sets the represented values of the horizontal bar

Parameters
minRepresentedIn the minimum represented value of the bar
maxRepresentedIn the maximum represented value of the bar

Definition at line 458 of file wxContourViewPanel.cxx.

References _horizontalBar, and _useHorizontalBar.

Referenced by setHorizontalConcept().

459  {
460  if( _horizontalBar != NULL && _useHorizontalBar )
461  {
462  _horizontalBar -> setRepresentedValues( minRepresented, maxRepresented );
463  }
464  }

Here is the caller graph for this function:

void wxContourViewPanel::setImageSlice ( int  z)

Definition at line 842 of file wxContourViewPanel.cxx.

References _sceneManager, wxVtkBaseView_SceneManager::getWxVtkViewBase(), and RefreshInterface().

Referenced by wxContourMainFrame::updateInstantImageData().

842  {
843  vtkInteractorStyleBaseView* stylebaseview = (vtkInteractorStyleBaseView*) _sceneManager->getWxVtkViewBase()->GetInteractorStyleBaseView();
844  wxVtk2DBaseView* baseview = (wxVtk2DBaseView*)stylebaseview->GetWxVtk2DBaseView();
845  baseview->SetActualSlice(z);
847  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::setStartHorizontal ( int  nwValue)

Sets the StartHorizontal value

Parameters
nwValueThe new value for the StartHorizontal

Definition at line 545 of file wxContourViewPanel.cxx.

References _horizontalBar.

Referenced by setHorizontalConcept().

546  {
547  _horizontalBar->SetStart( nwValue );
548  }

Here is the caller graph for this function:

void wxContourViewPanel::setStartVertical ( int  nwValue)

Sets the StartVertical value

Parameters
nwValueThe new value for the StartVertical

Definition at line 495 of file wxContourViewPanel.cxx.

References _verticalBar.

Referenced by setVerticalConcept().

496  {
497  _verticalBar->SetEnd( nwValue );
498  }

Here is the caller graph for this function:

void wxContourViewPanel::setVerticalConcept ( std::string  theVerticalConcept,
int  minRepresent,
int  maxRepresent,
int  minShowed,
int  maxShowed,
int  actualShow 
)

Sets the vertical concept values and name

Parameters
theVerticalConceptThe name of the concept for setting at the vertical bar
minRepresentThe minRepresent value of the concept for setting at the vertical bar
maxRepresentThe maxRepresent value of the concept for setting at the vertical bar
minShowedThe minShowed value of the concept for setting at the vertical bar
maxShowedThe maxShowed value of the concept for setting at the vertical bar
actualShowThe actualShow value of the concept for setting at the vertical bar

Definition at line 593 of file wxContourViewPanel.cxx.

References setActualVertical(), setEndVertical(), setStartVertical(), setVerticalConceptName(), and setVerticalRepresentedValues().

Referenced by wxContourMainFrame::setVectImages().

594  {
595  setVerticalConceptName( theVerticalConcept );
596  setVerticalRepresentedValues( minRepresent, maxRepresent );
597  setActualVertical( actualShow );
598  setStartVertical( minShowed );
599  setEndVertical( maxShowed );
600  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::setVerticalConceptName ( std::string  theVerticalConcept)

Sets the vertical concept name

Parameters
theVerticalConceptThe name of the concept for setting at the vertical bar

Definition at line 625 of file wxContourViewPanel.cxx.

References _verticalConceptName.

Referenced by setVerticalConcept().

626  {
627  _verticalConceptName = theVerticalConcept;
628  }

Here is the caller graph for this function:

void wxContourViewPanel::setVerticalRepresentedValues ( int  minRepresented,
int  maxRepresented 
)

Sets the represented values of the vertical bar

Parameters
minRepresentedIn the minimum represented value of the bar
maxRepresentedIn the maximum represented value of the bar

Definition at line 445 of file wxContourViewPanel.cxx.

References _useVerticalBar, and _verticalBar.

Referenced by setVerticalConcept().

446  {
447  if( _verticalBar != NULL && _useVerticalBar )
448  {
449  _verticalBar -> setRepresentedValues( minRepresented, maxRepresented );
450  }
451  }

Here is the caller graph for this function:

void wxContourViewPanel::SetVisibleAxis ( bool  ok)

Definition at line 264 of file wxContourViewPanel.cxx.

References GetwxVtkMPR2DView().

Referenced by createViewPanel(), and wxContourMainFrame::showAxis().

265  {
266  GetwxVtkMPR2DView()->SetVisibleAxis(ok);
267  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::SetWidthContour ( double  width)

Definition at line 796 of file wxContourViewPanel.cxx.

References _sceneManager, and wxVtkBaseView_SceneManager::SetWidthContour().

Referenced by wxContourMainFrame::onWidthOfContour().

797  {
798  _sceneManager->SetWidthContour( width );
799  }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourViewPanel::setWxEventHandler ( wxEvtHandler *  theEventHandler)

Definition at line 209 of file wxContourViewPanel.cxx.

References _eventHandler.

210  {
211  _eventHandler = theEventHandler;
212  }

Member Data Documentation

wxEvtHandler* wxContourViewPanel::_eventHandler
private

Definition at line 395 of file wxContourViewPanel.h.

Referenced by setWxEventHandler().

std::string wxContourViewPanel::_horizontalConceptName
private
bool wxContourViewPanel::_useHorizontalBar
private

Definition at line 393 of file wxContourViewPanel.h.

Referenced by setHorizontalRepresentedValues().

bool wxContourViewPanel::_useVerticalBar
private

Definition at line 391 of file wxContourViewPanel.h.

Referenced by setVerticalRepresentedValues().

std::string wxContourViewPanel::_verticalConceptName
private
double wxContourViewPanel::last_spacing[3]
private

Definition at line 389 of file wxContourViewPanel.h.

Referenced by getSpacing().

wxFlexGridSizer* wxContourViewPanel::outSizer
private

Definition at line 367 of file wxContourViewPanel.h.

vtkImageData* wxContourViewPanel::showingVID
private

Definition at line 383 of file wxContourViewPanel.h.

Referenced by createViewPanel().

wxMaracas_N_ViewersWidget* wxContourViewPanel::theViewPanel
private

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