creaContours_lib
wxContourMainFrame Class Reference

#include <wxContourMainFrame.h>

Inheritance diagram for wxContourMainFrame:
Collaboration diagram for wxContourMainFrame:

Public Member Functions

 wxContourMainFrame (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, long style=wxDEFAULT_FRAME_STYLE|wxSUNKEN_BORDER)
 
 wxContourMainFrame (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, std::vector< vtkImageData * > images, long style=wxDEFAULT_FRAME_STYLE|wxSUNKEN_BORDER, std::string datadir="C:/Creatis/creaContoursBin/RelWithDebInfo/")
 
 ~wxContourMainFrame ()
 
void setVectImages (std::vector< vtkImageData * > imgs)
 
bool configurePanels ()
 
bool addNewPanel (wxPanel *panel)
 
wxAuiNotebook * createNotebook ()
 
void createInstantChooserPanel (wxAuiNotebook *parent)
 
void createViewPanel (wxAuiNotebook *parent)
 
void createInstantChooserPanel (wxWindow *parent)
 
void createViewPanel (wxWindow *parent)
 
void setInstantChooserPanel (wxInstantChooserPanel *theInstantChooserPanel)
 
void getMaskValue (vtkImageData **mask, vtkImageData **value, int typeContourGroup, int selection, int minZ, int maxZ)
 
void SaveImageResult (std::string directory, std::string namefile, vtkImageData *mask, vtkImageData *value)
 
void ShowToolsPanel (bool show)
 
std::vector< vtkImageData * > getVectImages ()
 
void onCreateContourSpline ()
 
void onCreateContourRectangle ()
 
void onCreateContourCircle ()
 
void onCreateContourLine ()
 
void onCreateContourPoints ()
 
void onCreateContourPolygon ()
 
void onCreateContourBullEye (wxPanel *pan)
 
void onDeleteContour ()
 
void deleteContours (std::vector< std::string > keyNamesVector)
 
void deleteContour (std::string theKeyName)
 
void onDeleteContoursActSlice ()
 
void onDeleteAllContours ()
 
void deleteAllContours ()
 
void setConceptValue (std::string name, int value)
 
ConceptDataWrapgetLastConceptData ()
 
bool getIfConceptCheckedAt (std::string name, int pos)
 
void changeInstant ()
 
int getNamesWrappingSize ()
 
std::string getNameWrapping (int i)
 
void updateInstantOutlines ()
 
void updateInstantImageData ()
 
void updateInstantAxes ()
 
void onChangeDeep (int val)
 
void onCopy ()
 
void onPaste ()
 
void onUndo ()
 
void onRedo ()
 
void createCopyContourOf (std::string anExistingKName, std::vector< int > &instantNoTouchData, bool append)
 
void createMirrorContourOf (std::string anExistingKName, std::vector< int > &instantNoTouchData, bool append)
 AD: 03-09 Copy the object and apply the given transformation. More...
 
void onLoad ()
 
void onSave ()
 
void onImport ()
 
void onTest ()
 
void openContours (FILE *pFile, FILE *pFileData, bool staticContour)
 
void RefreshInterface ()
 
vtkImageData * getImageData ()
 
void onSegmentationOneSlice (int isovalue, int sampling, int method)
 
void onSegmentationOneSliceITK (wxString distance, wxString sigma, wxString alfa, wxString beta, wxString propagation, wxString iterations, wxString inflation)
 
void SegmentationOneSlice (int x, int y, int z, int isovalue, int sampling, int method)
 
void SegmentationOneSliceITK (int x, int y, int z, wxString distance, wxString sigma, wxString alfa, wxString beta, wxString propagation, wxString iterations, wxString inflation)
 
void Mirror (int x, int y, int z, int isovalue, int sampling, int method)
 
int GetImageDataSizeZ ()
 
void GetImageDataRange (double *range)
 
void onSegmentationAllSlice (int minZ, int maxZ, int isovalue, int sampling, int method)
 
void referenceLine ()
 
void refLineHide ()
 
void refLineShow ()
 
void refLineChangeWidth (int width)
 
void onMirror ()
 
void showAxis (bool show)
 
void onRigidPressed ()
 
void onWidthOfContour (double width)
 
int getColorWindow ()
 
int getWindowLevel ()
 
void onBrigthnessColorWindowLevel (int colorwindow, int windowlevel)
 
void onInterpolation (bool interpolate)
 
void onChangeInstant (std::string name, int actual)
 
void resetAppend ()
 
void onSpreadAdd ()
 
void onSpreadAddAll ()
 
void onSpreadGo (int type)
 
void getInstantVector (std::vector< int > &tempVector)
 
std::vector< std::string > getOutlinesName (int slide)
 
void onInformationContourLabels (int typeContourGroup, int selection, int minimumZ, int maximumZ, int grayRangeMin, int grayRangeMax)
 
void onSaveResults (std::string directory, std::string namefile, std::string filename, int typeContourGroup, int selection, int minZ, int maxZ, bool XYZValues, bool contourImage, bool statistics)
 
void SaveValuesXYZ (std::string directory, std::string namefile, int typeContourGroup)
 
void onChangeInstantInstantPanel (std::string name, int value, int minshow, int maxshow)
 
void onSnakePressed ()
 
void saveFileWithContoursAutomatique ()
 
void ShowResultImages (int typeContourGroup, int selection, int minZ, int maxZ)
 
wxPanel * getMaskImageViewPanel (wxWindow *parent)
 
void SetContourGroup (int contourGroup)
 
wxPanel * getThresholdImageViewPanel (wxWindow *parent)
 
wxPanel * getColorLayerImageViewPanel (wxWindow *parent)
 
void onPrintLabel (wxString label, manualBaseModel *manualModel)
 
void onInsertCalculation (manualBaseModel *manualModel)
 
double onePixelSize (double value)
 
int getType ()
 
double getContourSizeInPixels ()
 
manualBaseModel * getContour ()
 
std::string GetFileLocation ()
 
void SetFileLocation (std::string newFileLocation)
 
void SetScalarRange (int grayRangeMin, int grayRangeMax)
 

Static Public Member Functions

static wxContourMainFramegetInstance (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, std::vector< vtkImageData * > images, long style=wxDEFAULT_FRAME_STYLE|wxSUNKEN_BORDER, std::string datadir="C:/Creatis/creaContoursBin/RelWithDebInfo/")
 
static wxContourMainFramegetInstance ()
 
static void resetInstance ()
 

Private Member Functions

void readDimSpc (FILE *pFile, bool interactiveOption)
 
void createContour (int typeContour)
 
manualBaseModel * factoryManualContourModel (wxPanel *panel)
 
void saveState ()
 
void loadState (std::string filename)
 
void saveFileWithContours (std::string filename)
 
void onLoadContours (std::string fileNameContourROI, bool interactiveInterface)
 
void SetZForAllContours (int pz)
 

Private Attributes

int _contourGroup
 
KernelManagerContourkernelManager
 
interfMainPanel_pannew
 
PerformingOperation_performingOperation
 
std::string _datadir
 
wxContourViewPanel_theViewPanel
 
wxInstantChooserPanel_instantPanel
 
manualLineControler * _refLineControl
 
manualContourModelLine * _refLineModel
 
manualViewLine * _refLineView
 
wxAuiManager m_mgr
 
wxAuiNotebook * notebook
 
long m_notebook_style
 
long m_notebook_theme
 
int _numberOfVariablesStatistics
 
ThresholdImageView * _viewMaskImage
 
ThresholdImageViewPanel * _viewMaskImagePanel
 
ThresholdImageView * _viewThresholdImage
 
ThresholdImageViewPanel * _viewThresholdImagePanel
 
ColorLayerImageView * _viewColorLayerImage
 
ColorLayerImageViewPanel * _viewColorLayerImagePanel
 
std::vector< vtkImageData * > _images
 
bool _actorPresent
 
int _tmpReadFileImageDim [3]
 
double _tmpReadFileImageSpac [3]
 
int _tmpReadFileTypeOfTransformation
 
bool _creatingContoursActive
 
ContourExtractData * _contourextractdata
 
int inredo
 
int inundo
 
std::string stundoredo
 
wxWindow * infoWin2
 
wxPanel * calibrationPanel
 
wxPanel * calibrationPanelError
 
double _onePixelSize
 
std::string _imageLocation
 
std::string _fileLocation
 

Static Private Attributes

static wxContourMainFrameinstance = NULL
 
static char COPY = 'C'
 

Detailed Description

Definition at line 122 of file wxContourMainFrame.h.

Constructor & Destructor Documentation

wxContourMainFrame::wxContourMainFrame ( wxWindow *  parent,
wxWindowID  id,
const wxString &  title,
const wxPoint &  pos,
const wxSize &  size,
long  style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER 
)

Definition at line 58 of file wxContourMainFrame.cxx.

References _contourextractdata, _contourGroup, _creatingContoursActive, _instantPanel, _numberOfVariablesStatistics, _refLineControl, _refLineModel, _refLineView, _theViewPanel, _viewColorLayerImage, _viewColorLayerImagePanel, _viewMaskImage, _viewMaskImagePanel, _viewThresholdImage, _viewThresholdImagePanel, and m_mgr.

Referenced by getInstance().

61  : wxPanel(parent, id, pos, size, style)
62  {
63  m_mgr.SetManagedWindow(this);
64  _contourGroup = 1;
66  _theViewPanel = NULL;
67 // _modelManager = NULL;
68  _instantPanel = NULL;
69 // _buttonsBar = NULL;
70 // _gridPanel = NULL;
71 // _drawToolsPanel = NULL;
72 // _operationsToolsPanel = NULL;
73  //_autoFormsPanel = NULL;
74 // _standardToolsPanel = NULL;
75 // _editionToolsPanel = NULL;
76 // _listViewPanel = NULL;
77 // _sceneManager = NULL;
78  //_actualInstant = NULL;
80 
81  _refLineControl = NULL;
82  _refLineModel = NULL;
83  _refLineView = NULL;
84 // _actorPresent = false;
85 
86  // set up default notebook style
87 // m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
88 // m_notebook_theme = 0;
89  //wxContour_ActionCommandsID a;
90 
91  _contourextractdata = NULL;
92  _viewMaskImage = NULL;
93  _viewMaskImagePanel = NULL;
94  _viewThresholdImage = NULL;
96  _viewColorLayerImage = NULL;
98  }

Here is the caller graph for this function:

wxContourMainFrame::wxContourMainFrame ( wxWindow *  parent,
wxWindowID  id,
const wxString &  title,
const wxPoint &  pos,
const wxSize &  size,
std::vector< vtkImageData * >  images,
long  style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,
std::string  datadir = "C:/Creatis/creaContoursBin/RelWithDebInfo/" 
)

Definition at line 100 of file wxContourMainFrame.cxx.

References _contourextractdata, _contourGroup, _creatingContoursActive, _datadir, _instantPanel, _numberOfVariablesStatistics, _pannew, _performingOperation, _refLineControl, _refLineModel, _refLineView, _theViewPanel, _viewColorLayerImage, _viewColorLayerImagePanel, _viewMaskImage, _viewMaskImagePanel, _viewThresholdImage, _viewThresholdImagePanel, interfMainPanel::getInstance(), inredo, inundo, m_mgr, m_notebook_style, m_notebook_theme, and setVectImages().

101  : wxPanel(parent, id, pos, size, style)
102  {
103  m_mgr.SetManagedWindow(this);
104  _contourGroup = 1;
105  _creatingContoursActive = false;
106  _theViewPanel = NULL;
107 
108  _instantPanel = NULL;
109  _refLineControl = NULL;
110  _refLineModel = NULL;
111  _refLineView = NULL;
112 // _actorPresent = false;
113  _viewMaskImage = NULL;
114  _viewMaskImagePanel = NULL;
115  _viewThresholdImage = NULL;
117  _viewColorLayerImage = NULL;
119 
120  // set up default notebook style
121  m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
122  m_notebook_theme = 0;
123  //wxContour_ActionCommandsID a;
125 
126  _datadir = datadir;
127 
128 
129  inredo = 0;
130  inundo = 0;
131 
132  _pannew = interfMainPanel::getInstance(this,datadir+"/data/Icons");//, eventHandler);
134 
135  if(images.size() > 0)
136  {
137  this->setVectImages(images);
138  }
139 
140  _contourextractdata = NULL;
141 }

Here is the call graph for this function:

wxContourMainFrame::~wxContourMainFrame ( )

Definition at line 207 of file wxContourMainFrame.cxx.

References _contourextractdata, _pannew, deleteAllContours(), instance, kernelManager, m_mgr, and interfMainPanel::resetInstance().

208  {
209  delete _contourextractdata;
211  _pannew->Close();
213  delete kernelManager;
214  instance = NULL;
215  //_pannew->Destroy();
216  //delete _pannew;
217 
218  m_mgr.UnInit();
219  //delete m_mgr;
220 
221  //El problema al cerrar la aplicacion puede estar asociado
222  //a que wxAUINotebook esta en la aplicacion
223  //principal (wxContourGUIExample)tambien
224  //EED???? delete _theViewPanel;
225  //EED???? delete _instantPanel;
226  //EED???? delete _buttonsBar;
227  //EED???? delete _actualInstant;
228  //EED???? delete _sceneManager;
229  }

Here is the call graph for this function:

Member Function Documentation

bool wxContourMainFrame::addNewPanel ( wxPanel *  panel)

Definition at line 275 of file wxContourMainFrame.cxx.

References m_mgr, and notebook.

276  {
277  bool configured = panel!=NULL;
278  configured &= panel!=NULL;
279 
280  if( configured )
281  {
282  notebook->AddPage( panel, wxT(" Viewer "), true );
283  m_mgr.Update();
284  }
285  return configured;
286  }
void wxContourMainFrame::changeInstant ( )

Definition at line 675 of file wxContourMainFrame.cxx.

References _contourGroup, _instantPanel, _viewColorLayerImage, _viewColorLayerImagePanel, _viewMaskImage, _viewMaskImagePanel, _viewThresholdImage, _viewThresholdImagePanel, wxInstantChooserPanel::getInstant(), getMaskValue(), kernelManager, KernelManagerContour::setInstant(), updateInstantAxes(), updateInstantImageData(), and updateInstantOutlines().

Referenced by onChangeDeep(), wxContourViewPanel::onChangeInstant(), onChangeInstantInstantPanel(), interfMainPanel::onColorLayerImagePressed(), interfMainPanel::onInformationPressed(), onLoadContours(), interfMainPanel::onThresholdPressed(), and RefreshInterface().

676 {
677  std::vector<int> instantVect;
678  _instantPanel->getInstant( instantVect );
679  int actualSlice = instantVect[1];
680 
681  kernelManager->setInstant(instantVect);
682 
683  // Refresh Mask image
684  if(_viewMaskImage!=NULL){
685  _viewMaskImage->SetZ(actualSlice);
686  if (_viewMaskImagePanel->IsVisible()==true)
687  {
688  vtkImageData *mask, *value;
689  getMaskValue(&mask,&value, _contourGroup , 0, -1, -1);
690  _viewMaskImage->onThreshold();
691  }
692  }
693 
694  // Refresh Threshold image
695  if(_viewThresholdImage!=NULL){
696  _viewThresholdImage->SetZ(actualSlice);
697  if (_viewThresholdImagePanel->IsVisible()==true){
698  _viewThresholdImage->onThreshold();
699  }
700  }
701 
702  // Refresh Threshold image
703  if(_viewColorLayerImage!=NULL){
704  _viewColorLayerImage->SetZ(actualSlice);
705  if (_viewColorLayerImagePanel->IsVisible()==true){
706  _viewColorLayerImage->onThreshold();
707  }
708  }
709 
713 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool wxContourMainFrame::configurePanels ( )

Definition at line 248 of file wxContourMainFrame.cxx.

References _instantPanel, _theViewPanel, m_mgr, and notebook.

Referenced by setVectImages().

249  {
250  bool configured = _theViewPanel!=NULL;
251 
252  configured &= _theViewPanel!=NULL;
253  if( _theViewPanel!=NULL )
254  {
255  notebook->AddPage( _theViewPanel, wxT(" View ") );
256  m_mgr.Update();
257  }
258 
259 
260  if( configured )
261  {
262  notebook->AddPage( _instantPanel, wxT("Instant Page") );
263  m_mgr.Update();
264  }
265 
266  m_mgr.AddPane(notebook, wxAuiPaneInfo().Name(wxT("notebook_content")).CenterPane().PaneBorder(false));
267  m_mgr.Update();
268 
269  SetMinSize(wxSize(300,300));
270  m_mgr.Update();
271  return configured;
272  }

Here is the caller graph for this function:

void wxContourMainFrame::createContour ( int  typeContour)
private

Definition at line 414 of file wxContourMainFrame.cxx.

References _instantPanel, _theViewPanel, wxVtkBaseView_SceneManager::configureViewControlTo(), KernelManagerContour::createOutline(), KernelManagerContour::factoryManualContourModel(), wxInstantChooserPanel::getInstant(), wxContourViewPanel::getSceneManager(), wxContourViewPanel::getSpacing(), and kernelManager.

Referenced by onCreateContourCircle(), onCreateContourLine(), onCreateContourPoints(), onCreateContourPolygon(), onCreateContourRectangle(), and onCreateContourSpline().

415 {
416  //Creating the manualContourModel and including in the model
417  manualBaseModel * manModelContour = kernelManager->factoryManualContourModel(typeContour);
418 
419  std::vector<int> instantVector;
420  _instantPanel->getInstant( instantVector );
421  std::string theName = kernelManager->createOutline(manModelContour, instantVector);
422 
423  /*std::vector<int> instantVector;
424  _instantPanel->getInstant( instantVector );
425  std::string theName;
426  theName= _modelManager->createOutline( manModelContour, instantVector );*/
427  bool addedModel = theName.compare("") != 0;//??
428  if( addedModel )
429  {
430  double spc[3];//Si no hay imagen pero hay contornos que spacing se pone por default
432  //Adding the manualContourControler to interface objects structure
433  //Adding the manualViewContour to interface objects structure
434  //_sceneManager->setControlActiveStateOfALL( false );//This call is being done here because if the ROI is created underneath the previously created ROIS will still be active.
435  _theViewPanel->getSceneManager()->configureViewControlTo( theName, manModelContour,spc , typeContour) ;
436  }
437 
438 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::createCopyContourOf ( std::string  anExistingKName,
std::vector< int > &  instantNoTouchData,
bool  append 
)

Definition at line 808 of file wxContourMainFrame.cxx.

References _theViewPanel, KernelManagerContour::createCopyContourOf(), wxVtkBaseView_SceneManager::createCopyContourOf(), KernelManagerContour::getOutlineByKeyName(), wxContourViewPanel::getSceneManager(), and kernelManager.

Referenced by onPaste().

809 {
810  std::string cloneName = kernelManager->createCopyContourOf( anExistingKName, instantNoTouchData );
811  manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(cloneName);//_modelManager->getOutlineByKeyName( cloneName )->getModel();
812  _theViewPanel->getSceneManager()->createCopyContourOf( anExistingKName, cloneName, manualModel , append );
813 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::createInstantChooserPanel ( wxAuiNotebook *  parent)
void wxContourMainFrame::createInstantChooserPanel ( wxWindow *  parent)
void wxContourMainFrame::createMirrorContourOf ( std::string  anExistingKName,
std::vector< int > &  instantNoTouchData,
bool  append 
)

AD: 03-09 Copy the object and apply the given transformation.

Definition at line 816 of file wxContourMainFrame.cxx.

References _refLineModel, _theViewPanel, KernelManagerContour::createCopyContourOf(), wxVtkBaseView_SceneManager::createCopyContourOf(), KernelManagerContour::getOutlineByKeyName(), wxContourViewPanel::getSceneManager(), and kernelManager.

Referenced by onMirror().

817 {
818  std::string cloneName = kernelManager->createCopyContourOf( anExistingKName, instantNoTouchData );
819  manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(cloneName);
820 
821  manualPoint * refPoint1 = _refLineModel->GetManualPoint(0);
822  manualPoint * refPoint2 = _refLineModel->GetManualPoint(1);
823 
824  double pnt1X = refPoint1->GetX();
825  double pnt1Y = refPoint1->GetY();
826 // double pnt1Z = refPoint1->GetZ();
827  double pnt2X = refPoint2->GetX();
828  double pnt2Y = refPoint2->GetY();
829 // double pnt2Z = refPoint2->GetZ();
830 
831  double angle = (atan2(pnt2Y - pnt1Y, pnt2X - pnt1X) * 180 / 3.1415926535897932384626433832795)+90;
832  vtkTransform *t = vtkTransform::New();
833 
834  t->PostMultiply();
835  t->Identity();
836  t->Translate(-pnt1X, -pnt1Y, 0);
837  t->RotateZ(-angle);
838  t->Scale(-1,1,1);
839  t->RotateZ(angle);
840  t->Translate(pnt1X, pnt1Y, 0);
841  t->Update();
842 
843  int i,size=manualModel->GetSizeLstPoints();
844  for (i=0;i<size;i++)
845  {
846  manualPoint * mp = manualModel->GetManualPoint(i);
847  float vecIn[3];
848  float vecOut[3];
849  vecIn[0]=mp->GetX();
850  vecIn[1]=mp->GetY();
851  vecIn[2]=mp->GetZ();
852  t->TransformPoint( vecIn, vecOut );
853  mp->SetPointX( vecOut[0] );
854  mp->SetPointY( vecOut[1] );
855  mp->SetPointZ( vecOut[2] );
856  }
857 
858  _theViewPanel->getSceneManager()->createCopyContourOf( anExistingKName, cloneName, manualModel , append );
859 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxAuiNotebook * wxContourMainFrame::createNotebook ( )

Definition at line 236 of file wxContourMainFrame.cxx.

References m_notebook_style.

Referenced by setVectImages().

237  {
238  wxSize client_size = GetClientSize();
239  wxAuiNotebook* noteBook = new wxAuiNotebook(this, -1, wxPoint(client_size.x, client_size.y), wxSize(430,200), m_notebook_style);
240  wxBitmap page_bmp = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
241  return noteBook;
242  }

Here is the caller graph for this function:

void wxContourMainFrame::createViewPanel ( wxAuiNotebook *  parent)
void wxContourMainFrame::createViewPanel ( wxWindow *  parent)
void wxContourMainFrame::deleteAllContours ( )

Definition at line 578 of file wxContourMainFrame.cxx.

References _instantPanel, _theViewPanel, wxVtkBaseView_SceneManager::GetImageDataSizeZ(), wxInstantChooserPanel::getInstant(), wxContourViewPanel::getSceneManager(), kernelManager, KernelManagerContour::removeAllOutlines(), wxVtkBaseView_SceneManager::removeAllOutlines(), and wxVtkBaseView_SceneManager::removeSceneContours().

Referenced by loadState(), onDeleteAllContours(), and ~wxContourMainFrame().

578  {
579  //JCP 20-10-08 Undo redo implementation
580 
581  wxBusyCursor wait;
582  std::vector<int> tempVector;
583  _instantPanel->getInstant( tempVector );
584 
585 //JCP --08-09-2008 When using a diferent interface the _mbarrangeDeleteAll might not be initialize
586 // the values in GetStart and GetEnd will then not be initialize also.
587 // We use instead the values given when initializing the _deletepanel.
588 
589  //int minZ = _mbarrangeDeleteAll->GetStart();
590  //int maxZ = _mbarrangeDeleteAll->GetEnd();
591  int minZ, maxZ;
592 
593  minZ = 0;
595 
596 //JCP --08-09-2008
597 
601 //JCP --08-09-2008
602  /*
603  if ( (minZ==0) && (maxZ==_mbarrangeDeleteAll->GetMax() ))
604  {
605  _theViewPanel->getSceneManager()->removeSceneContours( );
606  _modelManager->removeAllOutlines();
607  _theViewPanel->getSceneManager()->removeAllOutlines();
608 
609  } else {
610  for ( z=minZ ; z<=maxZ ; z++)
611  {
612  tempVector[1]=z;
613  Instant instant(&tempVector);
614  std::vector<ContourThing**> lstContourThings = this->_modelManager->getOutlinesAtInstant( &instant );
615 
616  sizeLstContourThings = lstContourThings.size();
617  for (ii=0 ; ii<sizeLstContourThings ; ii++)
618  {
619  ContourThing **contourthing = lstContourThings[ii];
620  deleteContour( (*contourthing)->getName() );
621  } //for ii
622  }// for z
623  } // if
624 JCP --08-09-2008 */
625 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::deleteContour ( std::string  theKeyName)

Definition at line 538 of file wxContourMainFrame.cxx.

References _theViewPanel, KernelManagerContour::deleteCModel(), wxContourViewPanel::isEditableCControler(), KernelManagerContour::IsPartOfStaticList(), kernelManager, and wxContourViewPanel::removeFromScene().

Referenced by deleteContours().

538  {
539  /*
540  manualContourModel * cModel;
541  manualViewBaseContour * cViewer;
542  manualContourBaseControler * cControler;
543 
544  ContourWrap_ViewControl *conwrapviewControl = _theViewPanel->getSceneManager()->getContourWrap_ViewControlOf( theKeyName );
545  cControler = conwrapviewControl->getControler();*/
546 
547  //JCP 21 - 11 - 2008
548  bool isedit = _theViewPanel->isEditableCControler(theKeyName);
549  bool ispartofstaticlst = kernelManager->IsPartOfStaticList(theKeyName);
550 
551  if (isedit && ispartofstaticlst)
552  {
553  _theViewPanel->removeFromScene(theKeyName);
554 
555  kernelManager->deleteCModel(theKeyName);
556  //_theViewPanel->getSceneManager()->removeFromScene( theKeyName );
557  //cViewer = conwrapviewControl->getViewer();
558  //_theViewPanel->getSceneManager()->removeWrap( theKeyName );
559  //cControler* conwrapviewControl->getControler();
560  // delete cModel;
561  // delete cViewer;
562  // delete cControler;
563  } // if editable
564 //JCP 21 - 11 - 08
565 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::deleteContours ( std::vector< std::string >  keyNamesVector)

Definition at line 529 of file wxContourMainFrame.cxx.

References deleteContour().

Referenced by onDeleteContour(), and onDeleteContoursActSlice().

530 {
531  int i,size=keyNamesVector.size();
532  for (i=0;i<size;i++)
533  {
534  deleteContour( keyNamesVector[i] );
535  }
536 }

Here is the call graph for this function:

Here is the caller graph for this function:

manualBaseModel * wxContourMainFrame::factoryManualContourModel ( wxPanel *  panel)
private

Definition at line 439 of file wxContourMainFrame.cxx.

Referenced by onCreateContourBullEye().

439  {
440 
441  manualContourModelBullEye *manModelContourBullEye = new manualContourModelBullEye();
442  manualBaseModel *manModelContour=NULL;
443  manModelContour = manModelContourBullEye;
444  if (panel!=NULL){
445  int iCrown,sizeCrowns,iSector,sizeSectors;
446  double radioA,radioB,ang,angDelta ;
447  sizeCrowns = ((PanelBullEyeOptions*)panel)->GetNumberOfCrowns();
448  for ( iCrown=0 ; iCrown<sizeCrowns ; iCrown++ )
449  {
450  sizeSectors = ((PanelBullEyeOptions*)panel)->GetNumberOfSections(iCrown);
451  radioB = ((PanelBullEyeOptions*)panel)->GetRadioOfCrown(iCrown);
452  if (iCrown==sizeCrowns-1)
453  {
454  radioA = 0;
455  } else {
456  radioA = ((PanelBullEyeOptions*)panel)->GetRadioOfCrown(iCrown+1);
457  }
458  radioA=radioA/100.0;
459  radioB=radioB/100.0;
460  for ( iSector=0 ; iSector<sizeSectors ; iSector++ )
461  {
462  ang = ((PanelBullEyeOptions*)panel)->GetAngOfCrownSection(iCrown,iSector);
463  angDelta= ((PanelBullEyeOptions*)panel)->GetAngDeltaOfCrownSection(iCrown);
464  manModelContourBullEye->AddSector(radioA,radioB,ang,angDelta);
465  } // for iSector
466  } // for iCrown
467  } // if _panelBullEyeOptions
468 
469  return manModelContour;
470 }

Here is the caller graph for this function:

wxPanel * wxContourMainFrame::getColorLayerImageViewPanel ( wxWindow *  parent)

Definition at line 3189 of file wxContourMainFrame.cxx.

References _theViewPanel, _viewColorLayerImage, _viewColorLayerImagePanel, wxContourViewPanel::getImageData(), and wxContourViewPanel::getWxVtkBaseView().

Referenced by interfMainPanel::onColorLayerImagePressed().

3190 {
3191  if (_viewColorLayerImagePanel==NULL)
3192  {
3193  double range[2];
3194  _theViewPanel->getImageData()->GetScalarRange(range);
3195  int min = (int)floor (range[0]);
3196  int max = (int)ceil (range[1]);
3197  _viewColorLayerImagePanel = new ColorLayerImageViewPanel( parent, min, max , 1);
3198  _viewColorLayerImage = new ColorLayerImageView();
3199 // _viewColorLayerImage->SetImage( _theViewPanel->getImageData() );
3200  _viewColorLayerImage->SetImage( NULL );
3201  _viewColorLayerImagePanel->SetColorLayerImageView( _viewColorLayerImage );
3202  _viewColorLayerImage->SetwxVtkBaseView( _theViewPanel->getWxVtkBaseView() );
3203  }
3205 }

Here is the call graph for this function:

Here is the caller graph for this function:

int wxContourMainFrame::getColorWindow ( )

Definition at line 2340 of file wxContourMainFrame.cxx.

References _theViewPanel, and wxContourViewPanel::getColorWindow().

Referenced by interfMainPanel::getColorWindow().

2341 {
2342  /*
2343  double range[2];
2344  vtkImageData * img = getImageData();
2345  img->GetScalarRange(range);
2346 
2347  std::cout<<"Val 1: "<<range[0]<<" Val 2: "<<range[1]<<std::endl;
2348 
2349  return (int)range[1];
2350  */
2351  return _theViewPanel->getColorWindow();
2352 }

Here is the call graph for this function:

Here is the caller graph for this function:

manualBaseModel * wxContourMainFrame::getContour ( )

Returns the currently selected contour. If no contour is selected returns NULL

Definition at line 3256 of file wxContourMainFrame.cxx.

References _theViewPanel, KernelManagerContour::getOutlineByKeyName(), wxContourViewPanel::getSelectedObjects(), and kernelManager.

Referenced by interfMainPanel::onPrintLabel().

3257 {
3258  std::vector<std::string> currentSelection = _theViewPanel->getSelectedObjects();
3259 
3260  if(!currentSelection.empty())
3261  {
3262  std::string cloneName = currentSelection [0];
3263  manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(cloneName);//_modelManager->getOutlineByKeyName( cloneName )->getModel();
3264  return manualModel;
3265  }
3266  return NULL;
3267 }

Here is the call graph for this function:

Here is the caller graph for this function:

double wxContourMainFrame::getContourSizeInPixels ( )

Returns the size in pixels of the currently selected contour

Definition at line 3242 of file wxContourMainFrame.cxx.

References _theViewPanel, KernelManagerContour::getOutlineByKeyName(), wxContourViewPanel::getSelectedObjects(), and kernelManager.

Referenced by interfMainPanel::onCalibration().

3243 {
3244  double contourSize = 0;
3245 
3246  std::vector<std::string> currentSelection = _theViewPanel->getSelectedObjects(); if(!currentSelection.empty())
3247  if(!currentSelection.empty())
3248  {
3249  std::string cloneName = currentSelection [0];
3250 
3251  manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(cloneName);//_modelManager->getOutlineByKeyName( cloneName )->getModel();
3252  contourSize = manualModel-> GetPathSize();
3253  }
3254  return contourSize;
3255 }

Here is the call graph for this function:

Here is the caller graph for this function:

std::string wxContourMainFrame::GetFileLocation ( )

Returns the Path of the data persistence file

Definition at line 3296 of file wxContourMainFrame.cxx.

References _fileLocation.

Referenced by onLoad(), and onSave().

3297 {
3298  return _fileLocation;
3299 }

Here is the caller graph for this function:

bool wxContourMainFrame::getIfConceptCheckedAt ( std::string  name,
int  pos 
)

Definition at line 637 of file wxContourMainFrame.cxx.

References _instantPanel, and wxInstantChooserPanel::getIfConceptCheckedAt().

Referenced by wxContourViewPanel::onChangeInstant().

637  {
638  return _instantPanel->getIfConceptCheckedAt( name, pos );
639 }

Here is the call graph for this function:

Here is the caller graph for this function:

vtkImageData * wxContourMainFrame::getImageData ( )

Definition at line 1476 of file wxContourMainFrame.cxx.

References _theViewPanel, and wxContourViewPanel::getImageData().

Referenced by interfMainPanel::getImageData(), SegmentationOneSlice(), and SegmentationOneSliceITK().

1476  {
1477  return _theViewPanel->getImageData();
1478 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::GetImageDataRange ( double *  range)

Definition at line 2127 of file wxContourMainFrame.cxx.

References _theViewPanel, and wxContourViewPanel::GetImageDataRange().

2127  {
2129 }

Here is the call graph for this function:

int wxContourMainFrame::GetImageDataSizeZ ( )

Definition at line 2123 of file wxContourMainFrame.cxx.

References _theViewPanel, and wxContourViewPanel::GetImageDataSizeZ().

Referenced by interfMainPanel::GetImageDataSizeZ().

2123  {
2124  return _theViewPanel->GetImageDataSizeZ();
2125 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxContourMainFrame * wxContourMainFrame::getInstance ( wxWindow *  parent,
wxWindowID  id,
const wxString &  title,
const wxPoint &  pos,
const wxSize &  size,
std::vector< vtkImageData * >  images,
long  style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,
std::string  datadir = "C:/Creatis/creaContoursBin/RelWithDebInfo/" 
)
static

Definition at line 184 of file wxContourMainFrame.cxx.

References instance, and wxContourMainFrame().

185  {
186  if(instance == NULL){
187  instance = new wxContourMainFrame(parent, id, title, pos, size, images, style,datadir);
188  }
189  return instance;
190  }

Here is the call graph for this function:

wxContourMainFrame * wxContourMainFrame::getInstance ( )
static

Definition at line 197 of file wxContourMainFrame.cxx.

References instance.

Referenced by wxContourViewPanel::addNameWrapperToScene(), interfMainPanel::getColorWindow(), interfMainPanel::getImageData(), interfMainPanel::GetImageDataSizeZ(), interfMainPanel::getInstantVector(), interfMainPanel::getOutlinesName(), interfMainPanel::getWindowLevel(), interfMainPanel::hidePanel(), wxContourViewPanel::onActionButtonPressed(), wxContourViewPanel::onActualChange_Bar_Horizontal(), wxContourViewPanel::onActualChange_Bar_Vertical(), interfMainPanel::onBrigthnessColorWindowLevel(), interfMainPanel::onCalibration(), wxContourViewPanel::onChangedDeep(), wxContourViewPanel::onChangeInstant(), interfMainPanel::onColorLayerImagePressed(), wxInstantChooserPanel::onConceptRelease(), interfMainPanel::onCopy(), interfMainPanel::onCreateContourCircle(), interfMainPanel::onCreateContourLine(), interfMainPanel::onCreateContourPoints(), interfMainPanel::onCreateContourPolygon(), interfMainPanel::onCreateContourRectangle(), interfMainPanel::onCreateContoursBullEye(), interfMainPanel::onCreateContourSpline(), interfMainPanel::onDeleteAllContours(), interfMainPanel::onDeleteContour(), interfMainPanel::onDeleteContoursActSlice(), interfMainPanel::onePixelSize(), interfMainPanel::onImport(), interfMainPanel::onInformationContourLabels(), interfMainPanel::onInformationPressed(), interfMainPanel::onInterpolation(), interfMainPanel::onLoad(), interfMainPanel::onMirror(), interfMainPanel::onMirrorAxisHide(), interfMainPanel::onMirrorAxisShow(), interfMainPanel::onMirrorChangeWidth(), interfMainPanel::onMirrorPressed(), interfMainPanel::onPaste(), interfMainPanel::onPrintLabel(), interfMainPanel::onRedo(), interfMainPanel::onRigidPressed(), interfMainPanel::onSave(), interfMainPanel::onSaveResults(), interfMainPanel::onSegmentationAllSlice(), interfMainPanel::onSegmentationOneSlice(), interfMainPanel::onSegmentationOneSliceITK(), interfMainPanel::onSegmentationPressed(), interfMainPanel::onSegmentationPressedITK(), interfMainPanel::onSnakePressed(), interfMainPanel::onSpreadAdd(), interfMainPanel::onSpreadAddAll(), interfMainPanel::onSpreadGo(), interfMainPanel::onThresholdPressed(), interfMainPanel::onUndo(), interfMainPanel::onWidthOfContour(), interfMainPanel::RefreshInterface(), interfMainPanel::resetAppend(), interfMainPanel::SetContourGroup(), interfMainPanel::SetScalarRange(), interfMainPanel::showPanel(), and interfMainPanel::ShowResultImages().

198  {
199  return instance;
200  }
void wxContourMainFrame::getInstantVector ( std::vector< int > &  tempVector)

Definition at line 2495 of file wxContourMainFrame.cxx.

Referenced by interfMainPanel::getInstantVector().

2495  {
2496 
2497 }

Here is the caller graph for this function:

ConceptDataWrap * wxContourMainFrame::getLastConceptData ( )

Definition at line 632 of file wxContourMainFrame.cxx.

References _instantPanel, and wxInstantChooserPanel::getLastConceptData().

Referenced by wxContourViewPanel::onChangeInstant().

632  {
634 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxPanel * wxContourMainFrame::getMaskImageViewPanel ( wxWindow *  parent)

Definition at line 3164 of file wxContourMainFrame.cxx.

References _contourextractdata, _theViewPanel, _viewMaskImage, _viewMaskImagePanel, wxContourViewPanel::getImageData(), and wxContourViewPanel::getWxVtkBaseView().

Referenced by interfMainPanel::onInformationPressed().

3165 {
3166 
3167  if (_viewMaskImagePanel==NULL)
3168  {
3169  _contourextractdata = new ContourExtractData(true);
3171 // double range[2];
3172 // _theViewPanel->getImageData()->GetScalarRange(range);
3173  //int min = (int)floor (range[0]);
3174  //int max = (int)ceil (range[1]);
3175  int min = 254;
3176  int max = 256;
3177  _viewMaskImagePanel = new ThresholdImageViewPanel( parent, -1, -1 , 0);
3178  _viewMaskImage = new ThresholdImageView();
3179  _viewMaskImage->SetImage(_contourextractdata->GetVtkImageMaskResult() );
3180  _viewMaskImage->SetminMaxValue( min, max);
3181  _viewMaskImage->SetBaseColor( 0,0,1 );
3182  _viewMaskImagePanel->SetThresholdImageView( _viewMaskImage );
3183  _viewMaskImage->SetwxVtkBaseView( _theViewPanel->getWxVtkBaseView() );
3184  }
3185  return _viewMaskImagePanel;
3186 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::getMaskValue ( vtkImageData **  mask,
vtkImageData **  value,
int  typeContourGroup,
int  selection,
int  minZ,
int  maxZ 
)

Definition at line 2955 of file wxContourMainFrame.cxx.

References _contourextractdata, _instantPanel, _theViewPanel, KernelManagerContour::ExploseEachModel(), wxContourViewPanel::getImageData(), interfMainPanel::getInstance(), wxInstantChooserPanel::getInstant(), KernelManagerContour::getOutlinesAtInstant(), kernelManager, and interfMainPanel::setStringInfoPanel().

Referenced by changeInstant(), onSaveResults(), and ShowResultImages().

2955  {
2956  wxBusyCursor wait;
2957 //EED01Juillet2009 GenerateContourExtractData();
2958 
2959  //int typeContourGroup = this->_radiolstboxContourGroup->GetSelection();
2960  if (typeContourGroup==3)
2961  {
2962  typeContourGroup=1;
2963  }
2964  _contourextractdata ->SetTypeOperation( typeContourGroup % 3 );
2965 
2966  std::vector<manualBaseModel*> lstManConMod;
2967  std::vector<manualBaseModel*> lstManConModTmp;
2968  std::vector<manualBaseModel*> lstManConModExp;
2969 
2970  std::vector<int> tempVector;
2971  _instantPanel->getInstant( tempVector );
2972 
2973  vtkImageData *imagedata = _theViewPanel->getImageData();
2974  int ext[6];
2975  imagedata->GetExtent(ext);
2976  int sizeZimage = ext[5]-ext[4]+1;
2977  int z;
2978  int ii,sizeLstContourThings;
2979 
2980 
2981  double totalZ;
2982  double porcent;
2983 
2984  wxString tmpString;
2985 
2986 
2987  if (selection==0 ) // actual slice
2988  {
2989  int actualSlice = tempVector[1];
2990  minZ = actualSlice;
2991  maxZ = actualSlice;
2992  }
2993 
2994  totalZ = maxZ-minZ;
2995 
2996 //EED01Juillet2009 _contourextractdata->SetImage( imagedata);
2997 
2998  // cleanning image before range
2999  for (z=0; z<minZ; z++){
3000  _contourextractdata->ResetImageResult(z);
3001  }
3002  // cleanning image after range
3003  for (z=maxZ+1; z<sizeZimage; z++){
3004  _contourextractdata->ResetImageResult(z);
3005  }
3006 
3007 
3008 // For each slice..
3009  for ( z=minZ ; z<=maxZ ; z++)
3010  {
3011 
3012  porcent = 100.0* (z-minZ)/totalZ;
3013  tmpString.Printf(_T("Saving Values"));
3014  tmpString.Printf(_T("%d %c %d/%d %d"), (int)porcent , 37 , z-minZ+1, (int)totalZ ,z);
3016 
3017  //Extraction data from contours of each slice
3018  _contourextractdata->SetZtoBeAnalys( z);
3019 
3020  tempVector[1]=z;
3021  Instant instant(&tempVector);
3022  std::vector<ContourThing**> lstContourThings = kernelManager->getOutlinesAtInstant( &instant );
3023  sizeLstContourThings = lstContourThings.size();
3024 
3025  lstManConMod.clear();
3026  for (ii=0 ; ii<sizeLstContourThings ; ii++)
3027  {
3028  ContourThing **contourthing = lstContourThings[ii];
3029  lstManConMod.push_back( (*contourthing)->getModel() );
3030  }
3031  lstManConModExp = kernelManager->ExploseEachModel( lstManConMod );
3032 
3033 
3034  int iContourGroup,sizeContourGroup;
3035  if (typeContourGroup==3) // contour separete
3036  {
3037  sizeContourGroup=lstManConModExp.size();
3038  } else { // contour AND OR XOR
3039  sizeContourGroup=1;
3040  }
3041 
3042  for( iContourGroup=0 ; iContourGroup<sizeContourGroup ; iContourGroup++ ){
3043  lstManConModTmp.clear();
3044  if (typeContourGroup==3) // contour separete
3045  {
3046  lstManConModTmp.push_back( lstManConModExp[iContourGroup]);
3047  } else { // contour AND OR XOR
3048  lstManConModTmp = lstManConModExp;
3049  }
3050 
3051  _contourextractdata->SetLstManualContourModel( lstManConModTmp );
3052  _contourextractdata->CalculateImageResult(); // with actual Z
3053 
3054  } // for iContourGroup
3055  } // for z
3056 
3057  (*value) = _contourextractdata->GetVtkImageValueResult();
3058  (*mask) = _contourextractdata->GetVtkImageMaskResult();
3059 
3060 }

Here is the call graph for this function:

Here is the caller graph for this function:

int wxContourMainFrame::getNamesWrappingSize ( )

Definition at line 728 of file wxContourMainFrame.cxx.

References KernelManagerContour::getNamesWrappingSize(), and kernelManager.

Referenced by wxContourViewPanel::addNameWrapperToScene().

728  {
730 }

Here is the call graph for this function:

Here is the caller graph for this function:

std::string wxContourMainFrame::getNameWrapping ( int  i)

Definition at line 731 of file wxContourMainFrame.cxx.

References KernelManagerContour::getNameWrapping(), and kernelManager.

Referenced by wxContourViewPanel::addNameWrapperToScene().

731  {
732  return kernelManager->getNameWrapping(i);
733 }

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< std::string > wxContourMainFrame::getOutlinesName ( int  slide)

Definition at line 2499 of file wxContourMainFrame.cxx.

References _instantPanel, wxInstantChooserPanel::getInstant(), KernelManagerContour::getOutlinesNameAtInstant(), and kernelManager.

Referenced by interfMainPanel::getOutlinesName().

2499  {
2500  std::vector<int> tempVector;
2501  _instantPanel->getInstant(tempVector);
2502  //Asignation of slide number should be different ex by name
2503  tempVector[1]=slide;
2504  return kernelManager->getOutlinesNameAtInstant(tempVector);
2505 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxPanel * wxContourMainFrame::getThresholdImageViewPanel ( wxWindow *  parent)

Definition at line 3208 of file wxContourMainFrame.cxx.

References _theViewPanel, _viewThresholdImage, _viewThresholdImagePanel, wxContourViewPanel::getImageData(), and wxContourViewPanel::getWxVtkBaseView().

Referenced by interfMainPanel::onThresholdPressed().

3209 {
3210  if (_viewThresholdImagePanel==NULL)
3211  {
3212  double range[2];
3213  _theViewPanel->getImageData()->GetScalarRange(range);
3214  int min = (int)floor (range[0]);
3215  int max = (int)ceil (range[1]);
3216  _viewThresholdImagePanel = new ThresholdImageViewPanel( parent, min, max , 1);
3217  _viewThresholdImage = new ThresholdImageView();
3219  _viewThresholdImage->SetminMaxValue( min, max);
3220  _viewThresholdImage->SetBaseColor( 1,0,0 );
3221  _viewThresholdImagePanel->SetThresholdImageView( _viewThresholdImage );
3222  _viewThresholdImage->SetwxVtkBaseView( _theViewPanel->getWxVtkBaseView() );
3223  }
3224  return _viewThresholdImagePanel;
3225 }

Here is the call graph for this function:

Here is the caller graph for this function:

int wxContourMainFrame::getType ( )

Returns the type of the currently selected contour

Definition at line 3228 of file wxContourMainFrame.cxx.

References _theViewPanel, KernelManagerContour::getOutlineByKeyName(), wxContourViewPanel::getSelectedObjects(), and kernelManager.

Referenced by interfMainPanel::onCalibration().

3229 {
3230  int tipo = 0;
3231  std::vector<std::string> currentSelection = _theViewPanel->getSelectedObjects();
3232 
3233  if(!currentSelection.empty())
3234  {
3235  std::string cloneName = currentSelection [0];
3236  manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(cloneName);
3237  tipo = manualModel-> GetTypeModel();
3238  }
3239  return tipo;
3240 }

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< vtkImageData * > wxContourMainFrame::getVectImages ( )

Definition at line 192 of file wxContourMainFrame.cxx.

References KernelManagerContour::getVectImages(), and kernelManager.

193  {
194  return kernelManager->getVectImages();
195  }

Here is the call graph for this function:

int wxContourMainFrame::getWindowLevel ( )

Definition at line 2354 of file wxContourMainFrame.cxx.

References _theViewPanel, and wxContourViewPanel::getWindowLevel().

Referenced by interfMainPanel::getWindowLevel().

2355 {
2356  /*
2357  double range[2];
2358  vtkImageData * img = getImageData();
2359  img->GetScalarRange(range);
2360 
2361  std::cout<<"Val 1: "<<range[0]<<" Val 2: "<<range[1]<<std::endl;
2362 
2363  return (int)range[1];
2364  */
2365  return _theViewPanel->getWindowLevel();
2366 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::loadState ( std::string  filename)
private

Definition at line 862 of file wxContourMainFrame.cxx.

References deleteAllContours(), and onLoadContours().

Referenced by onRedo(), and onUndo().

862  {
863 
865  onLoadContours(filename,false);
866 
867  /* EED Borrame
868  char tmp[255];
869  FILE *pFile=fopen(filename.c_str(),"r+");
870 
871  fscanf(pFile,"%s",tmp); // --CreaContour--
872 
873  fscanf(pFile,"%s",tmp); // Version
874  fscanf(pFile,"%s",tmp); // 1.0.3 || 1.0.2 || 1.0.1 || 1.0.0
875 
876  deleteAllContours();
877 
878  loadContours(pFile, false);
879  loadContours(pFile, true);
880 
881  fclose(pFile);
882  */
883 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::Mirror ( int  x,
int  y,
int  z,
int  isovalue,
int  sampling,
int  method 
)
void wxContourMainFrame::onBrigthnessColorWindowLevel ( int  colorwindow,
int  windowlevel 
)

Definition at line 2368 of file wxContourMainFrame.cxx.

References _theViewPanel, wxContourViewPanel::onBrigthnessColorWindowLevel(), and RefreshInterface().

Referenced by interfMainPanel::onBrigthnessColorWindowLevel().

2368  {
2369  _theViewPanel->onBrigthnessColorWindowLevel(colorwindow, windowlevel);
2370 
2371  RefreshInterface();
2372 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onChangeDeep ( int  val)

Definition at line 755 of file wxContourMainFrame.cxx.

References _instantPanel, changeInstant(), and wxInstantChooserPanel::setConceptValue().

Referenced by wxContourViewPanel::onChangedDeep().

755  {
756  _instantPanel->setConceptValue( "Axe Depth", (int)val );
757  changeInstant();
758 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onChangeInstant ( std::string  name,
int  actual 
)

Definition at line 2379 of file wxContourMainFrame.cxx.

References _instantPanel, and wxInstantChooserPanel::setConceptValue().

Referenced by wxContourViewPanel::onActualChange_Bar_Horizontal(), and wxContourViewPanel::onActualChange_Bar_Vertical().

2379  {
2380  _instantPanel->setConceptValue( name, actual );
2381 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onChangeInstantInstantPanel ( std::string  name,
int  value,
int  minshow,
int  maxshow 
)

Definition at line 3108 of file wxContourMainFrame.cxx.

References _instantPanel, _theViewPanel, changeInstant(), wxContourViewPanel::getHorizontalConceptName(), wxInstantChooserPanel::getIfConceptCheckedAt(), wxContourViewPanel::getVerticalConceptName(), wxContourViewPanel::setActualVertical(), and wxContourViewPanel::setHorizontalConcept().

Referenced by wxInstantChooserPanel::onConceptRelease().

3108  {
3109  if( name.compare( _theViewPanel->getVerticalConceptName() ) == 0){
3111  }
3112  else if( name.compare( _theViewPanel->getHorizontalConceptName() ) == 0|| _instantPanel->getIfConceptCheckedAt( name, 0 ) ) {
3113  _theViewPanel->setHorizontalConcept( name, minshow, maxshow, minshow, maxshow, value);
3114  }
3115 
3116  changeInstant();
3117 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onCopy ( )
void wxContourMainFrame::onCreateContourBullEye ( wxPanel *  pan)

Definition at line 389 of file wxContourMainFrame.cxx.

References _instantPanel, _theViewPanel, wxVtkBaseView_SceneManager::configureViewControlTo(), KernelManagerContour::createOutline(), factoryManualContourModel(), wxInstantChooserPanel::getInstant(), wxContourViewPanel::getSceneManager(), wxContourViewPanel::getSpacing(), and kernelManager.

Referenced by interfMainPanel::onCreateContoursBullEye().

390 {
391  //Creating the manualBaseModel and including in the model
392  manualBaseModel * manModelContour = factoryManualContourModel(panel );
393 
394  std::vector<int> instantVector;
395  _instantPanel->getInstant( instantVector );
396  std::string theName = kernelManager->createOutline(manModelContour, instantVector);
397 
398  /*std::vector<int> instantVector;
399  _instantPanel->getInstant( instantVector );
400  std::string theName;
401  theName= _modelManager->createOutline( manModelContour, instantVector );*/
402  bool addedModel = theName.compare("") != 0;//??
403 
404  if( addedModel )
405  {
406  double spc[3];//Si no hay imagen pero hay contornos que spacing se pone por default
408  //Adding the manualContourControler to interface objects structure
409  //Adding the manualViewContour to interface objects structure
410  //_theViewPanel->getSceneManager()->setControlActiveStateOfALL( false );//This call is being done here because if the ROI is created underneath the previously created ROIS will still be active.
411  _theViewPanel->getSceneManager()->configureViewControlTo( theName, manModelContour,spc , 4) ;
412  }
413 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onCreateContourCircle ( )

Definition at line 355 of file wxContourMainFrame.cxx.

References createContour(), and saveState().

Referenced by interfMainPanel::onCreateContourCircle().

355  {
356  //JCP 20-10-08 Undo redo implementation
357  saveState();
358  //JCP 20-10-08 Undo redo implementation
359  createContour( 3 );
360 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onCreateContourLine ( )

Definition at line 362 of file wxContourMainFrame.cxx.

References createContour(), and saveState().

Referenced by interfMainPanel::onCreateContourLine().

362  {
363  //JCP 20-10-08 Undo redo implementation
364  saveState();
365  //JCP 20-10-08 Undo redo implementation
366  createContour( 6 );
367 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onCreateContourPoints ( )

Definition at line 370 of file wxContourMainFrame.cxx.

References createContour(), and saveState().

Referenced by interfMainPanel::onCreateContourPoints().

370  {
371  //JCP 20-10-08 Undo redo implementation
372  saveState();
373  //JCP 20-10-08 Undo redo implementation
374  createContour( 7 );
375 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onCreateContourPolygon ( )

Definition at line 379 of file wxContourMainFrame.cxx.

References createContour(), and saveState().

Referenced by interfMainPanel::onCreateContourPolygon().

379  {
380  //JCP 20-10-08 Undo redo implementation
381  saveState();
382  //JCP 20-10-08 Undo redo implementation
383  createContour( 10 );
384 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onCreateContourRectangle ( )

Definition at line 349 of file wxContourMainFrame.cxx.

References createContour(), and saveState().

Referenced by interfMainPanel::onCreateContourRectangle().

349  {
350  //JCP 20-10-08 Undo redo implementation
351  saveState();
352  //JCP 20-10-08 Undo redo implementation
353  createContour( 2 );
354 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onCreateContourSpline ( )

This methods connect the event in the class interfMainPanel with the world of the appli

Definition at line 341 of file wxContourMainFrame.cxx.

References createContour(), and saveState().

Referenced by interfMainPanel::onCreateContourSpline().

341  {
342 
343  //JCP 20-10-08 Undo redo implementation
344  saveState();
345  //JCP 20-10-08 Undo redo implementation
346  createContour( 1 );
347 
348 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onDeleteAllContours ( )

Definition at line 573 of file wxContourMainFrame.cxx.

References deleteAllContours(), and saveState().

Referenced by interfMainPanel::onDeleteAllContours().

573  {
574  //JCP 20-10-08 Undo redo implementation
575  saveState();
577 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onDeleteContour ( )

Definition at line 477 of file wxContourMainFrame.cxx.

References _theViewPanel, deleteContours(), wxContourViewPanel::getSceneManager(), wxVtkBaseView_SceneManager::getSelectedObjects(), and saveState().

Referenced by wxContourViewPanel::onActionButtonPressed(), and interfMainPanel::onDeleteContour().

477  {
478  //JCP 20-10-08 Undo redo implementation
479  saveState();
480  //JCP 20-10-08 Undo redo implementation
481 
482  std::vector<std::string> lstKeyNameToBeErase;
483  lstKeyNameToBeErase = _theViewPanel->getSceneManager()->getSelectedObjects();
484  deleteContours( lstKeyNameToBeErase );
485 /*JCP 19 - 11 - 08
486  int i,size=_sceneManager->getSelectedObjects().size();
487  for(i=0;i<size;i++)
488  {
489  std::string keyName = _sceneManager->getSelectedObjects()[i];
490  int ispartofstaticlist = this->_modelManager->IsPartOfStaticList( keyName );
491  if ( ispartofstaticlist>=0 )
492  {
493  std::vector<int> tempVector;
494  _instantPanel->getInstant( tempVector );
495  Instant instant(&tempVector);
496  this->_modelManager->ChangeContourOfList(keyName, &instant);
497  }
498  }
499 
500  std::vector<std::string> lstKeyName;
501  std::vector<std::string> lstKeyNameActualSlice;
502  std::vector<std::string> lstKeyNameToBeErase;
503 
504  lstKeyNameToBeErase = _sceneManager->getSelectedObjects();
505  lstKeyNameActualSlice = _sceneManager->GetlstContoursNameActualSlice();
506  int k,kSize=lstKeyNameToBeErase.size();
507  int j,jSize=lstKeyNameActualSlice.size();
508  bool ok;
509  for (k=0;k<kSize; k++)
510  {
511  ok=false;
512  for (j=0;j<jSize; j++)
513  {
514  if (lstKeyNameToBeErase[k]==lstKeyNameActualSlice[j])
515  {
516  ok=true;
517  }
518  } // for j
519  if (ok==true)
520  {
521  lstKeyName.push_back( lstKeyNameToBeErase[k] );
522  } // if ok
523  } // for k
524 
525  deleteContours( lstKeyName );
526 JCP 19 - 11 - 08*/
527 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onDeleteContoursActSlice ( )

Definition at line 567 of file wxContourMainFrame.cxx.

References _theViewPanel, deleteContours(), wxVtkBaseView_SceneManager::GetlstContoursNameActualSlice(), wxContourViewPanel::getSceneManager(), and saveState().

Referenced by interfMainPanel::onDeleteContoursActSlice().

567  {
568  //JCP 20-10-08 Undo redo implementation
569  saveState();
570  //JCP 20-10-08 Undo redo implementation
572 }

Here is the call graph for this function:

Here is the caller graph for this function:

double wxContourMainFrame::onePixelSize ( double  value)

Assigns and returns the value of a pixel in millimeters @ param value Measure of the pixel in millimeters

Definition at line 3291 of file wxContourMainFrame.cxx.

References _onePixelSize.

Referenced by interfMainPanel::onePixelSize().

3292 {
3293  return _onePixelSize = value;
3294 }

Here is the caller graph for this function:

void wxContourMainFrame::onImport ( )

Definition at line 1106 of file wxContourMainFrame.cxx.

References kernelManager, onLoadContours(), and KernelManagerContour::parseOsirixFile().

Referenced by interfMainPanel::onImport().

1106  {
1107  std::string filename, filenamecontours;
1108  wxFileDialog dialog(NULL, _T("Choose a XML Osirix File"), _T(""), _T(""), _T("*.xml"), wxOPEN );
1109 
1110  if (dialog.ShowModal() == wxID_OK)
1111  {
1112  filename = dialog.GetPath().mb_str();
1113  filenamecontours = kernelManager->parseOsirixFile(filename);
1114 
1115  if(filenamecontours.compare("") != 0){
1116  onLoadContours(filenamecontours,true);
1117  }
1118 
1119  }
1120 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onInformationContourLabels ( int  typeContourGroup,
int  selection,
int  minimumZ,
int  maximumZ,
int  grayRangeMin,
int  grayRangeMax 
)

Definition at line 2514 of file wxContourMainFrame.cxx.

References _contourextractdata, _instantPanel, _numberOfVariablesStatistics, interfMainPanel::appendColsInformationPanel(), KernelManagerContour::ExploseEachModel(), interfMainPanel::getInstance(), wxInstantChooserPanel::getInstant(), KernelManagerContour::getOutlinesAtInstant(), kernelManager, interfMainPanel::setCellValueInfoPanel(), interfMainPanel::setColLableInfoPanel(), interfMainPanel::setRowLabelInfoPanel(), and interfMainPanel::setStringInfoPanel().

Referenced by interfMainPanel::onInformationContourLabels().

2515 {
2516 //EED01Juillet2009 GenerateContourExtractData();
2517 
2518  wxString tempString;
2519  int maxContourGroup = 0;
2520 
2521  _contourextractdata ->SetTypeOperation( typeContourGroup % 3 );
2522 
2523  std::vector<manualBaseModel*> lstManConMod;
2524  std::vector<manualBaseModel*> lstManConModTmp;
2525  std::vector<manualBaseModel*> lstManConModExp;
2526  std::vector<double> pLstValue;
2527  std::vector<double> pLstValuePosX;
2528  std::vector<double> pLstValuePosY;
2529  std::vector<double> pLstValuePosZ;
2530 
2531  int resultSize;
2532  int resultGrayRangeCount;
2533  double resultMin;
2534  double resultMax;
2535  double resultAverage;
2536  double resultStandardeviation;
2537 
2538  std::vector<int> tempVector;
2539  _instantPanel->getInstant( tempVector );
2540 
2541 //EED01Juillet2009 vtkImageData *imagedata = _theViewPanel->getImageData();
2542 // int sizeZ = _theViewPanel->GetImageDataSizeZ();
2543  int z;
2544  int ii,sizeLstContourThings;
2545 
2546 
2547  int minZ,maxZ;
2548  double totalZ;
2549  double porcent;
2550  wxString tmpString;
2551 
2552 
2553  if (selection==0 ) // actual slice
2554  {
2555  int actualSlice = tempVector[1];
2556  minZ = actualSlice;
2557  maxZ = actualSlice;
2558  } else { // slice range
2559  minZ = minimumZ;
2560  maxZ = maximumZ;
2561  }
2562 
2563 
2564  totalZ = maxZ-minZ+1;
2565 //EED01Juillet2009 _contourextractdata->SetImage( imagedata);
2566 
2567  _contourextractdata->InitVolumeStatistics();
2568 
2569 // For each slice..
2570  for ( z=minZ ; z<=maxZ ; z++ )
2571  {
2572 
2573  porcent = 100.0* (z-minZ)/totalZ;
2574  tmpString.Printf(_T(" %d %c %d/%d %d"), (int)porcent , 37 , z-minZ+1, (int)totalZ ,z);
2575 
2577  //_staticTextInformation->SetLabel(tmpString);
2578 
2579  //Extraction data from contours of each slice
2580  _contourextractdata->SetZtoBeAnalys(z);
2581 
2582  tempVector[1]=z;
2583  Instant instant(&tempVector);
2584  std::vector<ContourThing**> lstContourThings = kernelManager->getOutlinesAtInstant( &instant );
2585  sizeLstContourThings = lstContourThings.size();
2586 
2587  lstManConMod.clear();
2588  for (ii=0 ; ii<sizeLstContourThings ; ii++)
2589  {
2590  ContourThing **contourthing = lstContourThings[ii];
2591  lstManConMod.push_back( (*contourthing)->getModel() );
2592  }
2593 
2594  lstManConModExp = kernelManager->ExploseEachModel( lstManConMod );
2595 
2596  tempString.Printf(_T("%d - %d"),z, sizeLstContourThings);
2598  //_grid->SetRowLabelValue(z, tempString );
2599 //EED004
2600  int iContourGroup,sizeContourGroup;
2601  if (typeContourGroup==3) // contour separete
2602  {
2603  sizeContourGroup=lstManConModExp.size();
2604  if ( maxContourGroup<sizeContourGroup )
2605  {
2606  maxContourGroup=sizeContourGroup;
2607  }
2608  } else { // contour AND OR XOR
2609  sizeContourGroup=1;
2610  maxContourGroup=1;
2611  }
2612 
2613  int tmpIntA;
2614 
2615  for( iContourGroup=0 ; iContourGroup<sizeContourGroup ; iContourGroup++ ){
2616  lstManConModTmp.clear();
2617 
2618 
2619 
2620  if (typeContourGroup==3) // contour separete
2621  {
2622  lstManConModTmp.push_back( lstManConModExp[iContourGroup]);
2623  } else { // contour AND OR XOR
2624  lstManConModTmp = lstManConModExp;
2625  }
2626 
2627  _contourextractdata->SetLstManualContourModel( lstManConModTmp );
2628  _contourextractdata->SetScalarRange(grayRangeMin,grayRangeMax);
2629 
2630  pLstValue.clear();
2631  pLstValuePosX.clear();
2632  pLstValuePosY.clear();
2633  pLstValuePosZ.clear();
2634 
2635 
2636  int numberOfPixels;
2637  _contourextractdata->GetValuesInsideCrown( &numberOfPixels,
2638  &pLstValue,
2639  &pLstValuePosX,
2640  &pLstValuePosY,
2641  &pLstValuePosZ);
2642 
2643  resultSize=numberOfPixels;
2644  // Statistics of each slice.
2645  _contourextractdata->Statistics( &pLstValue,
2646  grayRangeMin,
2647  grayRangeMax,
2648  &resultGrayRangeCount,
2649  &resultSize,
2650  &resultMin,
2651  &resultMax,
2652  &resultAverage,
2653  &resultStandardeviation);
2654 
2655  if (interfMainPanel::getInstance()->getNumberColsInformationPanel()<_numberOfVariablesStatistics*(iContourGroup+1) )
2656  {
2658  }
2659 
2660  tmpIntA=_numberOfVariablesStatistics*iContourGroup ;
2661 
2662  tempString.Printf(_T("%d"),numberOfPixels);
2663 
2664  interfMainPanel::getInstance()->setCellValueInfoPanel(z, tmpIntA, tempString);
2665 
2666  tempString.Printf(_T("%d"),resultGrayRangeCount);
2667  interfMainPanel::getInstance()->setCellValueInfoPanel(z, tmpIntA+1, tempString);
2668 
2669  tempString.Printf(_T("%f"),resultMin);
2670  interfMainPanel::getInstance()->setCellValueInfoPanel(z, tmpIntA+2, tempString);
2671 
2672  tempString.Printf(_T("%f"),resultMax);
2673  interfMainPanel::getInstance()->setCellValueInfoPanel(z, tmpIntA+3, tempString);
2674 
2675  tempString.Printf(_T("%f"),resultAverage);
2676  interfMainPanel::getInstance()->setCellValueInfoPanel(z, tmpIntA+4, tempString);
2677 
2678  tempString.Printf(_T("%f"),resultStandardeviation);
2679  interfMainPanel::getInstance()->setCellValueInfoPanel(z, tmpIntA+5, tempString);
2680 
2681 
2682  } // for iContourGroup
2683  } // for z
2684 
2685  // Print Volume Statistics
2686 
2687 
2688  int vol_rCountRange;
2689  int vol_rsize;
2690  double vol_minValue;
2691  double vol_maxValue;
2692  double vol_average;
2693  double vol_standardeviation;
2694 
2695  if (selection!=0 ) // actual slice
2696  {
2697 
2698  _contourextractdata->GetVolumeStatistics(&vol_rCountRange, &vol_rsize,
2699  &vol_minValue, &vol_maxValue,
2700  &vol_average, &vol_standardeviation);
2701 
2702  interfMainPanel::getInstance()->setRowLabelInfoPanel(maxZ+2, _T("Total:"));
2703 
2704  tempString.Printf(_T("%d"),vol_rsize);
2705  interfMainPanel::getInstance()->setCellValueInfoPanel(maxZ+2, 0, tempString);
2706 
2707  tempString.Printf(_T("%d"),vol_rCountRange);
2708  interfMainPanel::getInstance()->setCellValueInfoPanel(maxZ+2, 1, tempString);
2709 
2710  tempString.Printf(_T("%f"),vol_minValue);
2711  interfMainPanel::getInstance()->setCellValueInfoPanel(maxZ+2, 2, tempString);
2712 
2713  tempString.Printf(_T("%f"),vol_maxValue);
2714  interfMainPanel::getInstance()->setCellValueInfoPanel(maxZ+2, 3, tempString);
2715 
2716  tempString.Printf(_T("%f"),vol_average);
2717  interfMainPanel::getInstance()->setCellValueInfoPanel(maxZ+2, 4, tempString);
2718 
2719  tempString.Printf(_T("%f"),vol_standardeviation);
2720  interfMainPanel::getInstance()->setCellValueInfoPanel(maxZ+2, 5, tempString);
2721  }
2722  //-----------------------------------------
2723 
2724  int iTitleGroup;
2725  wxString tmpTitleString;
2726  int tmpIntB;
2727  for ( iTitleGroup=0 ; iTitleGroup<maxContourGroup ; iTitleGroup++ )
2728  {
2729  tmpIntB =_numberOfVariablesStatistics*iTitleGroup;
2730  tmpTitleString.Printf(_T("%d-Size Data"),iTitleGroup);
2731  interfMainPanel::getInstance()->setColLableInfoPanel(tmpIntB + 0, tmpTitleString);
2732 
2733  interfMainPanel::getInstance()->setColLableInfoPanel(tmpIntB + 0, tmpTitleString );
2734  interfMainPanel::getInstance()->setColLableInfoPanel( tmpIntB + 1, _T("Size Range") );
2735  interfMainPanel::getInstance()->setColLableInfoPanel( tmpIntB + 2, _T("Min") );
2736  interfMainPanel::getInstance()->setColLableInfoPanel( tmpIntB + 3, _T("Max") );
2737  interfMainPanel::getInstance()->setColLableInfoPanel( tmpIntB + 4, _T("Average") );
2738  interfMainPanel::getInstance()->setColLableInfoPanel( tmpIntB + 5, _T("St.Dev.") );
2739  interfMainPanel::getInstance()->setColLableInfoPanel( tmpIntB + 6, _T(" ") );
2740  }// for title
2742 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onInsertCalculation ( manualBaseModel *  manualModel)

Calculates the size of the contour received as a parameter. Uses the measure of a pixel in millimeters.

Parameters
manualBaseModelCurrently selected contour

Definition at line 3283 of file wxContourMainFrame.cxx.

References interfMainPanel::getInstance(), and interfMainPanel::GetPixelValue().

3284 {
3285  double sizeInPixel = manualModel ->GetPathSize();
3286  double onePixelRealSize = interfMainPanel::getInstance()->GetPixelValue();;
3287  double realContourSize = sizeInPixel*onePixelRealSize;
3288  manualModel ->SetRealSize(realContourSize);
3289 }

Here is the call graph for this function:

void wxContourMainFrame::onInterpolation ( bool  interpolate)

Definition at line 2374 of file wxContourMainFrame.cxx.

References _theViewPanel, wxContourViewPanel::onInterpolation(), and RefreshInterface().

Referenced by interfMainPanel::onInterpolation().

2374  {
2375  _theViewPanel->onInterpolation(interpolate);
2376  RefreshInterface();
2377 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onLoad ( )

Definition at line 966 of file wxContourMainFrame.cxx.

References GetFileLocation(), and onLoadContours().

Referenced by wxContourViewPanel::onActionButtonPressed(), and interfMainPanel::onLoad().

967 {
968  std::string fileNameContourROI = GetFileLocation();
969 //CMRU 03-09-09-----------------------------------------------------------------------------------------------
970  if(GetFileLocation().empty())
971  {
972 //------------------------------------------------------------------------------------------------------------
973  wxFileDialog dialog(NULL, _T("Choose a file"), _T(""), _T(""), _T("*.roi"), wxOPEN );
974  if (dialog.ShowModal() == wxID_OK)
975  {
976  fileNameContourROI = (const char *)(dialog.GetPath().mb_str());
977  }
978  }
979 
980  onLoadContours(fileNameContourROI,true);
981 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onLoadContours ( std::string  fileNameContourROI,
bool  interactiveInterface 
)
private

Definition at line 1024 of file wxContourMainFrame.cxx.

References _onePixelSize, _theViewPanel, _tmpReadFileTypeOfTransformation, changeInstant(), wxContourViewPanel::getSceneManager(), openContours(), readDimSpc(), wxVtkBaseView_SceneManager::removeSceneContours(), and SetZForAllContours().

Referenced by loadState(), onImport(), and onLoad().

1025 {
1026  char tmp[255];
1027  char tmpD[255];
1028 
1029  FILE *pFile =fopen(fileNameContourROI.c_str(),"r+");
1030 
1031 
1032 //CMRU 03-09-09- ----------------------------------------------------------------------------------------------
1033  if(pFile != NULL)
1034  {
1035 //------------------------------------------------------------------------------------------------------------
1036  fileNameContourROI.append("data");
1037  FILE *pFileData=fopen(fileNameContourROI.c_str(),"r+");
1038  if(pFileData != NULL)
1039  {
1040  fscanf(pFileData,"%s",tmpD); // --CreaContour--
1041  fscanf(pFileData,"%s",tmpD); // Version
1042  fscanf(pFileData,"%s",tmpD); // 1.0.3 || 1.0.2 || 1.0.1 || 1.0.0
1043 
1044  fscanf(pFileData,"%s",tmpD); // onePixelSize
1045  fscanf(pFileData,"%s",tmpD); // #
1046  _onePixelSize = atof(tmpD);
1047  fscanf(pFileData,"%s",tmpD); // NumberOfContours
1048  fscanf(pFileData,"%s",tmpD); // #
1049  }
1050 
1051  fscanf(pFile,"%s",tmp); // --CreaContour--
1052 
1053  fscanf(pFile,"%s",tmp); // Version
1054  fscanf(pFile,"%s",tmp); // 1.0.3 || 1.0.2 || 1.0.1 || 1.0.0
1055  std::string version(tmp);
1056 
1057 
1058 printf("EED wxContourMainFrame::onLoadContours version%s \n", version.c_str() );
1059 
1060 
1061  //AD:02-06-09
1063  if (version=="1.0.3")
1064  {
1065  readDimSpc(pFile,interactiveInterface); // DimSpc interactive ON
1066  openContours(pFile,pFileData,false);
1067  openContours(pFile,pFileData,true); //Load StaticContours
1068  }
1069 
1070  if (version=="1.0.2")
1071  {
1072 //EED001
1073  readDimSpc(pFile,interactiveInterface); // DimSpc interactive ON
1074  openContours(pFile,pFileData,false);
1075  readDimSpc(pFile,false); // DimSpc interactive OFF
1076  openContours(pFile,pFileData,true); // Load StaticContours
1077  SetZForAllContours(-900);
1078  }
1079 
1080  //AD:02-06-09
1081  else if (version=="1.0.1")
1082  {
1083  openContours(pFile,pFileData,false); //Skips ImageDimensions and ImageSpacing
1084  openContours(pFile,pFileData,true); //Load StaticContours, skips ImageDimensions and ImageSpacing
1085  }
1086 
1087  //AD:02-06-09
1088  else if (version=="1.0.0")
1089  {
1090  openContours(pFile,pFileData,false); //Skips ImageDimensions and ImageSpacing
1091  }
1092 
1093  fclose(pFile);
1094 
1095  if(pFileData != NULL)
1096  {
1097  fclose(pFileData);
1098  }
1099  }
1101  changeInstant();
1102 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onMirror ( )

Definition at line 2267 of file wxContourMainFrame.cxx.

References _instantPanel, _performingOperation, _theViewPanel, COPY, createMirrorContourOf(), wxInstantChooserPanel::getInstant(), PerformingOperation::getKeyNamesOperationElems(), wxContourViewPanel::getSelectedObjects(), PerformingOperation::getStartCommand(), PerformingOperation::reset(), saveState(), PerformingOperation::setEndOperationInstantVector(), PerformingOperation::setKeyNamesOperationElems(), PerformingOperation::setStartCommand(), and PerformingOperation::setStartOperationInstantVector().

Referenced by interfMainPanel::onMirror().

2268 {
2269  //AD:02-09
2270  std::vector<std::string> currentSelection = _theViewPanel->getSelectedObjects();
2271  std::vector<std::string> filterCurrentSelection;
2272 
2273  std::vector<int> tempVector;
2274  _instantPanel->getInstant( tempVector );
2278  _performingOperation->setKeyNamesOperationElems( currentSelection );
2279 
2280  char theStartCommand = _performingOperation->getStartCommand();
2281  if ( theStartCommand == COPY )
2282  {
2283  //JCP 20-10-08 Undo redo implementation
2284  saveState();
2285  //JCP 20-10-08 Undo redo implementation
2286  std::vector<int> tempVector;
2287  _instantPanel->getInstant( tempVector );
2289  std::vector<std::string> elems = _performingOperation->getKeyNamesOperationElems();
2290  int i,size = elems.size();
2291  for( i=0; i<size; i++ )
2292  {
2293  createMirrorContourOf( elems[i], tempVector, i>0 );
2294  }
2295  }
2296 
2297  //deleteContour( _refName );
2298  //_refName = "";
2299 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onPaste ( )

Definition at line 772 of file wxContourMainFrame.cxx.

References _instantPanel, _performingOperation, COPY, createCopyContourOf(), wxInstantChooserPanel::getInstant(), PerformingOperation::getKeyNamesOperationElems(), PerformingOperation::getStartCommand(), saveState(), and PerformingOperation::setEndOperationInstantVector().

Referenced by wxContourViewPanel::onActionButtonPressed(), and interfMainPanel::onPaste().

772  {
773 
774 
775  char theStartCommand = _performingOperation->getStartCommand();
776  if ( theStartCommand == COPY )
777  {
778  //JCP 20-10-08 Undo redo implementation
779  saveState();
780  //JCP 20-10-08 Undo redo implementation
781  std::vector<int> tempVector;
782  _instantPanel->getInstant( tempVector );
784  std::vector<std::string> elems = _performingOperation->getKeyNamesOperationElems();
785  int i,size = elems.size();
786  for( i=0; i<size; i++ )
787  {
788  createCopyContourOf( elems[i], tempVector, i>0 );
789  }
790  }
791 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onPrintLabel ( wxString  label,
manualBaseModel *  manualModel 
)

Associates the String parameter with the contour

Parameters
labelLabel entered by the user
manualBaseModelCurrently selected contour

Definition at line 3268 of file wxContourMainFrame.cxx.

Referenced by interfMainPanel::onPrintLabel().

3269 {
3270  std::string labelAscii(label.ToAscii());
3271  int pos = labelAscii.find(" ");
3272 
3273  int j;
3274 
3275  for (j=0 ; pos != string::npos;j++)
3276  {
3277  labelAscii.replace( pos, 1, "_" );
3278  pos= labelAscii.find(" ");
3279  }
3280 
3281  manualModel -> SetLabel(labelAscii);
3282 }

Here is the caller graph for this function:

void wxContourMainFrame::onRedo ( )

Definition at line 801 of file wxContourMainFrame.cxx.

References kernelManager, loadState(), and KernelManagerContour::onRedo().

Referenced by wxContourViewPanel::onActionButtonPressed(), and interfMainPanel::onRedo().

801  {
802  std::string filename;
803  if(kernelManager->onRedo(filename)){
804  loadState(filename);
805  }
806 
807 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onRigidPressed ( )

Definition at line 2309 of file wxContourMainFrame.cxx.

References _instantPanel, _theViewPanel, KernelManagerContour::changeContourOfManager(), wxInstantChooserPanel::getInstant(), wxContourViewPanel::getSelectedObjects(), kernelManager, and saveState().

Referenced by interfMainPanel::onRigidPressed().

2309  {
2310  std::vector<std::string> currentSelection = _theViewPanel->getSelectedObjects();
2311  int elementsSelected = currentSelection.size();
2312 
2313  if ( elementsSelected >= 1 ){
2314  //JCP 20-10-08 Undo redo implementation
2315  saveState();
2316  //JCP 20-10-08 Undo redo implementation
2317 
2318  std::vector<int> tempVector;
2319  _instantPanel->getInstant( tempVector );
2320  Instant instant(&tempVector);
2321 
2322  int i , size=currentSelection.size();
2323  for ( i=0 ; i<size ; i++ )
2324  {
2325  kernelManager->changeContourOfManager(currentSelection[i], &instant);
2326  } // i
2327  }
2328 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onSave ( )

Definition at line 1134 of file wxContourMainFrame.cxx.

References GetFileLocation(), kernelManager, saveFileWithContours(), and KernelManagerContour::setCurrentFileName().

Referenced by interfMainPanel::onSave(), and saveFileWithContoursAutomatique().

1134  {
1135 //CMRU 03-09-09-----------------------------------------------------------------------------------------------
1136  if(GetFileLocation().empty())
1137  {
1138 //------------------------------------------------------------------------------------------------------------
1139  wxFileDialog dialog(NULL, _T("Choose a file"), _T(""), _T(""), _T("*.roi"), wxSAVE );
1140  if (dialog.ShowModal() == wxID_OK)
1141  {
1142  std::string fileNameContourROI = (const char *)(dialog.GetPath().mb_str());
1143  kernelManager->setCurrentFileName(fileNameContourROI);
1144  saveFileWithContours( fileNameContourROI );
1145  }
1146  }
1147 //CMRU 03-09-09-----------------------------------------------------------------------------------------------
1148  else
1149  {
1150  std::cout<<"Nombre del archivo: "<<GetFileLocation()<<std::endl;
1151  std::string fileNameContourROI = GetFileLocation();
1152  std::cout<<"Nombre del archivo: "<<fileNameContourROI<<std::endl;
1153  kernelManager->setCurrentFileName(fileNameContourROI);
1154  saveFileWithContours( fileNameContourROI);
1155  }
1156 //------------------------------------------------------------------------------------------------------------
1157 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onSaveResults ( std::string  directory,
std::string  namefile,
std::string  filename,
int  typeContourGroup,
int  selection,
int  minZ,
int  maxZ,
bool  XYZValues,
bool  contourImage,
bool  statistics 
)

Definition at line 2745 of file wxContourMainFrame.cxx.

References _instantPanel, _numberOfVariablesStatistics, interfMainPanel::getCellValue(), interfMainPanel::getInstance(), wxInstantChooserPanel::getInstant(), getMaskValue(), interfMainPanel::getNumberColsInformationPanel(), SaveImageResult(), and SaveValuesXYZ().

Referenced by interfMainPanel::onSaveResults().

2747 {
2748  if (XYZValues)
2749  {
2750  SaveValuesXYZ( directory , namefile, typeContourGroup );
2751  }
2752 
2753  if (contourImage)
2754  {
2755  vtkImageData * mask;
2756  vtkImageData * value;
2757  this->getMaskValue(&mask, &value, typeContourGroup,selection,minZ,maxZ);
2758  this->SaveImageResult( directory , namefile, mask, value);
2759  }
2760 
2761  if (statistics)
2762  {
2763  std::ostringstream name;
2764  name << filename << ".xls";
2765 
2766 
2767  FILE *pFile=fopen(name.str().c_str(),"w+");
2768 
2769 
2770  wxString tmpString;
2771  int i,j,maxX;
2772 
2773 // int sizeZ = _theViewPanel->GetImageDataSizeZ();
2774 // int maxY=sizeZ+2;
2775 
2776  maxX= interfMainPanel::getInstance()->getNumberColsInformationPanel();//this->_grid->GetNumberCols();
2777 
2778  // -- Title --
2779  int iTitle,sizeTitle = (maxX / _numberOfVariablesStatistics);
2780  for ( iTitle=0; iTitle<sizeTitle ; iTitle++)
2781  {
2782  // fprintf(pFile,"-- \t %d-Size \t SizeRange \t Min \t Max \t Ave \t StDv \t" , iTitle,tmpString.c_str() );
2783  fprintf(pFile,"slice\t %d-Size \t SizeRange \t Min \t Max \t Ave \t StDv \t" , iTitle );
2784  }
2785  fprintf(pFile,"\n\n" );
2786 
2787 
2788 
2789  if (selection==0 ) // actual slice
2790  {
2791  std::vector<int> tempVector;
2792  _instantPanel->getInstant( tempVector );
2793  int actualSlice = tempVector[1];
2794  minZ = actualSlice;
2795  maxZ = actualSlice;
2796  }
2797 
2798  // Stadistics...
2799  for ( j=minZ; j<=maxZ ; j++)
2800  {
2801  fprintf(pFile,"%d\t" , j );
2802  for (i=0 ; i<maxX ; i++){
2803  tmpString = interfMainPanel::getInstance()->getCellValue(j, i);//_grid->GetCellValue( j , i );
2804  fprintf(pFile,"%s\t" , (const char *)(tmpString.mb_str()) );
2805  } // for i
2806  fprintf(pFile,"\n" );
2807  } // for j
2808 
2809 
2810  // Total of stadistics.....
2811  if (selection!=0)
2812  {
2813  fprintf(pFile,"\n Total:\t" );
2814  for (i=0 ; i<maxX ; i++){
2815  tmpString = interfMainPanel::getInstance()->getCellValue(maxZ+2, i);//_grid->GetCellValue( maxZ+2 , i );
2816  fprintf(pFile,"%s\t" , (const char *)(tmpString.mb_str()) );
2817  } // for i
2818  fprintf(pFile,"\n" );
2819  }
2820 
2821  fclose(pFile);
2822  }
2823 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onSegmentationAllSlice ( int  minZ,
int  maxZ,
int  isovalue,
int  sampling,
int  method 
)

Definition at line 2131 of file wxContourMainFrame.cxx.

References _theViewPanel, interfMainPanel::getInstance(), wxContourViewPanel::GetX(), wxContourViewPanel::GetY(), RefreshInterface(), saveState(), SegmentationOneSlice(), and interfMainPanel::setLabelSegmentationPanelVTK().

Referenced by interfMainPanel::onSegmentationAllSlice().

2131  {
2132  //JCP 20-10-08 Undo redo implementation
2133  saveState();
2134  //JCP 20-10-08 Undo redo implementation
2135 
2136  wxBusyCursor wait;
2137  int x = _theViewPanel->GetX();
2138  int y = _theViewPanel->GetY();
2139  int z;
2140  double porcent;
2141  wxString tmpString;
2142  double totalZ = maxZ-minZ+1;
2143  for( z=minZ ; z<=maxZ ; z++ )
2144  {
2145  porcent = 100.0* (z-minZ)/totalZ;
2146  tmpString.Printf(_T(" %d %c %d/%d %d"), (int)porcent , 37 , z-minZ+1, (int)totalZ,z );
2148  //_staticTextSegmentation->SetLabel(tmpString);
2149  SegmentationOneSlice( x,y,z,isovalue, sampling,method );
2150  }
2152  RefreshInterface();
2153 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onSegmentationOneSlice ( int  isovalue,
int  sampling,
int  method 
)

Definition at line 1938 of file wxContourMainFrame.cxx.

References _theViewPanel, wxContourViewPanel::GetX(), wxContourViewPanel::GetY(), wxContourViewPanel::GetZ(), RefreshInterface(), saveState(), and SegmentationOneSlice().

Referenced by interfMainPanel::onSegmentationOneSlice().

1938  {
1939 
1940  //JCP 20-10-08 Undo redo implementation
1941  saveState();
1942  //JCP 20-10-08 Undo redo implementation
1943 
1944  wxBusyCursor wait;
1945  int x = _theViewPanel->GetX();
1946  int y = _theViewPanel->GetY();
1947  int z = _theViewPanel->GetZ();
1948  SegmentationOneSlice( x,y,z,isovalue, sampling, method );
1949  RefreshInterface();
1950 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onSegmentationOneSliceITK ( wxString  distance,
wxString  sigma,
wxString  alfa,
wxString  beta,
wxString  propagation,
wxString  iterations,
wxString  inflation 
)

Definition at line 1480 of file wxContourMainFrame.cxx.

References _theViewPanel, wxContourViewPanel::GetX(), wxContourViewPanel::GetY(), wxContourViewPanel::GetZ(), RefreshInterface(), saveState(), and SegmentationOneSliceITK().

Referenced by interfMainPanel::onSegmentationOneSliceITK().

1481 {
1482  //JCP 20-10-08 Undo redo implementation
1483  saveState();
1484  //JCP 20-10-08 Undo redo implementation
1485 
1486  wxBusyCursor wait;
1487  int x = _theViewPanel->GetX();
1488  int y = _theViewPanel->GetY();
1489  int z = _theViewPanel->GetZ();
1490  SegmentationOneSliceITK( x,y,z,distance, sigma, alfa, beta, propagation, iterations, inflation);
1491  RefreshInterface();
1492 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onSnakePressed ( )

Definition at line 3119 of file wxContourMainFrame.cxx.

References _instantPanel, _theViewPanel, wxInstantChooserPanel::getInstant(), and wxContourViewPanel::GetPointsOfActualContour().

Referenced by interfMainPanel::onSnakePressed().

3119  {
3120  std::vector<double> vecX;
3121  std::vector<double> vecY;
3122  std::vector<double> vecZ;
3123  _theViewPanel->GetPointsOfActualContour( &vecX , &vecY , &vecZ );
3124 
3125  if (vecX.size()!=0){
3126  std::vector<int> tempVector;
3127  _instantPanel->getInstant( tempVector );
3128  int i,size=vecZ.size();
3129  int actualSlice = tempVector[1];
3130  for ( i=0 ; i<size ; i++ )
3131  {
3132  vecZ[i] = actualSlice;
3133  } // for
3134 
3135  wxDialog* dialog = new wxDialog(this, -1, wxString(_T("Snake")));
3136  wxPanel* panel = new wxPanel(dialog,-1);
3137  // wxStaticText* sttext = new wxStaticText(panel, -1, wxString(_T("Panel para snake")));
3138  new wxStaticText(panel, -1, wxString(_T("Panel para snake")));
3139  dialog->ShowModal();
3140  } // if
3141 
3142 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onSpreadAdd ( )

Definition at line 2390 of file wxContourMainFrame.cxx.

References _instantPanel, _theViewPanel, interfMainPanel::appendStringSpread(), interfMainPanel::getInstance(), wxInstantChooserPanel::getInstant(), wxContourViewPanel::GetPointsOfActualContour(), kernelManager, and KernelManagerContour::onSpreadAdd().

Referenced by interfMainPanel::onSpreadAdd().

2390  {
2391  std::vector<double> vecX;
2392  std::vector<double> vecY;
2393  std::vector<double> vecZ;
2394  _theViewPanel->GetPointsOfActualContour(&vecX , &vecY , &vecZ );
2395  std::vector<int> tempVector;
2396  _instantPanel->getInstant( tempVector );
2397  std::string val = kernelManager->onSpreadAdd(&vecX , &vecY , &vecZ, tempVector);
2399 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onSpreadAddAll ( )

Definition at line 2402 of file wxContourMainFrame.cxx.

References _instantPanel, interfMainPanel::appendStringSpread(), interfMainPanel::GetImageDataSizeZ(), interfMainPanel::getInstance(), wxInstantChooserPanel::getInstant(), ContourThing::getModel(), KernelManagerContour::getOutlinesAtInstant(), kernelManager, and KernelManagerContour::onSpreadAdd().

Referenced by interfMainPanel::onSpreadAddAll().

2402  {
2403 //EED02
2404  std::vector<int> tempVector;
2405  _instantPanel->getInstant( tempVector );
2406  int minZ,maxZ;
2407  minZ = 0;
2409  int z;
2410  int sizeLstContourThings;
2411  for ( z=minZ ; z<=maxZ ; z++ )
2412  {
2413  tempVector[1]=z;
2414  Instant instant(&tempVector);
2415  std::vector<ContourThing**> lstContourThings = kernelManager->getOutlinesAtInstant( &instant );
2416  sizeLstContourThings = lstContourThings.size();
2417  if (sizeLstContourThings>=1)
2418  {
2419  std::vector<double> vecX;
2420  std::vector<double> vecY;
2421  std::vector<double> vecZ;
2422  ContourThing **contourthing = lstContourThings[0];
2423  manualBaseModel *cModel = (*contourthing)->getModel();
2424  int i,size = cModel->GetNumberOfPointsSpline();
2425  double x,y,z;
2426  for (i=0; i<size; i++)
2427  {
2428  cModel->GetSpline_i_Point(i, &x, &y, &z);
2429  vecX.push_back(x);
2430  vecY.push_back(y);
2431  vecZ.push_back(z);
2432  } // for i
2433  std::string val = kernelManager->onSpreadAdd(&vecX , &vecY , &vecZ, tempVector);
2435  }// if sizeLstContourThings
2436  } // for z
2437 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onSpreadGo ( int  type)

Definition at line 2440 of file wxContourMainFrame.cxx.

References _instantPanel, _theViewPanel, KernelManagerContour::CalculeSplinePropagation(), wxContourViewPanel::configureViewControlTo(), interfMainPanel::getInstance(), wxInstantChooserPanel::getInstant(), KernelManagerContour::getMaxMinZ(), KernelManagerContour::GetPoints(), wxContourViewPanel::getSpacing(), KernelManagerContour::intToString(), kernelManager, saveState(), and interfMainPanel::setStringSpread().

Referenced by interfMainPanel::onSpreadGo().

2440  {
2441  //JCP 20-10-08 Undo redo implementation
2442  saveState();
2443  //JCP 20-10-08 Undo redo implementation
2444  wxBusyCursor wait;
2445  std::vector<double> vecCtrlPointX;
2446  std::vector<double> vecCtrlPointY;
2447  std::vector<double> vecCtrlPointZ;
2448  double minZ,maxZ;
2449  int z;
2450 
2451  std::vector<int> tempVector;
2452  _instantPanel->getInstant( tempVector );
2453 // tempVector[1];
2454 
2455  kernelManager->getMaxMinZ(&minZ,&maxZ);
2456 //JSTG_16-07-08_----------------------------------------------------------------
2457  //_contourPropagation->setInterpolationNumber(maxZ-minZ+1);
2459 
2460  double totalZ = maxZ-minZ+1;
2461  double porcent;
2462  wxString tmpString;
2463 //--------------------------------------------------------------------
2464  for ( z=(int)minZ ; z<=(int)maxZ ; z++ )
2465  {
2466  porcent = 100.0* (z-minZ)/totalZ;
2467  int numero = (int)(z-minZ+1)/(int)totalZ;
2468  std::string stringtemp = " "+kernelManager->intToString(porcent)+"% "+kernelManager->intToString(numero)+" "+kernelManager->intToString(z);
2469 
2471 
2472  int typeofcontour = 1;
2473  std::string theName;
2474  manualBaseModel* manModelContour = kernelManager->GetPoints(z, type, &vecCtrlPointX,&vecCtrlPointY,&vecCtrlPointZ, theName,typeofcontour, tempVector);
2475 
2476  if( manModelContour!=NULL ){
2477  double spc[3];//Si no hay imagen pero hay contornos que spacing se pone por default
2478  this->_theViewPanel->getSpacing(spc);
2479  //Adding the manualContourControler to interface objects structure
2480  //Adding the manualViewContour to interface objects structure
2481  //_theViewPanel->getSceneManager()->setControlActiveStateOfALL( false );//This call is being done here because if the ROI is created underneath the previously created ROIS will still be active.
2482  _theViewPanel->configureViewControlTo( theName, manModelContour,spc,typeofcontour ) ;
2483  } // if addedModel
2484  }
2485  if(z > maxZ){
2486  porcent = 100.0;
2487  int numero = (int)(z-minZ+1)/(int)totalZ;
2488  std::string stringtemp = " "+kernelManager->intToString(porcent)+"% "+kernelManager->intToString(numero)+" "+kernelManager->intToString(z);
2489 
2491  }// for z
2492  //RefreshInterface();
2493 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onTest ( )

Definition at line 1121 of file wxContourMainFrame.cxx.

1121  {
1122  std::string filename, filenamecontours;
1123  wxFileDialog dialog(NULL, _T("Choose a File"), _T(""), _T(""), _T("*.*"), wxOPEN );
1124 
1125  if (dialog.ShowModal() == wxID_OK)
1126  {
1127  filename = dialog.GetPath().mb_str();
1128  std::cout << "This is the filename: " << filename << std::endl;
1129  }
1130 }
void wxContourMainFrame::onUndo ( )

Definition at line 792 of file wxContourMainFrame.cxx.

References kernelManager, loadState(), KernelManagerContour::onUndo(), KernelManagerContour::onUndoSaveFile(), and saveFileWithContours().

Referenced by wxContourViewPanel::onActionButtonPressed(), and interfMainPanel::onUndo().

792  {
793  std::string filename;
794  if(kernelManager->onUndoSaveFile(filename)){
795  saveFileWithContours(filename);
796  }
797  if(kernelManager->onUndo(filename)){
798  loadState(filename);
799  }
800 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::onWidthOfContour ( double  width)

Definition at line 2330 of file wxContourMainFrame.cxx.

References _theViewPanel, RefreshInterface(), wxContourViewPanel::removeSceneContours(), and wxContourViewPanel::SetWidthContour().

Referenced by interfMainPanel::onWidthOfContour().

2330  {
2331 
2334 
2335  //_theViewPanel->getSceneManager()->SetWidthContour( width );
2336 
2337  RefreshInterface();
2338 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::openContours ( FILE *  pFile,
FILE *  pFileData,
bool  staticContour 
)

Definition at line 1311 of file wxContourMainFrame.cxx.

References _images, _theViewPanel, _tmpReadFileImageDim, _tmpReadFileImageSpac, _tmpReadFileTypeOfTransformation, KernelManagerContour::changeContourOfManager(), wxVtkBaseView_SceneManager::configureViewControlTo(), KernelManagerContour::createOutline(), KernelManagerContour::factoryManualContourModel(), wxContourViewPanel::getSceneManager(), wxContourViewPanel::getSpacing(), and kernelManager.

Referenced by onLoadContours().

1312 {
1313 
1314  char tmp[255];
1315 
1316  vtkImageData *image = _images[0];
1317 
1318  int imageDim[3];
1319  double imageSpac[3];
1320  image->GetDimensions(imageDim);
1321  image->GetSpacing(imageSpac);
1322 
1323 
1324  fscanf(pFile,"%s",tmp); // NumberOfContours
1325  fscanf(pFile,"%s",tmp); // ##
1326  int numberOfContours = atoi(tmp);
1327 
1328  std::vector<int> instantVector;
1329  int typeContourModel;
1330  manualBaseModel *manModelContour;
1331  int typeView;
1332 
1333 /*
1334  if (compatible==true)
1335  {
1336  int i;
1337  for (i=0;i<numberOfContours;i++)
1338  {
1339  instantVector.clear();
1340  fscanf(pFile,"%s",tmp); // Instant
1341 
1342  fscanf(pFile,"%s",tmp); // 1
1343  instantVector.push_back( atoi(tmp) );
1344  fscanf(pFile,"%s",tmp); // 2
1345  instantVector.push_back( atoi(tmp) );
1346  fscanf(pFile,"%s",tmp); // 3
1347  instantVector.push_back( atoi(tmp) );
1348  fscanf(pFile,"%s",tmp); // 4
1349  instantVector.push_back( atoi(tmp) );
1350  fscanf(pFile,"%s",tmp); // 5
1351  instantVector.push_back( atoi(tmp) );
1352  fscanf(pFile,"%s",tmp); // 6
1353  instantVector.push_back( atoi(tmp) );
1354 
1355 
1356  fscanf(pFile,"%s",tmp); // TypeContourModel
1357  fscanf(pFile,"%s",tmp); // ##
1358  typeContourModel = atoi(tmp);
1359 
1360  manModelContour = kernelManager->factoryManualContourModel(typeContourModel);
1361  manModelContour->Open(pFile);
1362  if(pFileData != NULL)
1363  {
1364  manModelContour->OpenData(pFileData);
1365  }
1366 
1367  fscanf(pFile,"%s",tmp); // TypeView
1368  fscanf(pFile,"%s",tmp); // ##
1369  typeView = atoi(tmp);
1370 
1371  std::string theName;
1372  theName = kernelManager->createOutline( manModelContour, instantVector );
1373  bool addedModel = theName.compare("") != 0;
1374  if( addedModel )
1375  {
1376  double spc[3];//Si no hay imagen pero hay contornos que spacing se pone por default
1377  _theViewPanel->getSpacing(spc);
1378  //Adding the manualContourControler to interface objects structure
1379  //Adding the manualViewContour to interface objects structure
1380  //_theViewPanel->getSceneManager()->setControlActiveStateOfALL( false );//This call is being done here because if the ROI is created underneath the previously created ROIS will still be active.
1381  _theViewPanel->getSceneManager()->configureViewControlTo( theName, manModelContour,spc , typeView) ;
1382  }
1383 
1384  if (staticContour) //StaticContours (will appear in all slices)
1385  {
1386  Instant instant(&instantVector);
1387  kernelManager->changeContourOfManager( theName , &instant );
1388  }
1389 
1390  }// for numberOfContours
1391  }
1392 
1393  else if (compatible==false)
1394  {
1395 */
1396 
1397  int i;
1398  for (i=0;i<numberOfContours;i++)
1399  {
1400  instantVector.clear();
1401  fscanf(pFile,"%s",tmp); // Instant
1402 
1403  fscanf(pFile,"%s",tmp); // 1
1404  instantVector.push_back( atoi(tmp) );
1405  fscanf(pFile,"%s",tmp); // 2
1406  instantVector.push_back( atoi(tmp) );
1407  fscanf(pFile,"%s",tmp); // 3
1408  instantVector.push_back( atoi(tmp) );
1409  fscanf(pFile,"%s",tmp); // 4
1410  instantVector.push_back( atoi(tmp) );
1411  fscanf(pFile,"%s",tmp); // 5
1412  instantVector.push_back( atoi(tmp) );
1413  fscanf(pFile,"%s",tmp); // 6
1414  instantVector.push_back( atoi(tmp) );
1415 
1416  fscanf(pFile,"%s",tmp); // TypeContourModel
1417  fscanf(pFile,"%s",tmp); // ##
1418  typeContourModel = atoi(tmp);
1419 
1420  manModelContour = kernelManager->factoryManualContourModel(typeContourModel);
1421  manModelContour->Open(pFile);
1422  if(pFileData != NULL)
1423  {
1424  manModelContour->OpenData(pFileData);
1425  }
1426 
1428  //nothing to do..
1429  } else if (_tmpReadFileTypeOfTransformation==0){
1430  double transX, transY;
1431  transX = (double) imageDim[0]/_tmpReadFileImageDim[0];
1432  transY = (double) imageDim[1]/_tmpReadFileImageDim[1];
1433  manModelContour->Transform_Ax_Plus_B(transX,0,transY,0);
1434  } else if (_tmpReadFileTypeOfTransformation==1) {
1435  double transX, transY;
1436  transX = (double) _tmpReadFileImageSpac[0]/imageDim[0];
1437  transY = (double) _tmpReadFileImageSpac[1]/imageDim[1];
1438  manModelContour->Transform_Ax_Plus_B(transX,0,transY,0);
1439  }
1440 
1441  fscanf(pFile,"%s",tmp); // TypeView
1442  fscanf(pFile,"%s",tmp); // ##
1443  typeView = atoi(tmp);
1444 
1445  std::string theName;
1446  theName = kernelManager->createOutline( manModelContour, instantVector );
1447  bool addedModel = theName.compare("") != 0;
1448  if( addedModel )
1449  {
1450  double spc[3];//Si no hay imagen pero hay contornos que spacing se pone por default
1451  _theViewPanel->getSpacing(spc);
1452  //Adding the manualContourControler to interface objects structure
1453  //Adding the manualViewContour to interface objects structure
1454  //_theViewPanel->getSceneManager()->setControlActiveStateOfALL( false );//This call is being done here because if the ROI is created underneath the previously created ROIS will still be active.
1455  _theViewPanel->getSceneManager()->configureViewControlTo( theName, manModelContour,spc , typeView) ;
1456  }
1457 
1458  if (staticContour) //StaticContours (will appear in all slices)
1459  {
1460  Instant instant(&instantVector);
1461  kernelManager->changeContourOfManager( theName , &instant );
1462  }
1463  }// for numberOfContours
1464 
1465 /* } */
1466 
1467 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::readDimSpc ( FILE *  pFile,
bool  interactiveOption 
)
private

Definition at line 1245 of file wxContourMainFrame.cxx.

References _images, _tmpReadFileImageDim, _tmpReadFileImageSpac, and _tmpReadFileTypeOfTransformation.

Referenced by onLoadContours().

1246 {
1247  char tmp[255];
1248  int imageDim[3];
1249  double imageSpac[3];
1250  vtkImageData *image = _images[0];
1251  image->GetDimensions(imageDim);
1252  image->GetSpacing(imageSpac);
1253 
1254  fscanf(pFile,"%s",tmp); // ImageDimensions
1255  fscanf(pFile,"%s",tmp); // X
1256  _tmpReadFileImageDim[0] = atoi(tmp);
1257  fscanf(pFile,"%s",tmp); // Y
1258  _tmpReadFileImageDim[1] = atoi(tmp);
1259  fscanf(pFile,"%s",tmp); // Z
1260  _tmpReadFileImageDim[2] = atoi(tmp);
1261 
1262  fscanf(pFile,"%s",tmp); // ImageSpacing
1263  fscanf(pFile,"%s",tmp); // X
1264  _tmpReadFileImageSpac[0] = atof(tmp);
1265  fscanf(pFile,"%s",tmp); // Y
1266  _tmpReadFileImageSpac[1] = atof(tmp);
1267  fscanf(pFile,"%s",tmp); // Z
1268  _tmpReadFileImageSpac[2] = atof(tmp);
1269 
1270 
1271  if (interactiveOption==true)
1272  {
1273  //Compare Spacing and Dims in X and Y (Necessary in Z?) - Just for Version 2
1274  if (imageDim[0]!=_tmpReadFileImageDim[0] || imageDim[1]!=_tmpReadFileImageDim[1] || imageSpac[0]!=_tmpReadFileImageSpac[0] || imageSpac[1]!=_tmpReadFileImageSpac[1])
1275  {
1276  wxDialog* dial = new wxDialog (this,-1,_T("Tools"),wxDefaultPosition, wxSize(460,360));
1277  wxSizer* buttonsSizer = dial->CreateSeparatedButtonSizer(wxOK|wxCANCEL);
1278  wxBoxSizer *dialSizer = new wxBoxSizer(wxVERTICAL);
1279 
1280  wxString lstOptOperation[2];
1281  lstOptOperation[0]=_T("By Dimension");
1282  lstOptOperation[1]=_T("By Spacing");
1283  wxRadioBox * radioOpts = new wxRadioBox(dial, -1, _T("Type of Transformation"), wxDefaultPosition, wxSize(270,45), 2 , lstOptOperation, 2, wxRA_SPECIFY_COLS);
1284 
1285  dialSizer->Add( new wxStaticText(dial,-1,_T("The image resolution is not compatible with the ")) , 0, wxGROW );
1286  dialSizer->Add( new wxStaticText(dial,-1,_T("selected Roi file. Do you want to tranform it?")) , 0, wxGROW );
1287  dialSizer->Add( new wxStaticText(dial,-1,_T(" ")) , 0, wxGROW );
1288  dialSizer->Add(radioOpts,0,wxGROW);
1289  dialSizer->Add( new wxStaticText(dial,-1,_T(" ")) , 0, wxGROW );
1290  dialSizer->Add(buttonsSizer,0,wxGROW);
1291  dial->SetSizer(dialSizer, true);
1292  dial->Layout();
1293  dial->ShowModal();
1294 
1296 //EED bool transform = false;
1297 
1298  if (dial->GetReturnCode() == wxID_OK)
1299  {
1300  _tmpReadFileTypeOfTransformation = radioOpts->GetSelection();
1301  }// if wxOK
1302 
1303  } // if dim spc
1304  } // if interactiveOption
1305 }

Here is the caller graph for this function:

void wxContourMainFrame::referenceLine ( )

Definition at line 2157 of file wxContourMainFrame.cxx.

References _refLineControl, _refLineModel, _refLineView, _theViewPanel, wxContourViewPanel::getImageData(), and wxContourViewPanel::getWxVtkBaseView().

Referenced by interfMainPanel::onMirrorPressed().

2158 {
2159  if (_refLineControl==NULL)
2160  {
2161  wxBusyCursor wait;
2162  double spc[3];
2163 
2164  vtkImageData *vtkimagedata = _theViewPanel->getImageData();
2165  vtkimagedata->GetSpacing(spc);
2166 
2167  wxVtkBaseView * viewer2D = _theViewPanel->getWxVtkBaseView();
2168 
2169  _refLineControl = new manualLineControler();
2170  _refLineModel = new manualContourModelLine();
2171  _refLineView = new manualViewLine();
2172  _refLineView->SetModel( _refLineModel );
2173  _refLineView->SetWxVtkBaseView( viewer2D );
2174  _refLineView->SetRange( 2 );
2175  _refLineView->SetZ( 1200 );
2176 
2177  _refLineView->SetSpacing(spc);
2178 
2179  _refLineView->SetColorNormalContour(0, 0, 1);
2180  _refLineView->SetColorEditContour(0, 0.5, 0.5);
2181  _refLineView->SetWidthLine(4);
2182 
2183  _refLineControl->SetModelView( _refLineModel , _refLineView );
2184  vtkInteractorStyleBaseView* style = (vtkInteractorStyleBaseView*)viewer2D->GetInteractorStyleBaseView();
2185  style->AddInteractorStyleMaracas( _refLineControl );
2186  _refLineModel->SetCloseContour(false);
2187  _refLineControl->CreateNewManualContour();
2188 
2189 //AD: Inicializar el mirroring con una linea ya pintada
2190  /*
2191  double z = _refLineControl->GetZ();
2192 
2193  int imageDim[3];
2194  image->GetDimensions(imageDim);
2195  double x = (double) imageDim[0]/2;
2196  double y1 = (double) (imageDim[1]/2)+15;
2197  double y2 = (double) (imageDim[1]/2)-15;
2198 
2199  _refLineControl->AddPoint(x,y1,z);
2200  _refLineControl->AddPoint(x,y2,z);
2201  _refLineControl->SetCompleteCreation(true);
2202 
2203  _refLineModel->AddPoint(x,y1,z);
2204  _refLineModel->AddPoint(x,y2,z);
2205  _refLineModel->UpdateSpline();
2206 
2207  _refLineView->UpdateViewPoint(0);
2208  _refLineView->UpdateViewPoint(1);
2209  */
2210 
2211  _refLineControl->SetActive(true);
2212  _refLineView->RefreshContour();
2213  }
2214 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::refLineChangeWidth ( int  width)

Definition at line 2258 of file wxContourMainFrame.cxx.

References _refLineView, and RefreshInterface().

Referenced by interfMainPanel::onMirrorChangeWidth().

2259 {
2260  _refLineView->SetWidthLine(width);
2261  _refLineView->RefreshContour();
2262 
2263  RefreshInterface();
2264 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::refLineHide ( )

Definition at line 2217 of file wxContourMainFrame.cxx.

References _refLineControl, _refLineView, and RefreshInterface().

Referenced by interfMainPanel::onMirrorAxisHide().

2218 {
2219  if (_refLineControl!=NULL)
2220  {
2221  if (_refLineControl->GetActive())
2222  {
2223  _refLineView->RemoveCompleteContourActor();
2224  _refLineControl->SetEditable(false);
2225  _refLineControl->SetActive(false);
2226 
2227  RefreshInterface();
2228  }
2229  }
2230 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::refLineShow ( )

Definition at line 2233 of file wxContourMainFrame.cxx.

References _refLineControl, _refLineModel, _refLineView, _theViewPanel, wxContourViewPanel::getWxVtkBaseView(), and RefreshInterface().

Referenced by interfMainPanel::onMirrorAxisShow(), and interfMainPanel::onMirrorPressed().

2234 {
2235  if (_refLineControl!=NULL)
2236  {
2237  if (_refLineControl->GetActive()==false)
2238  {
2239  wxVtkBaseView * viewer2D = _theViewPanel->getWxVtkBaseView();
2240 
2241  _refLineView->SetModel( _refLineModel );
2242  _refLineView->SetWxVtkBaseView( viewer2D );
2243  _refLineView->SetRange( 2 );
2244  _refLineView->SetZ( 1200 );
2245 
2246  _refLineControl->SetModelView( _refLineModel , _refLineView );
2247  vtkInteractorStyleBaseView* style = (vtkInteractorStyleBaseView*)viewer2D->GetInteractorStyleBaseView();
2248  style->AddInteractorStyleMaracas( _refLineControl );
2249  _refLineControl->CreateNewManualContour();
2250  _refLineControl->SetActive(true);
2251  _refLineView->RefreshContour();
2252 
2253  RefreshInterface();
2254  }
2255  }
2256 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::RefreshInterface ( )

Definition at line 1469 of file wxContourMainFrame.cxx.

References _theViewPanel, changeInstant(), and wxContourViewPanel::RefreshInterface().

Referenced by onBrigthnessColorWindowLevel(), onInterpolation(), onSegmentationAllSlice(), onSegmentationOneSlice(), onSegmentationOneSliceITK(), onWidthOfContour(), refLineChangeWidth(), refLineHide(), refLineShow(), and interfMainPanel::RefreshInterface().

1469  {
1470  changeInstant();
1472  //wxVtk2DBaseView *wxvtk2dbaseview = (wxVtk2DBaseView*)this->_theViewPanel->getWxVtkBaseView();
1473  //wxvtk2dbaseview->Refresh();
1474 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::resetAppend ( )

Definition at line 2384 of file wxContourMainFrame.cxx.

References kernelManager, and KernelManagerContour::resetAppend().

Referenced by interfMainPanel::resetAppend().

2384  {
2386 
2387 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::resetInstance ( )
static

Definition at line 202 of file wxContourMainFrame.cxx.

References instance.

203  {
204  instance->Destroy();
205  }
void wxContourMainFrame::saveFileWithContours ( std::string  filename)
private

Definition at line 1160 of file wxContourMainFrame.cxx.

References _images, _onePixelSize, _theViewPanel, KernelManagerContour::GetLstNameThings(), KernelManagerContour::GetLstNameThingsStatic(), KernelManagerContour::getOutlineByKeyName(), wxContourViewPanel::getSceneManager(), kernelManager, KernelManagerContour::SaveThingName(), and wxVtkBaseView_SceneManager::SaveThingName().

Referenced by onSave(), onUndo(), saveFileWithContoursAutomatique(), and saveState().

1161 {
1162 
1163  FILE *pFile=fopen(filename.c_str(),"w+");
1164 
1165 //CMRU 03-09-09-----------------------------------------------------------------------------------------------
1166  filename.append("data");
1167  std::cout<<"Nombre del archivo: "<<filename<<std::endl;
1168  FILE *pFileData=fopen(filename.c_str(),"w+");
1169 //------------------------------------------------------------------------------------------------------------
1170 
1171  std::vector< std::string > lstNameThings;
1172  int i,sizeLstNameThings;
1173 
1174  fprintf(pFile,"--CreaContour--\n");
1175  fprintf(pFile,"Version %s\n", "1.0.3" );
1176 
1177 //CMRU 03-09-09-----------------------------------------------------------------------------------------------
1178  fprintf(pFileData,"--CreaContour--\n");
1179  fprintf(pFileData,"Version %s\n", "1.0.3" );
1180  fprintf(pFileData,"OnePixelSize %f\n", _onePixelSize);
1181 
1182 //------------------------------------------------------------------------------------------------------------
1183 
1184  vtkImageData *image = _images[0];
1185 
1186  int dimRange[3];
1187  image->GetDimensions(dimRange);
1188 
1189  fprintf(pFile,"ImageDimensions %d %d %d\n", dimRange[0], dimRange[1], dimRange[2] );
1190 
1191  double spaRange[3];
1192  image->GetSpacing(spaRange);
1193 
1194  fprintf(pFile,"ImageSpacing %f %f %f\n", spaRange[0], spaRange[1], spaRange[2] );
1195 
1196  // Normal Contours
1197 
1198  lstNameThings = kernelManager->GetLstNameThings();
1199  sizeLstNameThings = lstNameThings.size();
1200  fprintf(pFile,"NumberOfContours %d\n", sizeLstNameThings );
1201 
1202 //CMRU 03-09-09-----------------------------------------------------------------------------------------------
1203  fprintf(pFileData,"NumberOfContours %d\n", sizeLstNameThings );
1204 //------------------------------------------------------------------------------------------------------------
1205 
1206  for (i=0 ; i<sizeLstNameThings ; i++)
1207  {
1208 //CMRU 03-09-09-----------------------------------------------------------------------------------------------
1209  manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(lstNameThings[i]);
1210  double sizeInPixel = manualModel ->GetPathSize();
1211  double realContourSize = sizeInPixel*_onePixelSize;
1212  manualModel ->SetRealSize(realContourSize);
1213 //------------------------------------------------------------------------------------------------------------
1214 
1215  //int size= kernelManager->GetLstNameThings().size();
1216 
1217  kernelManager->SaveThingName( pFile, pFileData, lstNameThings[i] );
1218  _theViewPanel->getSceneManager()->SaveThingName( pFile, lstNameThings[i] );
1219  }// for i
1220 
1221  //-- Static Contours
1222 
1223 // fprintf(pFile,"ImageDimensions %d %d %d\n", dimRange[0], dimRange[1], dimRange[2] );
1224 // fprintf(pFile,"ImageSpacing %f %f %f\n", spaRange[0], spaRange[1], spaRange[2] );
1225 
1226  lstNameThings = kernelManager->GetLstNameThingsStatic();
1227  sizeLstNameThings = lstNameThings.size();
1228  fprintf(pFile,"NumberOfContoursStatic %d\n", sizeLstNameThings );
1229 
1230 //CMRU 03-09-09-----------------------------------------------------------------------------------------------
1231  fprintf(pFileData,"NumberOfContoursStatic %d\n", sizeLstNameThings );
1232 //------------------------------------------------------------------------------------------------------------
1233 
1234  for (i=0 ; i<sizeLstNameThings ; i++)
1235  {
1236  kernelManager->SaveThingName( pFile, pFileData, lstNameThings[i] );
1237  _theViewPanel->getSceneManager()->SaveThingName( pFile, lstNameThings[i] );
1238  }// for i
1239  fclose(pFile);
1240  fclose(pFileData);
1241 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::saveFileWithContoursAutomatique ( )

Definition at line 3144 of file wxContourMainFrame.cxx.

References KernelManagerContour::getCurrentFileName(), kernelManager, onSave(), and saveFileWithContours().

Referenced by wxContourViewPanel::onActionButtonPressed().

3144  {
3145  std::string filename = kernelManager->getCurrentFileName();
3146  if(filename.compare("")!=0){
3147  saveFileWithContours(filename);
3148  }else{
3149  onSave();
3150  }
3151 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::SaveImageResult ( std::string  directory,
std::string  namefile,
vtkImageData *  mask,
vtkImageData *  value 
)

Definition at line 3062 of file wxContourMainFrame.cxx.

References interfMainPanel::getInstance(), KernelManagerContour::GetSpacing(), kernelManager, and interfMainPanel::setStringInfoPanel().

Referenced by onSaveResults().

3063 {
3064 
3065  double spc[3];
3066  kernelManager->GetSpacing(spc,0); // returns the spacing of the first image
3067 
3068  std::string temp = directory + "/" + namefile + "-image-Value.mhd";
3069 
3070  wxString filename = crea::std2wx(temp);
3071 
3072 // Image Value
3073 
3074  vtkImageChangeInformation *valueChInfo = vtkImageChangeInformation::New();
3075  valueChInfo->SetInput(value);
3076  valueChInfo->SetSpacingScale(spc);
3077  vtkMetaImageWriter *writerValueImage = vtkMetaImageWriter::New( );
3078  writerValueImage->SetInput( valueChInfo->GetOutput() );
3079  writerValueImage->SetFileName( (const char *)filename.mb_str() );
3080  writerValueImage->SetFileDimensionality( 3 );
3081  writerValueImage->SetCompression(false);
3082  writerValueImage->Write( );
3083 
3084 // Image Mask
3085  temp = directory + "/" + namefile + "-image-Mask.mhd";
3086 
3087  // LG 14/01/09 : using crea
3088  filename = crea::std2wx(temp);
3089  // filename.Printf(_T(temp.c_str()));
3090 
3091 
3092  vtkImageChangeInformation *maskChInfo = vtkImageChangeInformation::New();
3093  maskChInfo->SetInput(mask);
3094  maskChInfo->SetSpacingScale(spc);
3095  vtkMetaImageWriter *writerMaskImage = vtkMetaImageWriter::New( );
3096  writerMaskImage->SetInput( maskChInfo->GetOutput() );
3097  writerMaskImage->SetFileName( (const char *)filename.mb_str() );
3098  writerMaskImage->SetFileDimensionality( 3 );
3099  writerMaskImage->SetCompression(false);
3100  writerMaskImage->Write( );
3101 
3103 
3104 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::SaveValuesXYZ ( std::string  directory,
std::string  namefile,
int  typeContourGroup 
)

Definition at line 2826 of file wxContourMainFrame.cxx.

References _contourextractdata, _instantPanel, _theViewPanel, KernelManagerContour::ExploseEachModel(), wxVtkBaseView_SceneManager::GetImageDataSizeZ(), interfMainPanel::getInstance(), wxInstantChooserPanel::getInstant(), KernelManagerContour::getOutlinesAtInstant(), wxContourViewPanel::getSceneManager(), KernelManagerContour::intToString(), kernelManager, and interfMainPanel::setStringInfoPanel().

Referenced by onSaveResults().

2827 {
2828  wxBusyCursor wait;
2829 //EED01Juillet2009 GenerateContourExtractData();
2830 
2831  //int typeContourGroup = this->_radiolstboxContourGroup->GetSelection();
2832  _contourextractdata ->SetTypeOperation( typeContourGroup % 3 );
2833 
2834  std::vector<manualBaseModel*> lstManConMod;
2835  std::vector<manualBaseModel*> lstManConModTmp;
2836  std::vector<manualBaseModel*> lstManConModExp;
2837  std::vector<double> pLstValue;
2838  std::vector<double> pLstValuePosX;
2839  std::vector<double> pLstValuePosY;
2840  std::vector<double> pLstValuePosZ;
2841 
2842  std::vector<int> tempVector;
2843  _instantPanel->getInstant( tempVector );
2844 
2845 //EED01Juillet2009 vtkImageData *imagedata = _theViewPanel->getSceneManager()->GetImageData();
2847  int z;
2848  int ii,sizeLstContourThings;
2849 
2850 
2851  int minZ,maxZ;
2852  double totalZ;
2853  double porcent;
2854  wxString tmpString;
2855  minZ = 0;// _mbarrange->GetStart();
2856  maxZ = sizeZ;//_mbarrange->GetEnd();
2857  totalZ = maxZ-minZ+1;
2858 
2859 //EED01Juillet2009 _contourextractdata->SetImage( imagedata);
2860 
2861 // For each slice..
2862  for ( z=0 ; z<sizeZ ; z++)
2863  {
2864 
2865  porcent = 100.0* (z-minZ)/totalZ;
2866 
2867  tmpString.Printf(_T("Saving Values"));
2868  tmpString.Printf(_T(" %d %c %d/%d %d"), (int)porcent , 37 , z-minZ+1, (int)totalZ ,z);
2870  //_staticTextInformation->SetLabel(tmpString);
2871 
2872 
2873  //Extraction data from contours of each slice
2874  _contourextractdata->SetZtoBeAnalys( z);
2875 
2876  tempVector[1]=z;
2877  Instant instant(&tempVector);
2878  std::vector<ContourThing**> lstContourThings = kernelManager->getOutlinesAtInstant(&instant);//this->_modelManager->getOutlinesAtInstant( &instant );
2879  sizeLstContourThings = lstContourThings.size();
2880 
2881  lstManConMod.clear();
2882  for (ii=0 ; ii<sizeLstContourThings ; ii++)
2883  {
2884  ContourThing **contourthing = lstContourThings[ii];
2885  lstManConMod.push_back( (*contourthing)->getModel() );
2886  }
2887  lstManConModExp = kernelManager->ExploseEachModel( lstManConMod );
2888 
2889 
2890 //EED004
2891 
2892  int iContourGroup,sizeContourGroup;
2893  if (typeContourGroup==3) // contour separete
2894  {
2895  sizeContourGroup=lstManConModExp.size();
2896  } else { // contour AND OR XOR
2897  sizeContourGroup=1;
2898  }
2899 
2900  for( iContourGroup=0 ; iContourGroup<sizeContourGroup ; iContourGroup++ ){
2901  lstManConModTmp.clear();
2902  if (typeContourGroup==3) // contour separete
2903  {
2904  lstManConModTmp.push_back( lstManConModExp[iContourGroup]);
2905  } else { // contour AND OR XOR
2906  lstManConModTmp = lstManConModExp;
2907  }
2908 
2909  _contourextractdata->SetLstManualContourModel( lstManConModTmp );
2910 
2911  pLstValue.clear();
2912  pLstValuePosX.clear();
2913  pLstValuePosY.clear();
2914  pLstValuePosZ.clear();
2915  int numberOfPixels;
2916  _contourextractdata->GetValuesInsideCrown( &numberOfPixels,
2917  &pLstValue,
2918  &pLstValuePosX,
2919  &pLstValuePosY,
2920  &pLstValuePosZ);
2921 
2922  std::string temp = directory + "/" + namefile + "-slice";
2923  temp = temp + kernelManager->intToString(z) + "-cont" + kernelManager->intToString(iContourGroup);
2924  temp = temp + ".txt";
2925 
2926  // LG 14/01/09 : using crea
2927  wxString filename = crea::std2wx(temp);
2928  /*filename.Printf(_T("%s"),directory.c_str());
2929  filename.append(_T("\\"));
2930  filename.append(_T("%s"),namefile.c_str());
2931  filename.append(_T("-slice"));
2932  filename.append(_T("%d"),z);
2933  filename.append(_T("-cont"));
2934  filename.append(_T("%d"),iContourGroup);
2935  filename.append(_T(".txt"));*/
2936  // filename.Printf(temp.c_str());
2937 
2938 
2939 
2940  FILE *pFile=fopen((const char *)filename.mb_str(),"w+");
2941  fprintf(pFile,"value \t x \t y \t z\n" );
2942  int iLstValue,sizeLstValue=pLstValue.size();
2943  for (iLstValue=0 ; iLstValue<sizeLstValue ; iLstValue++ )
2944  {
2945  fprintf(pFile,"%f\t %f\t %f\t %f\n", (float)pLstValue[iLstValue] , (float)pLstValuePosX[iLstValue], (float)pLstValuePosY[iLstValue], (float)z );
2946  }
2947  fclose(pFile);
2948  } // for iContourGroup
2949  } // for z
2951  //_staticTextInformation->SetLabel( _T("") );
2952 
2953 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::SegmentationOneSlice ( int  x,
int  y,
int  z,
int  isovalue,
int  sampling,
int  method 
)

Definition at line 1953 of file wxContourMainFrame.cxx.

References _instantPanel, _theViewPanel, wxContourViewPanel::configureViewControlTo(), KernelManagerContour::createOutline(), KernelManagerContour::factoryManualContourModel(), getImageData(), wxInstantChooserPanel::getInstant(), wxContourViewPanel::getSpacing(), and kernelManager.

Referenced by onSegmentationAllSlice(), and onSegmentationOneSlice().

1954 {
1955  int typeofcontour = 1;
1956  //--Extracting Contour
1957  //vtkImageData *imagedata = _theViewPanel->getSceneManager()->GetImageData();
1958  vtkImageData *imagedata = getImageData();
1959 // double *range = imagedata->GetScalarRange();
1960 // double thr = 1;
1961 
1962  vtkImageReslice *imageReslice = vtkImageReslice::New();
1963 //EED
1964 // double spc[3];
1965 // imagedata->GetSpacing(spc);
1966 // x = x*spc[0];
1967 // y = y*spc[1];
1968 // z = z*spc[3];
1969 
1970  imageReslice->SetInput( imagedata );
1971  imageReslice->SetInformationInput(imagedata);
1972  imageReslice->SetResliceAxesDirectionCosines(1,0,0, 0,1,0 ,0,0,1);
1973  imageReslice->SetResliceAxesOrigin(0,0,z);
1974  imageReslice->SetOutputDimensionality(2);
1975  imageReslice->SetInterpolationModeToLinear();
1976 
1977  imagedata = imageReslice->GetOutput();
1978  imagedata->Update();
1979  imagedata->UpdateInformation();
1980 
1981  vtkContourFilter* cntVTK = vtkContourFilter::New( );
1982  cntVTK->SetInput( imagedata );
1983 
1984  cntVTK->SetNumberOfContours( 1 );
1985  //cntVTK->SetValue( 0, vmin );
1986 // cntVTK->SetValue( 0, (range[1]*thr/100) );
1987  cntVTK->SetValue( 1, isovalue );
1988 // cntVTK->SetValue( 1, vmax );
1989  cntVTK->Update( );
1990  cntVTK->UpdateInformation();
1991 
1992  vtkCleanPolyData* cpd = vtkCleanPolyData::New( );
1993  cpd->SetInput( cntVTK->GetOutput( ) );
1994  cpd->ConvertLinesToPointsOff( );
1995  cpd->Update( );
1996  cpd->UpdateInformation();
1997 
1998  vtkPolyDataConnectivityFilter* conn = vtkPolyDataConnectivityFilter::New( );
1999  conn->SetExtractionModeToClosestPointRegion( );
2000  //conn->SetMaxRecursionDepth( 3000 );
2001 
2002  conn->SetInput( cpd->GetOutput( ) );
2003 
2004  conn->SetClosestPoint( x, y, 0 );
2005  conn->Update( );
2006  conn->UpdateInformation();
2007 
2008  vtkCleanPolyData* cpd2 = vtkCleanPolyData::New( );
2009  cpd2->SetInput( conn->GetOutput( ) );
2010  cpd2->Update();
2011  cpd2->UpdateInformation();
2012 
2013  vtkStripper* vtkstripper = vtkStripper::New( );
2014  vtkstripper->SetInput( cpd2->GetOutput() );
2015  vtkstripper->Update();
2016  vtkstripper->UpdateInformation();
2017 
2018 
2019  vtkPolyData* polyDataResult = vtkstripper->GetOutput();
2020 
2021  polyDataResult->Update( );
2022  polyDataResult->UpdateInformation();
2023 
2024 /* EED
2025 ofstream myfile;
2026 myfile.open ("c:/temp/example.txt");
2027 myfile << "\n";
2028 polyDataResult->Print(myfile);
2029 myfile << "-------------------------------------\n";
2030 polyDataResult->GetLines()->Print(myfile);
2031 myfile.close();
2032 */
2033 
2034  cntVTK -> Delete();
2035  cpd2 -> Delete();
2036  cpd -> Delete();
2037  conn -> Delete();
2038 
2039 
2040 //--Calculating control points
2041 
2042  std::vector<double> vecX;
2043  std::vector<double> vecY;
2044  std::vector<double> vecZ;
2045 
2046  std::vector<double> vecCtrlPointX;
2047  std::vector<double> vecCtrlPointY;
2048  std::vector<double> vecCtrlPointZ;
2049 
2050 
2051  double *p;
2052  int ii,size=polyDataResult->GetNumberOfPoints();
2053  int id;
2054  for (ii=1;ii<=size;ii++)
2055  {
2056  id = polyDataResult->GetLines()->GetData()->GetValue(ii);
2057  p = polyDataResult->GetPoint(id);
2058 // double x=p[0];
2059 // double y=p[1];
2060  vecX.push_back( p[0] );
2061  vecY.push_back( p[1] );
2062  vecZ.push_back( 900 );
2063 // vecZ.push_back( p[2] );
2064  }
2065 
2066 
2067  ExtractControlPoints2D *extractcontrolpoints2d = new ExtractControlPoints2D();
2068  extractcontrolpoints2d->SetContour( &vecX , &vecY , &vecZ );
2069 
2070 //PROOFS
2071  /*if (methodRadiobox->GetSelection()==0){
2072  extractcontrolpoints2d->GetInitialControlPoints( &vecCtrlPointX , &vecCtrlPointY , &vecCtrlPointZ );
2073  }
2074  if (methodRadiobox->GetSelection()==1){
2075  extractcontrolpoints2d->GetControlPoints( &vecCtrlPointX , &vecCtrlPointY , &vecCtrlPointZ );
2076  }
2077  if (methodRadiobox->GetSelection()==2){
2078  extractcontrolpoints2d->SetSamplingControlPoints( sampling );
2079  extractcontrolpoints2d->GetSamplingControlPoints( &vecCtrlPointX , &vecCtrlPointY , &vecCtrlPointZ );
2080  }*/
2081 
2082  if (method==0){
2083  extractcontrolpoints2d->GetInitialControlPoints( &vecCtrlPointX , &vecCtrlPointY , &vecCtrlPointZ );
2084  }
2085  else if (method==1){
2086  extractcontrolpoints2d->GetControlPoints( &vecCtrlPointX , &vecCtrlPointY , &vecCtrlPointZ );
2087  }
2088  else if (method==2){
2089  extractcontrolpoints2d->SetSamplingControlPoints( sampling );
2090  extractcontrolpoints2d->GetSamplingControlPoints( &vecCtrlPointX , &vecCtrlPointY , &vecCtrlPointZ );
2091  }
2092 
2093  //--Adding contour to the system
2094 
2095  std::vector<int> actualInstantVector;
2096  _instantPanel->getInstant( actualInstantVector );
2097  actualInstantVector[1]=z;
2098 
2099  int j,sizeCtrPt = vecCtrlPointX.size();
2100  manualBaseModel *manModelContour = kernelManager->factoryManualContourModel( typeofcontour );
2101  manModelContour->SetNumberOfPointsSpline( ((sizeCtrPt/100)+1)*100 );
2102  if (sizeCtrPt>=3){
2103  for (j=0 ; j<sizeCtrPt ; j++)
2104  {
2105  manModelContour->AddPoint( vecCtrlPointX[j] , vecCtrlPointY[j] , vecCtrlPointZ[j] );
2106  } // for
2107  std::string theName;
2108  //theName = _modelManager->createOutline( manModelContour, actualInstantVector );
2109  theName = kernelManager->createOutline( manModelContour, actualInstantVector );
2110  bool addedModel = theName.compare("") != 0;
2111  if( addedModel )
2112  {
2113  double spc[3];//Si no hay imagen pero hay contornos que spacing se pone por default
2114  _theViewPanel->getSpacing(spc);
2115  //Adding the manualContourControler to interface objects structure
2116  //Adding the manualViewContour to interface objects structure
2117  //_theViewPanel->getSceneManager()->setControlActiveStateOfALL( false );//This call is being done here because if the ROI is created underneath the previously created ROIS will still be active.
2118  _theViewPanel->configureViewControlTo(theName, manModelContour, spc, typeofcontour);
2119  //_theViewPanel->getSceneManager()->configureViewControlTo( theName, manModelContour,spc, typeofcontour ) ;
2120  } // if addedModel
2121  } // if sizeCtrPt
2122 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::SegmentationOneSliceITK ( int  x,
int  y,
int  z,
wxString  distance,
wxString  sigma,
wxString  alfa,
wxString  beta,
wxString  propagation,
wxString  iterations,
wxString  inflation 
)

Definition at line 1494 of file wxContourMainFrame.cxx.

References _instantPanel, _theViewPanel, wxContourViewPanel::configureViewControlTo(), KernelManagerContour::createOutline(), KernelManagerContour::factoryManualContourModel(), getImageData(), wxInstantChooserPanel::getInstant(), wxContourViewPanel::getSpacing(), and kernelManager.

Referenced by onSegmentationOneSliceITK().

1495 {
1496  int typeofcontour = 1;
1497  //Image Data
1498  vtkImageData *imagedata = getImageData();
1499 
1500  //Tipo de pixeles a utilizar internamente en ITK
1501  typedef float InternalPixelType;
1502  const unsigned int Dimension = 2;
1503  typedef itk::Image< InternalPixelType, Dimension > InternalImageType;
1504 
1505  //Tipo de pixeles de salida 1
1506  typedef unsigned char OutputPixelType;
1507  typedef itk::Image< OutputPixelType, Dimension > OutputImageType;
1508 
1509  //Tipo de pixeles de salida 2
1510  typedef unsigned short OutputPixelType2;
1511  typedef itk::Image< OutputPixelType2, Dimension > OutputImageType2;
1512 
1513  //DefiniciÛn del thresholder
1514  typedef itk::BinaryThresholdImageFilter<
1515  InternalImageType,
1516  OutputImageType > ThresholdingFilterType;
1517 
1518  //DefiniciÛn del primer filtro de conversiÛn de pixeles
1519  typedef itk::CastImageFilter<
1520  OutputImageType, OutputImageType2 > CastFilterType;
1521 
1522  //DefiniciÛn del segundo tipo de conversiÛn de pixeles
1523  typedef itk::CastImageFilter<
1524  OutputImageType2, InternalImageType > CastFilterType2;
1525 
1526  //Tercer tipo de conversiÛn
1527  typedef itk::RescaleIntensityImageFilter<
1528  InternalImageType,
1529  OutputImageType > CastFilterType3;
1530 
1531  //Cuarto tipo de conversiÛn
1532  typedef itk::RescaleIntensityImageFilter<
1533  OutputImageType,
1534  OutputImageType > CastFilterType4;
1535 
1536  ThresholdingFilterType::Pointer thresholder = ThresholdingFilterType::New();
1537 
1538  thresholder->SetLowerThreshold( 0.0 );
1539  thresholder->SetUpperThreshold( 128 );
1540 
1541  thresholder->SetOutsideValue( 255 );
1542  thresholder->SetInsideValue( 0 );
1543 
1544  //DefinciÛn de conexiÛnes entre VTK e ITK y el writer
1545  typedef itk::VTKImageToImageFilter<OutputImageType2> ConnectorType;
1546  typedef itk::ImageToVTKImageFilter<OutputImageType> ConnectorType2;
1547 //EED10JUIN2011 typedef itk::ImageFileWriter< OutputImageType > WriterType;
1548 
1549  ConnectorType::Pointer connector= ConnectorType::New();
1550  ConnectorType2::Pointer connector2= ConnectorType2::New();
1551 
1552 
1553  CastFilterType::Pointer filter=CastFilterType::New();
1554  CastFilterType2::Pointer filter2=CastFilterType2::New();
1555 
1556  connector->SetInput( imagedata );
1557  filter2->SetInput(connector->GetOutput());
1558 
1559  typedef itk::CurvatureAnisotropicDiffusionImageFilter<
1560  InternalImageType,
1561  InternalImageType > SmoothingFilterType;
1562 
1563  SmoothingFilterType::Pointer smoothing = SmoothingFilterType::New();
1564 
1565  typedef itk::GradientMagnitudeRecursiveGaussianImageFilter<
1566  InternalImageType,
1567  InternalImageType > GradientFilterType;
1568 
1569  typedef itk::SigmoidImageFilter<
1570  InternalImageType,
1571  InternalImageType > SigmoidFilterType;
1572 
1573  GradientFilterType::Pointer gradientMagnitude = GradientFilterType::New();
1574 
1575  SigmoidFilterType::Pointer sigmoid = SigmoidFilterType::New();
1576 
1577  sigmoid->SetOutputMinimum( 0.0 );
1578  sigmoid->SetOutputMaximum( 255.0 );
1579 
1580 
1581  typedef itk::FastMarchingImageFilter<
1582  InternalImageType,
1583  InternalImageType > FastMarchingFilterType;
1584 
1585 
1586  FastMarchingFilterType::Pointer fastMarching = FastMarchingFilterType::New();
1587 
1588 printf("EED wxContourMainFrame::SegmentationOneSliceITK Skypping this code. Not compiling GeodesicActiveContourLevelSetImageFilter in fedora 17 with ITK 3.20.1 \n ");
1589 /*EED 17 sept 2010
1590  > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - Not compiling GeodesicActiveContourLevelSetImageFilter in fedora 17 with ITK 3.20.1
1591 
1592 
1593  typedef itk::GeodesicActiveContourLevelSetImageFilter< InternalImageType,
1594  InternalImageType > GeodesicActiveContourFilterType;
1595  GeodesicActiveContourFilterType::Pointer geodesicActiveContour =
1596  GeodesicActiveContourFilterType::New();
1597 
1598  typedef itk::ZeroCrossingImageFilter<
1599  InternalImageType,
1600  InternalImageType > ZeroCrossingFilterType;
1601  ZeroCrossingFilterType::Pointer zeroCrossing =
1602  ZeroCrossingFilterType::New();
1603 
1604  const double propagationScaling = atof( crea::wx2std(prop).c_str() );
1605 
1606  geodesicActiveContour->SetPropagationScaling( propagationScaling );
1607  geodesicActiveContour->SetCurvatureScaling( 1.0 );
1608  geodesicActiveContour->SetAdvectionScaling( 1.0 );
1609 
1610  geodesicActiveContour->SetMaximumRMSError( 0.02 );
1611  int it=atoi( crea::wx2std(iter).c_str() );
1612  geodesicActiveContour->SetNumberOfIterations( it );
1613 
1614  smoothing->SetInput( filter2->GetOutput() );
1615  gradientMagnitude->SetInput( smoothing->GetOutput() );
1616  sigmoid->SetInput( gradientMagnitude->GetOutput() );
1617  fastMarching->SetInput( sigmoid->GetOutput() );
1618  geodesicActiveContour->SetInput( fastMarching->GetOutput() );
1619  geodesicActiveContour->SetFeatureImage( sigmoid->GetOutput() );
1620 
1621  zeroCrossing->SetInput( geodesicActiveContour->GetOutput() );
1622  //thresholder->SetInput( zeroCrossing->GetOutput() );
1623  thresholder->SetInput( geodesicActiveContour->GetOutput() );
1624  connector2->SetInput( thresholder->GetOutput() );
1625 
1626 < - < - < - < - < - < - < - < - < - < - < - < - < - < - < - < - < - < - < - < -
1627 */
1628 
1629 
1630 
1631 
1632  smoothing->SetTimeStep( 0.125 );
1633  smoothing->SetNumberOfIterations( 5 );
1634  smoothing->SetConductanceParameter( 9.0 );
1635 
1636 
1637  const double sigma = atof( crea::wx2std(sigm).c_str() );
1638  gradientMagnitude->SetSigma( sigma );
1639 
1640  const double alpha = atof( crea::wx2std(alf).c_str() );
1641  const double beta = atof( crea::wx2std(bet).c_str() );
1642 
1643  sigmoid->SetAlpha( alpha );
1644  sigmoid->SetBeta( beta );
1645 
1646  typedef FastMarchingFilterType::NodeContainer NodeContainer;
1647  typedef FastMarchingFilterType::NodeType NodeType;
1648 
1649  NodeContainer::Pointer seeds = NodeContainer::New();
1650 
1651  InternalImageType::IndexType seedPosition;
1652  seedPosition[0] = x;
1653  seedPosition[1] = y;
1654 
1655  const double initialDistance = atof( crea::wx2std(distanc).c_str() );
1656 
1657  NodeType node;
1658 
1659  const double seedValue = - initialDistance;
1660 
1661  node.SetValue( seedValue );
1662  node.SetIndex( seedPosition );
1663 
1664  seeds->Initialize();
1665  seeds->InsertElement( 0, node );
1666 
1667  fastMarching->SetTrialPoints( seeds );
1668 
1669  fastMarching->SetSpeedConstant( 1.0 );
1670 
1671  fastMarching->SetOutputSize(
1672  connector->GetOutput()->GetBufferedRegion().GetSize() );
1673 
1674  fastMarching->SetStoppingValue( 800 );
1675  try
1676  {
1677 
1678  connector2->Update();
1679  vtkImageData *idata = connector2->GetOutput();
1680 
1681  vtkMarchingContourFilter* cntVTK = vtkMarchingContourFilter::New( );
1682 
1683  cntVTK->SetInput( idata );
1684 
1685  cntVTK->SetNumberOfContours( 1 );
1686  cntVTK->SetValue( 0, 255 );
1687  cntVTK->Update( );
1688  cntVTK->UpdateInformation();
1689 
1690  vtkCleanPolyData* cpd = vtkCleanPolyData::New( );
1691  cpd->SetInput( cntVTK->GetOutput( ) );
1692  cpd->Update( );
1693  cpd->UpdateInformation();
1694 
1695  vtkPolyDataConnectivityFilter* conn = vtkPolyDataConnectivityFilter::New( );
1696  conn->SetExtractionModeToLargestRegion( );
1697  conn->SetInput( cpd->GetOutput( ) );
1698  conn->Update( );
1699  conn->UpdateInformation();
1700 
1701  vtkStripper* vtkstripper = vtkStripper::New( );
1702  vtkstripper->SetInput( conn->GetOutput() );
1703  vtkstripper->Update();
1704  vtkstripper->UpdateInformation();
1705 
1706  vtkPolyData* polyDataResult = cntVTK->GetOutput();
1707  //std::cout<<"Points "<<polyDataResult->GetNumberOfPoints()<<std::endl;
1708  polyDataResult->Update( );
1709  polyDataResult->UpdateInformation();
1710 
1711  //EED
1712  /*
1713  ofstream myfile;
1714  myfile.open ("C:/Creatis/example.txt");
1715  myfile << "\n";
1716  polyDataResult->Print(myfile);
1717  myfile << "-------------------------------------\n";
1718  polyDataResult->GetLines()->Print(myfile);
1719  myfile.close();*/
1720 
1721  cntVTK -> Delete();
1722  cpd -> Delete();
1723  conn -> Delete();
1724 
1725 
1726  //--Calculating control points
1727 
1728  std::vector<double> vecX;
1729  std::vector<double> vecY;
1730  std::vector<double> vecXo;
1731  std::vector<double> vecYo;
1732  std::vector<double>::iterator vecXoi;
1733  std::vector<double>::iterator vecYoi;
1734  std::vector<double> vecZ;
1735 
1736  std::vector<double> vecCtrlPointX;
1737  std::vector<double> vecCtrlPointY;
1738  std::vector<double> vecCtrlPointZ;
1739 
1740 
1741  double *p;
1742  double xAct=0;
1743  double yAct=0;
1744  int ii,size=polyDataResult->GetNumberOfPoints();
1745  ofstream myfile;
1746  myfile.open ("C:/Creatis/example2.txt");
1747 
1748  size=polyDataResult->GetNumberOfPoints();
1749  for (ii=0;ii<size;ii++)
1750  {
1751  if(ii==0)
1752  {
1753  xAct=x;
1754  yAct=y;
1755  }
1756  p = polyDataResult->GetPoint(ii);
1757  double x=p[0];
1758  double y=p[1];
1759  /*if(fabs(yAct-y)>20)
1760  {
1761  if((xAct-x)>1 || (xAct-x)<-1)
1762  {
1763  vecX.push_back( p[0] );
1764  vecY.push_back( p[1] );
1765  myfile <<p[0]<<","<<p[1]<<"\n";
1766  std::cout<<" x Anterior "<<xAct<<" x actual "<<x<<std::endl;
1767  std::cout<<" y Anterior "<<yAct<<" y actual "<<y<<std::endl;
1768  std::cout<<" x "<<p[0]<<" y "<<p[1]<<std::endl;
1769  vecZ.push_back( 900 );
1770  xAct=x;
1771  yAct=y;
1772  }
1773  else
1774  {
1775  vecXo.push_back(p[0]);
1776  vecYo.push_back(p[1]);
1777  }
1778 
1779  }
1780  else*/ if(fabs(xAct-x)>11)
1781  {
1782  vecXo.push_back(p[0]);
1783  vecYo.push_back(p[1]);
1784  }
1785  else
1786  {
1787  vecX.push_back( p[0] );
1788  myfile <<p[0]<<","<<p[1]<<"\n";
1789  //std::cout<<" x Anterior "<<xAct<<" x actual "<<x<<std::endl;
1790  //std::cout<<" y Anterior "<<yAct<<" y actual "<<y<<std::endl;
1791  //std::cout<<" x "<<p[0]<<" y "<<p[1]<<std::endl;
1792  vecY.push_back( p[1] );
1793  vecZ.push_back( 900 );
1794  xAct=x;
1795  yAct=y;
1796  }
1797 
1798 
1799  }
1800 
1801  while(!vecXo.empty())
1802  {
1803  vecX.push_back(vecXo.back());
1804  //std::cout<<" x Siguiente "<<vecXo.back();
1805  vecXo.pop_back();
1806  vecZ.push_back( 900 );
1807  }
1808  while(!vecYo.empty())
1809  {
1810  vecY.push_back(vecYo.back());
1811  vecYo.pop_back();
1812  }
1813  myfile.close();
1814 
1815  /*for(int l=0;l<vecX.size();l++)
1816  {
1817  if(l==0)
1818  {
1819  vecXo.push_back(p[0]);
1820  vecYo.push_back(p[1]);
1821  }
1822  else
1823  {
1824  if(vecXoi[l-1]==)
1825  {
1826  }
1827  }
1828 
1829  }*/
1830 
1831  ExtractControlPoints2D *extractcontrolpoints2d = new ExtractControlPoints2D();
1832 
1833  extractcontrolpoints2d->SetContour( &vecX , &vecY , &vecZ );
1834 
1835  int method=2;
1836  if (method==0){
1837  extractcontrolpoints2d->GetInitialControlPoints( &vecCtrlPointX , &vecCtrlPointY , &vecCtrlPointZ );
1838  }
1839  else if (method==1){
1840  extractcontrolpoints2d->GetControlPoints( &vecCtrlPointX , &vecCtrlPointY , &vecCtrlPointZ );
1841  }
1842  else if (method==2){
1843  extractcontrolpoints2d->SetSamplingControlPoints( 15 );
1844  extractcontrolpoints2d->GetSamplingControlPoints( &vecCtrlPointX , &vecCtrlPointY , &vecCtrlPointZ );
1845  }
1846  //--Adding contour to the system
1847 
1848  std::vector<int> actualInstantVector;
1849  _instantPanel->getInstant( actualInstantVector );
1850  actualInstantVector[1]=z;
1851 
1852  int j,sizeCtrPt = vecCtrlPointX.size();
1853 
1854  manualBaseModel *manModelContour = kernelManager->factoryManualContourModel( typeofcontour );
1855  manModelContour->SetNumberOfPointsSpline( ((sizeCtrPt/100)+1)*100 );
1856  if (sizeCtrPt>=3){
1857  for (j=0 ; j<sizeCtrPt ; j++)
1858  {
1859  manModelContour->AddPoint( vecCtrlPointX[j] , vecCtrlPointY[j] , vecCtrlPointZ[j] );
1860  } // for
1861  std::string theName;
1862  //theName = _modelManager->createOutline( manModelContour, actualInstantVector );
1863  theName = kernelManager->createOutline( manModelContour, actualInstantVector );
1864  bool addedModel = theName.compare("") != 0;
1865  if( addedModel )
1866  {
1867  double spc[3];//Si no hay imagen pero hay contornos que spacing se pone por default
1868  _theViewPanel->getSpacing(spc);
1869  //Adding the manualContourControler to interface objects structure
1870  //Adding the manualViewContour to interface objects structure
1871  //_theViewPanel->getSceneManager()->setControlActiveStateOfALL( false );//This call is being done here because if the ROI is created underneath the previously created ROIS will still be active.
1872  _theViewPanel->configureViewControlTo(theName, manModelContour, spc, typeofcontour);
1873  //_theViewPanel->getSceneManager()->configureViewControlTo( theName, manModelContour,spc, typeofcontour ) ;
1874  } // if addedModel
1875  } // if sizeCtrPt
1876 
1877 
1878 /*
1879 //EED10JUIN2011
1880  WriterType::Pointer writer = WriterType::New();
1881  CastFilterType3::Pointer caster = CastFilterType3::New();
1882 
1883  caster->SetInput( gradientMagnitude->GetOutput() );
1884  writer->SetInput( caster->GetOutput() );
1885  writer->SetFileName("Gradient Magnitude.png");
1886  caster->SetOutputMinimum( 0 );
1887  caster->SetOutputMaximum( 255 );
1888  writer->Update();
1889 
1890  CastFilterType3::Pointer caster2 = CastFilterType3::New();
1891  WriterType::Pointer writer2 = WriterType::New();
1892 
1893  caster2->SetInput( sigmoid->GetOutput() );
1894  writer2->SetInput( caster2->GetOutput() );
1895  writer2->SetFileName("Sigmoid.png");
1896  caster2->SetOutputMinimum( 0 );
1897  caster2->SetOutputMaximum( 255 );
1898  writer2->Update();
1899 
1900  CastFilterType3::Pointer caster3 = CastFilterType3::New();
1901  WriterType::Pointer writer3 = WriterType::New();
1902 
1903  caster3->SetInput( fastMarching->GetOutput() );
1904  writer3->SetInput( caster3->GetOutput() );
1905  writer3->SetFileName("FastMarching.bmp");
1906  caster3->SetOutputMinimum( 0 );
1907  caster3->SetOutputMaximum( 255 );
1908  writer3->Update();
1909 
1910  CastFilterType3::Pointer caster4 = CastFilterType3::New();
1911  WriterType::Pointer writer4 = WriterType::New();
1912 
1913  caster4->SetInput( geodesicActiveContour->GetOutput() );
1914  writer4->SetInput( caster4->GetOutput() );
1915  writer4->SetFileName("GeodesicActiveContour.png");
1916  caster4->SetOutputMinimum( 0 );
1917  caster4->SetOutputMaximum( 255 );
1918  writer4->Update();
1919 
1920  CastFilterType3::Pointer caster5 = CastFilterType3::New();
1921  WriterType::Pointer writer5 = WriterType::New();
1922 
1923  caster5->SetInput( zeroCrossing->GetOutput() );
1924  writer5->SetInput( caster5->GetOutput() );
1925  writer5->SetFileName("ZeroCrossing.bmp");
1926  caster5->SetOutputMinimum( 0 );
1927  caster5->SetOutputMaximum( 255 );
1928  writer5->Update();
1929 */
1930  }
1931  catch( itk::ExceptionObject & excep )
1932  {
1933  std::cerr << "Exception caught !" << std::endl;
1934  std::cerr << excep << std::endl;
1935  }
1936 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::setConceptValue ( std::string  name,
int  value 
)

Definition at line 627 of file wxContourMainFrame.cxx.

References _instantPanel, and wxInstantChooserPanel::setConceptValue().

Referenced by wxContourViewPanel::onChangeInstant().

627  {
628  _instantPanel->setConceptValue(name, value);
629 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::SetContourGroup ( int  contourGroup)

Definition at line 3158 of file wxContourMainFrame.cxx.

References _contourGroup.

Referenced by interfMainPanel::SetContourGroup().

3159 {
3160  _contourGroup = contourGroup;
3161 }

Here is the caller graph for this function:

void wxContourMainFrame::SetFileLocation ( std::string  newFileLocation)

Assign a new path to the data persistence file @ param newFileLocation New path of the file

Definition at line 3301 of file wxContourMainFrame.cxx.

References _fileLocation.

3302 {
3303  _fileLocation = newFileLocation;
3304  std::cout<<"GETFILELOCATION:"<<_fileLocation<<std::endl;
3305 }
void wxContourMainFrame::setInstantChooserPanel ( wxInstantChooserPanel theInstantChooserPanel)

Definition at line 294 of file wxContourMainFrame.cxx.

References _instantPanel.

295  {
296  _instantPanel = theInstantChooserPanel;
297  }
void wxContourMainFrame::SetScalarRange ( int  grayRangeMin,
int  grayRangeMax 
)

Definition at line 2508 of file wxContourMainFrame.cxx.

References _contourextractdata.

Referenced by interfMainPanel::SetScalarRange().

2509 {
2510  _contourextractdata->SetScalarRange(grayRangeMin,grayRangeMax);
2511 }

Here is the caller graph for this function:

void wxContourMainFrame::setVectImages ( std::vector< vtkImageData * >  imgs)

Definition at line 143 of file wxContourMainFrame.cxx.

References _datadir, _images, _instantPanel, _theViewPanel, wxInstantChooserPanel::addConcepts(), configurePanels(), createNotebook(), ConceptDataWrap::getActualValue(), wxInstantChooserPanel::getConceptDataOf(), KernelManagerContour::getConceptsInformation(), wxContourViewPanel::getCurrentDeep(), ConceptDataWrap::getMaxShowedValue(), ConceptDataWrap::getMaxValue(), ConceptDataWrap::getMinShowedValue(), ConceptDataWrap::getMinValue(), KernelManagerContour::getSourceImage(), kernelManager, notebook, wxInstantChooserPanel::setConceptValue(), and wxContourViewPanel::setVerticalConcept().

Referenced by wxContourMainFrame().

144 {
145 
146  _images = imgs;
147 
148  #if defined(__GNUC__)
149  std::string str_home(getenv("HOME"));
150  #elif defined(_WIN32)
151  std::string str_home(getenv("USERPROFILE"));
152  #endif
153  std::string strCreaContourDataTmp = str_home + "/.creaContourDataTemp/";
154 
155  std::vector<std::string> conceptNameVect;
156  std::vector<int> conceptSizeVect;
157 
158  notebook = this->createNotebook();
159 
160 
161  kernelManager = new KernelManagerContour( imgs , _datadir+"/data/" , strCreaContourDataTmp );
162 
163 
164  _instantPanel = new wxInstantChooserPanel( notebook, "Instant Chooser", true, false, "c" );
166 
167 //-------------------------------------------------------------
168  kernelManager->getConceptsInformation(conceptNameVect, conceptSizeVect);
169  _instantPanel->addConcepts(conceptNameVect, conceptSizeVect);
170 
171 
172  double val = _theViewPanel->getCurrentDeep();
173  _instantPanel->setConceptValue( "Axe Depth", (int)val );
174  //JCP _instantPanel->setConceptValue("time", num de imagenes);
175  ConceptDataWrap * data = _instantPanel->getConceptDataOf( "Axe Depth" );
176  //*******************changeInstant();
177  _theViewPanel->setVerticalConcept( "Axe Depth", data->getMinValue(), data->getMaxValue(), data->getMinShowedValue(), data->getMaxShowedValue(), data->getActualValue() );
178 
179  this->configurePanels( );
180 
181 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::SetZForAllContours ( int  pz)
private

Definition at line 984 of file wxContourMainFrame.cxx.

References KernelManagerContour::GetLstNameThings(), KernelManagerContour::GetLstNameThingsStatic(), KernelManagerContour::getOutlineByKeyName(), and kernelManager.

Referenced by onLoadContours().

985 {
986  printf("EED wxContourMainFrame::SetZForAllContours\n");
987 
988  //-- Normal Contours
989 
990  std::vector< std::string > lstNameThings;
991  int i,sizeLstNameThings;
992  int ii,sizeLstPoints;
993 
994  lstNameThings = kernelManager->GetLstNameThings();
995  sizeLstNameThings = lstNameThings.size();
996  for (i=0 ; i<sizeLstNameThings ; i++)
997  {
998 printf("EED wxContourMainFrame::SetZForAllContours contour=%d \n", i );
999  manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(lstNameThings[i]);
1000  sizeLstPoints = manualModel->GetSizeLstPoints();
1001  for (ii=0 ; ii<sizeLstPoints ; ii++)
1002  {
1003  manualModel->GetManualPoint(ii)->SetPointZ(-900);
1004  }// for ii list of points
1005  }// for i list of Things
1006 
1007  //-- Static Contours
1008 
1009  lstNameThings = kernelManager->GetLstNameThingsStatic();
1010  sizeLstNameThings = lstNameThings.size();
1011  for (i=0 ; i<sizeLstNameThings ; i++)
1012  {
1013  manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(lstNameThings[i]);
1014  sizeLstPoints = manualModel->GetSizeLstPoints();
1015  for (ii=0 ; ii<sizeLstPoints ; ii++)
1016  {
1017  manualModel->GetManualPoint(ii)->SetPointZ(-900);
1018  }// for ii list of points
1019  }// for i list of static things
1020 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::ShowResultImages ( int  typeContourGroup,
int  selection,
int  minZ,
int  maxZ 
)

Definition at line 643 of file wxContourMainFrame.cxx.

References getMaskValue(), and m_notebook_style.

Referenced by interfMainPanel::ShowResultImages().

644 {
645  vtkImageData * mask;
646  vtkImageData * value;
647  this->getMaskValue(&mask, &value, typeContourGroup, selection, minZ, maxZ);
648 
649  std::vector<int> nTypeView;
650  nTypeView.push_back(5);
651  nTypeView.push_back(1);
652  nTypeView.push_back(2);
653  nTypeView.push_back(0);
654 
655  wxFrame *frame = new wxFrame(this, -1,_T("Result image extracted.."),wxDefaultPosition,wxSize(600,600), wxDEFAULT_FRAME_STYLE|wxSTAY_ON_TOP);
656  wxAuiManager *m_mgr_noteBookViewerResult = new wxAuiManager();
657  m_mgr_noteBookViewerResult->SetManagedWindow(frame);
658 
659  wxAuiNotebook* noteBookViewerResult = new wxAuiNotebook(frame, -1, wxPoint(600, 600), wxSize(430,200), m_notebook_style);
660  m_mgr_noteBookViewerResult->AddPane(noteBookViewerResult, wxAuiPaneInfo().Name(wxT("notebook_content")).CenterPane().PaneBorder(false));
661 
662  wxPanel *panelViewer1 = new wxMaracas_N_ViewersWidget(noteBookViewerResult, value,&nTypeView);
663  wxPanel *panelViewer2 = new wxMaracas_N_ViewersWidget(noteBookViewerResult, mask,&nTypeView);
664 
665 
666  noteBookViewerResult->AddPage( panelViewer1, wxT("Image result") );
667  noteBookViewerResult->AddPage( panelViewer2, wxT("Mask result") );
668  m_mgr_noteBookViewerResult->Update();
669  frame->Show();
670 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::ShowToolsPanel ( bool  show)

Definition at line 3152 of file wxContourMainFrame.cxx.

References _pannew, and interfMainPanel::Show().

3152  {
3153  _pannew->Show(show);
3154 }

Here is the call graph for this function:

void wxContourMainFrame::updateInstantAxes ( )

Definition at line 750 of file wxContourMainFrame.cxx.

Referenced by changeInstant().

751 {
752 }

Here is the caller graph for this function:

void wxContourMainFrame::updateInstantImageData ( )

Definition at line 735 of file wxContourMainFrame.cxx.

References _instantPanel, _theViewPanel, wxContourViewPanel::changeImage(), ConceptDataWrap::getActualValue(), wxInstantChooserPanel::getConceptDataOf(), KernelManagerContour::getImageAtInstant(), wxInstantChooserPanel::getInstant(), kernelManager, wxContourViewPanel::setImageSlice(), and showAxis().

Referenced by changeInstant().

736 {
737  std::vector<int> inst;
738  _instantPanel->getInstant(inst);
739 
740  vtkImageData* img = kernelManager->getImageAtInstant(inst);
741  if(img!=NULL){
743  showAxis(false);
744  }else{
745  int z = _instantPanel->getConceptDataOf("Axe Depth")->getActualValue();
747  }
748 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxContourMainFrame::updateInstantOutlines ( )

Definition at line 717 of file wxContourMainFrame.cxx.

References _theViewPanel, wxContourViewPanel::addNameWrapperToScene(), and wxContourViewPanel::removeSceneContours().

Referenced by changeInstant().

718 {
721 
722  //for( int i=0; i<size; i++)
723  //{
724  // _theViewPanel->getSceneManager()->addToScene(namesWrapping[i]->getKeyName(), true, true, true, false, false );
725  //}
726 }

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bool wxContourMainFrame::_actorPresent
private

Definition at line 391 of file wxContourMainFrame.h.

ContourExtractData* wxContourMainFrame::_contourextractdata
private
int wxContourMainFrame::_contourGroup
private

Definition at line 359 of file wxContourMainFrame.h.

Referenced by changeInstant(), SetContourGroup(), and wxContourMainFrame().

bool wxContourMainFrame::_creatingContoursActive
private

Definition at line 403 of file wxContourMainFrame.h.

Referenced by wxContourMainFrame().

std::string wxContourMainFrame::_datadir
private

Definition at line 364 of file wxContourMainFrame.h.

Referenced by setVectImages(), and wxContourMainFrame().

std::string wxContourMainFrame::_fileLocation
private

Definition at line 430 of file wxContourMainFrame.h.

Referenced by GetFileLocation(), and SetFileLocation().

std::string wxContourMainFrame::_imageLocation
private

Definition at line 429 of file wxContourMainFrame.h.

std::vector<vtkImageData*> wxContourMainFrame::_images
private
int wxContourMainFrame::_numberOfVariablesStatistics
private
double wxContourMainFrame::_onePixelSize
private

Definition at line 428 of file wxContourMainFrame.h.

Referenced by onePixelSize(), onLoadContours(), and saveFileWithContours().

interfMainPanel* wxContourMainFrame::_pannew
private

Definition at line 362 of file wxContourMainFrame.h.

Referenced by ShowToolsPanel(), wxContourMainFrame(), and ~wxContourMainFrame().

PerformingOperation* wxContourMainFrame::_performingOperation
private

Definition at line 363 of file wxContourMainFrame.h.

Referenced by onCopy(), onMirror(), onPaste(), and wxContourMainFrame().

manualLineControler* wxContourMainFrame::_refLineControl
private

Definition at line 369 of file wxContourMainFrame.h.

Referenced by referenceLine(), refLineHide(), refLineShow(), and wxContourMainFrame().

manualContourModelLine* wxContourMainFrame::_refLineModel
private
manualViewLine* wxContourMainFrame::_refLineView
private
int wxContourMainFrame::_tmpReadFileImageDim[3]
private

Definition at line 394 of file wxContourMainFrame.h.

Referenced by openContours(), and readDimSpc().

double wxContourMainFrame::_tmpReadFileImageSpac[3]
private

Definition at line 395 of file wxContourMainFrame.h.

Referenced by openContours(), and readDimSpc().

int wxContourMainFrame::_tmpReadFileTypeOfTransformation
private

Definition at line 396 of file wxContourMainFrame.h.

Referenced by onLoadContours(), openContours(), and readDimSpc().

ColorLayerImageView* wxContourMainFrame::_viewColorLayerImage
private
ColorLayerImageViewPanel* wxContourMainFrame::_viewColorLayerImagePanel
private
ThresholdImageView* wxContourMainFrame::_viewMaskImage
private

Definition at line 380 of file wxContourMainFrame.h.

Referenced by changeInstant(), getMaskImageViewPanel(), and wxContourMainFrame().

ThresholdImageViewPanel* wxContourMainFrame::_viewMaskImagePanel
private

Definition at line 381 of file wxContourMainFrame.h.

Referenced by changeInstant(), getMaskImageViewPanel(), and wxContourMainFrame().

ThresholdImageView* wxContourMainFrame::_viewThresholdImage
private
ThresholdImageViewPanel* wxContourMainFrame::_viewThresholdImagePanel
private
wxPanel* wxContourMainFrame::calibrationPanel
private

Definition at line 426 of file wxContourMainFrame.h.

wxPanel* wxContourMainFrame::calibrationPanelError
private

Definition at line 427 of file wxContourMainFrame.h.

char wxContourMainFrame::COPY = 'C'
staticprivate

Definition at line 422 of file wxContourMainFrame.h.

Referenced by onCopy(), onMirror(), and onPaste().

wxWindow* wxContourMainFrame::infoWin2
private

Definition at line 425 of file wxContourMainFrame.h.

int wxContourMainFrame::inredo
private

Definition at line 419 of file wxContourMainFrame.h.

Referenced by wxContourMainFrame().

wxContourMainFrame * wxContourMainFrame::instance = NULL
staticprivate

Definition at line 360 of file wxContourMainFrame.h.

Referenced by getInstance(), resetInstance(), and ~wxContourMainFrame().

int wxContourMainFrame::inundo
private

Definition at line 420 of file wxContourMainFrame.h.

Referenced by wxContourMainFrame().

wxAuiManager wxContourMainFrame::m_mgr
private
long wxContourMainFrame::m_notebook_style
private

Definition at line 375 of file wxContourMainFrame.h.

Referenced by createNotebook(), ShowResultImages(), and wxContourMainFrame().

long wxContourMainFrame::m_notebook_theme
private

Definition at line 376 of file wxContourMainFrame.h.

Referenced by wxContourMainFrame().

wxAuiNotebook* wxContourMainFrame::notebook
private

Definition at line 374 of file wxContourMainFrame.h.

Referenced by addNewPanel(), configurePanels(), and setVectImages().

std::string wxContourMainFrame::stundoredo
private

Definition at line 421 of file wxContourMainFrame.h.


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