]> Creatis software - creaContours.git/commitdiff
no message
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Tue, 15 Feb 2011 00:11:59 +0000 (00:11 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Tue, 15 Feb 2011 00:11:59 +0000 (00:11 +0000)
appli/wxContourGUIExample/wxContourGUIExample.cxx
lib/Interface_Icons_NDimensions/interfMainPanel.cxx
lib/Interface_Icons_NDimensions/interfMainPanel.h
lib/Interface_Icons_NDimensions/interfToolsPanels.cxx
lib/Interface_Icons_NDimensions/interfToolsPanels.h
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h
lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx
lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h
lib/kernel_ManagerContour_NDimensions/OutlineModelManager.cxx

index 7232e9929441ba1d04e02c2b4444d0d0d468b2ee..4c26c642884fd832f49c57bef62093f14bb5be4e 100644 (file)
@@ -1,7 +1,7 @@
 //----------------------------------------------------------------------------------------------------------------
 // Class definition include
 //----------------------------------------------------------------------------------------------------------------
+
 #include "wxContourGUIExample.h"
 #include "wxContourMainFrame.h"
 //#include "OutlineModelManager.h"
 
 //#include "interfMainPanel.h"
 
-#if defined(MACOSX) // assume this is OSX 
+#if defined(MACOSX) // assume this is OSX
 # include <sys/param.h>
-# include <mach-o/dyld.h> // _NSGetExecutablePath : must add -framework CoreFoundation to link line 
+# include <mach-o/dyld.h> // _NSGetExecutablePath : must add -framework CoreFoundation to link line
 # include <string.h>
 # ifndef PATH_MAX
 #  define PATH_MAX MAXPATHLEN
 # endif
 #endif // MACOSX
 */
-#ifndef PATH_MAX // If not defined yet : do it 
+
+#ifndef PATH_MAX // If not defined yet : do it
 #  define PATH_MAX 2048
 #endif
 
 #if defined(WIN32)
   #include <direct.h>
 #else
-   #include <dirent.h>  
+   #include <dirent.h>
 #endif
 
 #include <stdlib.h>
@@ -100,38 +100,38 @@ bool wxTheApplication :: OnInit()
 
 
 //EED 1Juin2010
-      creaImageIO::WxSimpleDlg w(0,_T("Select your image"),"creaContours_Descriptor.dscp","creatisContours DB"); 
-      w.ShowModal(); 
-  
+      creaImageIO::WxSimpleDlg w(0,_T("Select your image"),"creaContours_Descriptor.dscp","creatisContours DB");
+      w.ShowModal();
+
        std::vector<vtkImageData*> images;
 //EED 1Juin2010
 //     creaImageIO::WxGimmickReaderDialog w(0,
 //                                                                             -1,
 //                                                                             "creaContours_Descriptor.dscp",
-//                                                                             "creatisContours DB", 
+//                                                                             "creatisContours DB",
 //                                                                             _T("WxGimmickDialog test"),
 //                                                                             wxDefaultPosition,wxSize(1200,800)
 //                                                                             ,min_image_type,
 //                                                                             max_image_type,
 //                                                                             output_dim,
-//                                                                             threads);  
+//                                                                             threads);
 //     w.ShowModal();
 
 
 //JCP
-       //std::string datadir(  crea::wx2std(GetExecutablePath()) );    
+       //std::string datadir(  crea::wx2std(GetExecutablePath()) );
        std::string datadir(  crea::System::GetExecutablePath() );
 //JCP
 
            #ifdef LINUX /* assume this is OSX */
                   datadir=datadir+"/../share/creaContours";
-           #endif // MACOSX    
-       
+           #endif // MACOSX
+
                #ifdef MACOSX /* assume this is OSX */
                        datadir=datadir+"/../../../../share/creaContours";
-               #endif // MACOSX        
-               
-               
+               #endif // MACOSX
+
+
                if(w.GetReturnCode() == wxID_OK)
                {
                                std::vector<std::string> s;
@@ -175,21 +175,21 @@ bool wxTheApplication :: OnInit()
                else if (w.GetReturnCode() == wxID_CANCEL)
                {
                                vtkMetaImageReader *reader = vtkMetaImageReader::New();
-                               std::string filename= datadir + "/data/hola.mhd";          
+                               std::string filename= datadir + "/data/hola.mhd";
                                infoImage=_T("DEFAULT-Image:")+crea::std2wx(filename);
                                reader->SetFileName( filename.c_str() );
                                reader->Update();
                                images.push_back(reader->GetOutput());
                        }
                        else
-                       {        
+                       {
                                return -1;
-                       }   
+                       }
 
 
        wxFrame* frame1 = new wxFrame(NULL, wxID_ANY, wxT("Creatis- ROI Application- Evaluation version,01 Agost 2010 ")+infoImage, wxPoint(400,50), wxSize(800, 600) );
 
-       //frame = new wxContourMainFrame( frame1, wxID_ANY, wxString(_T("")), wxPoint(50,50), wxSize(800, 600), images ); 
+       //frame = new wxContourMainFrame( frame1, wxID_ANY, wxString(_T("")), wxPoint(50,50), wxSize(800, 600), images );
        frame = wxContourMainFrame::getInstance(frame1, wxID_ANY, wxString(_T("")), wxPoint(200,50), wxSize(800, 600), images,  wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,datadir );
        frame1->CreateStatusBar();
        frame1->Show(TRUE);
@@ -198,11 +198,11 @@ bool wxTheApplication :: OnInit()
 }
 
 #if(WIN32)
-int main(int argc, char* argv[])                                       
-  {                                                                    
-    return WinMain(::GetModuleHandle(NULL), NULL,                      
-                  ::GetCommandLine(), SW_SHOWNORMAL);                  
-  }            
+int main(int argc, char* argv[])
+  {
+    return WinMain(::GetModuleHandle(NULL), NULL,
+                  ::GetCommandLine(), SW_SHOWNORMAL);
+  }
 #else
 #endif
 
index 1dc37456e1670b69399872282a7f6337b10ea1a4..c1179ebc2b43ef97db6898fd80178767d046bf42 100644 (file)
@@ -12,10 +12,10 @@ interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtH
        PANEL1                                  = "I/O";
        PANEL2                                  = "Edit";
        PANEL3                                  = "Delete";
-       PANEL4                                  = "Contour Tools";  
+       PANEL4                                  = "Contour Tools";
        PANEL5                                  = "Segmentation";
 //EED 07/07/2010
-       PANEL6                                  = "Image Tools";  
+       PANEL6                                  = "Image Tools";
 
        segmentPanel                    = NULL;
        segmentPanelITK                 = NULL;
@@ -42,7 +42,7 @@ interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtH
 
        wxPanel* toolpanel = new wxPanel(splitterwindow, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_DOUBLE, wxString(_T("")));
 
-       wxFlexGridSizer* flexsizer = new wxFlexGridSizer(6,2,1,1);      
+       wxFlexGridSizer* flexsizer = new wxFlexGridSizer(6,2,1,1);
        toolpanel->SetSizer(flexsizer, true);
        toolpanel->SetAutoLayout( true );
 
@@ -71,35 +71,35 @@ interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtH
        wxPanel* mentex5 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
 //EED 07/07/2010
        wxPanel* mentex6 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
-       
-       menubar  = new interfNewContourMenu  (mentex,  sizex, sizey, evtHandler, datadir);              
-       menubar1 = new interfIOMenu          (mentex1, sizex, sizey, evtHandler, datadir);      
-       menubar2 = new interfEditMenu        (mentex2, sizex, sizey, evtHandler, datadir);      
-       menubar3 = new interfDeleteMenu      (mentex3, sizex, sizey, evtHandler, datadir);      
+
+       menubar  = new interfNewContourMenu  (mentex,  sizex, sizey, evtHandler, datadir);
+       menubar1 = new interfIOMenu          (mentex1, sizex, sizey, evtHandler, datadir);
+       menubar2 = new interfEditMenu        (mentex2, sizex, sizey, evtHandler, datadir);
+       menubar3 = new interfDeleteMenu      (mentex3, sizex, sizey, evtHandler, datadir);
        menubar4 = new interfToolsMenu       (mentex4, sizex ,sizey, evtHandler, datadir);
        menubar5 = new interfSegmentationMenu(mentex5, sizex, sizey, evtHandler, datadir);
        menubar6 = new interfImageToolsMenu(mentex6, sizex, sizey, evtHandler, datadir);
-               
-       statictext  = getText(mentex,  PANEL);  
-       statictext1 = getText(mentex1, PANEL1); 
-       statictext2 = getText(mentex2, PANEL2); 
-       statictext3 = getText(mentex3, PANEL3); 
-       statictext4 = getText(mentex4, PANEL4); 
-       statictext5 = getText(mentex5, PANEL5); 
-       statictext6 = getText(mentex6, PANEL6); 
-       
+
+       statictext  = getText(mentex,  PANEL);
+       statictext1 = getText(mentex1, PANEL1);
+       statictext2 = getText(mentex2, PANEL2);
+       statictext3 = getText(mentex3, PANEL3);
+       statictext4 = getText(mentex4, PANEL4);
+       statictext5 = getText(mentex5, PANEL5);
+       statictext6 = getText(mentex6, PANEL6);
+
        flexsizer->Add(b, wxFIXED_MINSIZE);
        flexsizer->Add(setMenuTextSizer(mentex, menubar,statictext), wxFIXED_MINSIZE);
 
        flexsizer->Add(b1, wxFIXED_MINSIZE);
        flexsizer->Add(setMenuTextSizer(mentex1, menubar1,statictext1), wxFIXED_MINSIZE);
-       
+
        flexsizer->Add(b2, wxFIXED_MINSIZE);
        flexsizer->Add(setMenuTextSizer(mentex2, menubar2,statictext2), wxFIXED_MINSIZE);
-       
+
        flexsizer->Add(b3, wxFIXED_MINSIZE);
        flexsizer->Add(setMenuTextSizer(mentex3, menubar3,statictext3), wxFIXED_MINSIZE);
-       
+
        flexsizer->Add(b4, wxFIXED_MINSIZE);
        flexsizer->Add(setMenuTextSizer(mentex4, menubar4,statictext4), wxFIXED_MINSIZE);
 
@@ -112,15 +112,15 @@ interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtH
        toolpanel->Layout();
 
        infoPanel = new wxPanel(splitterwindow, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_DOUBLE, wxString(_T("")));
-       wxFlexGridSizer* infosizer = new wxFlexGridSizer(1,1,2,2);      
+       wxFlexGridSizer* infosizer = new wxFlexGridSizer(1,1,2,2);
        infoPanel->SetSizer(infosizer, true);
-       infoPanel->SetAutoLayout( true );       
+       infoPanel->SetAutoLayout( true );
 
        splitterwindow->Initialize(toolpanel);
        splitterwindow->SetSashGravity(1);
 //EED  splitterwindow->SetSashPosition(600);
        splitterwindow->SetSashSize(5);
-       splitterwindow->SplitHorizontally(toolpanel, infoPanel,8*73);   
+       splitterwindow->SplitHorizontally(toolpanel, infoPanel,8*73);
 
        Connect(b->GetId(),  wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&interfMainPanel::onActionButtonPressed1);
        Connect(b1->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&interfMainPanel::onActionButtonPressed1);
@@ -141,7 +141,7 @@ interfMainPanel::~interfMainPanel(void)
 interfMainPanel* interfMainPanel::getInstance(wxWindow* parent, std::string datadir, wxEvtHandler * evtHandler)
 {
        _newframe = new wxFrame(parent, -1, wxT(" Contour Tools "), wxPoint(25,50), wxSize(350,900),wxFRAME_TOOL_WINDOW|wxSYSTEM_MENU | wxCAPTION |  wxCLIP_CHILDREN |wxFRAME_FLOAT_ON_PARENT);
-                                                                                                                                                               
+
        if(interfmainpanel == NULL){
                interfmainpanel = new interfMainPanel(_newframe, 350, 900, evtHandler, datadir);
        }
@@ -150,7 +150,7 @@ interfMainPanel* interfMainPanel::getInstance(wxWindow* parent, std::string data
 }
 
 interfMainPanel* interfMainPanel::getInstance(wxWindow* parent, wxEvtHandler * evtHandler)
-{      
+{
 
        _newframe = new wxFrame(parent, -1, wxT(" Contour Tools "), wxPoint(25,50), wxSize(350,900),wxFRAME_TOOL_WINDOW|wxSYSTEM_MENU | wxCAPTION |  wxCLIP_CHILDREN |wxFRAME_FLOAT_ON_PARENT );
 
@@ -167,7 +167,7 @@ bool interfMainPanel::Show(bool show)
 }
 
 interfMainPanel* interfMainPanel::getInstance()
-{      
+{
        return interfmainpanel;
 }
 
@@ -200,7 +200,7 @@ wxPanel* interfMainPanel::initializeToolsPanel(wxWindow* parent, int sizex, int
 /**
 **     Adds a new checkbox to the scrolledwindow using the checkboxsizer
 **     @Params id of contour
-**     
+**
 **/
 void interfMainPanel::addContourCheckBox(std::string id)
 {
@@ -210,7 +210,7 @@ void interfMainPanel::addContourCheckBox(std::string id)
 /**
 **     Removes a checkbox from the list of checkboxes in the flexsizer (checkboxsizer)
 **     @Params id of contour
-**     
+**
 **/
 void interfMainPanel::removeContourCheckBox(std::string id)
 {
@@ -230,7 +230,7 @@ void interfMainPanel::onActionButtonPressed1( wxCommandEvent& event )
                dmenu = menubar;
                text = statictext;
        }else if(dstring.compare(PANEL1)==0 ){
-               dmenu = menubar1;       
+               dmenu = menubar1;
                text = statictext1;
        }else if(dstring.compare(PANEL2)==0){
                dmenu = menubar2;
@@ -254,35 +254,35 @@ void interfMainPanel::onActionButtonPressed1( wxCommandEvent& event )
                sizechange = 1;
                b->SetLabel(_T("-"));
        }else{
-               dmenu->Show(false);             
+               dmenu->Show(false);
                sizechange = -1;
                b->SetLabel(_T("+"));
-       }       
-       
+       }
+
        sizechange *= (dmenu->GetSize().GetHeight()-10);
        splitterwindow->SetSashPosition(splitterwindow->GetSashPosition()+sizechange);
-       
+
        this->Layout();
        this->Refresh();
 }
 
 wxStaticText* interfMainPanel::getText(wxWindow* parent, std::string nom)
 {
-       return new wxStaticText(parent, -1, wxString(nom.c_str(),wxConvUTF8), wxDefaultPosition, 
+       return new wxStaticText(parent, -1, wxString(nom.c_str(),wxConvUTF8), wxDefaultPosition,
                                        wxDefaultSize, wxALIGN_CENTRE, wxString(nom.c_str(),wxConvUTF8));
 }
 
 wxButton* interfMainPanel::getButton(wxWindow* parent)
 {
-       wxButton* b = new wxButton(parent, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, 
-                                       wxDefaultValidator, wxString(_T("-"))); 
+       wxButton* b = new wxButton(parent, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT,
+                                       wxDefaultValidator, wxString(_T("-")));
        return b;
 }
 
 wxPanel* interfMainPanel::setMenuTextSizer(wxWindow* parent, wxPanel* panel, wxStaticText* text)
 {
 
-       wxFlexGridSizer* flexsizer = new wxFlexGridSizer(2,1,2,2);      
+       wxFlexGridSizer* flexsizer = new wxFlexGridSizer(2,1,2,2);
        parent->SetSizer(flexsizer, true);
        parent->SetAutoLayout( true );
 
@@ -294,7 +294,7 @@ wxPanel* interfMainPanel::setMenuTextSizer(wxWindow* parent, wxPanel* panel, wxS
 }
 
 /**
-**     Shows the panel in the 
+**     Shows the panel in the
 **/
 void interfMainPanel::showPanel(wxWindow* panel)
 {
@@ -304,7 +304,7 @@ void interfMainPanel::showPanel(wxWindow* panel)
        if(currentWindow != NULL){
                currentWindow->Hide();
                sizer->Remove(currentWindow);
-       }       
+       }
        sizer->Add(panel);
        currentWindow = panel;
        currentWindow->Show(true);
@@ -452,23 +452,23 @@ void interfMainPanel::onImport(){
 void interfMainPanel::onTest(){
        if(testPanel==NULL)
        {
-               testPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, 
+               testPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition,
                        wxDefaultSize, wxBORDER_STATIC, wxString(_T("")));
-               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
+               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);
                testPanel->SetSizer(flexsizer, true);
-               testPanel->SetAutoLayout( true );       
+               testPanel->SetAutoLayout( true );
                panelTest = new interfTestPanel(testPanel);
 
-               wxStaticText* stattext = new wxStaticText(mirrorPanel,  -1, 
-                       wxString(_T("   Test Panel   ")), 
-                       wxDefaultPosition, wxDefaultSize, 
+               wxStaticText* stattext = new wxStaticText(mirrorPanel,  -1,
+                       wxString(_T("   Test Panel   ")),
+                       wxDefaultPosition, wxDefaultSize,
                        wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
 
                flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
                flexsizer->Add(panelTest, wxEXPAND);
                testPanel->Layout();
                showPanel(testPanel);
-       }       
+       }
 }
 
 void interfMainPanel::RefreshInterface()
@@ -508,21 +508,21 @@ void interfMainPanel::onSegmentationAllSlice(int minZ,int maxZ,int isovalue,int
 }
 
 void interfMainPanel::setLabelSegmentationPanelVTK(wxString tmpString)
-{      
+{
     ((interfSegmentationPanelVTK*)segmentationPanel)->setLabel(tmpString);
 }
 void interfMainPanel::onSegmentationPressed()
 {
        if(segmentPanel == NULL){
                segmentPanel = new wxPanel(getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T("")));
-               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
+               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);
                segmentPanel->SetSizer(flexsizer, true);
-               segmentPanel->SetAutoLayout(true);      
+               segmentPanel->SetAutoLayout(true);
                segmentPanel->SetEventHandler(this);
-               
+
                //wxPanel* panel = contourevent->getSegmentationPanel(segmentPanel);
                segmentationPanel = new interfSegmentationPanelVTK(segmentPanel);
-       
+
 
                wxStaticText* stattext = new wxStaticText(segmentPanel, -1, wxString(_T("   Automatic Segmentation   ")), wxDefaultPosition,
                        wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
@@ -540,16 +540,16 @@ void interfMainPanel::onSegmentationPressedITK()
 {
     if(segmentPanelITK == NULL){
                segmentPanelITK = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T("")));
-                       
 
-               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
+
+               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);
                segmentPanelITK->SetSizer(flexsizer, true);
-               segmentPanelITK->SetAutoLayout( true ); 
+               segmentPanelITK->SetAutoLayout( true );
                //segmentPanelITK->SetEventHandler(this->contourevent);
-               
+
                //wxPanel* panel = contourevent->getSegmentationPanelITK(segmentPanelITK);
                wxPanel* panel = new interfSegmentationPanelITK(segmentPanelITK);
-       
+
                wxStaticText* stattext = new wxStaticText(segmentPanelITK, -1, wxString(_T("   Automatic ITK Segmentation   ")), wxDefaultPosition,
                        wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
 
@@ -568,7 +568,7 @@ void interfMainPanel::onRigidPressed()
 }
 
 void interfMainPanel::onWidthOfContour(double width)
-{    
+{
        wxContourMainFrame::getInstance()->onWidthOfContour(width);
 }
 
@@ -595,9 +595,9 @@ void interfMainPanel::onConfigurationPressed()
 {
        if(configPanel == NULL){
                configPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxString(_T("")));
-               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
+               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);
                configPanel->SetSizer(flexsizer, true);
-               configPanel->SetAutoLayout( true );     
+               configPanel->SetAutoLayout( true );
                //configPanel->SetEventHandler(this->contourevent);
                wxPanel* panel = new interfConfigurationPanel(configPanel);
                wxStaticText* stattext = new wxStaticText(configPanel, -1, wxString(_T("   Interface Configuration   ")), wxDefaultPosition,
@@ -614,14 +614,14 @@ void interfMainPanel::onSpreadPressed()
     if(spreadPanel==NULL){
 
                spreadPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T("")));
-               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
+               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);
                spreadPanel->SetSizer(flexsizer, true);
-               spreadPanel->SetAutoLayout( true );     
+               spreadPanel->SetAutoLayout( true );
                //spreadPanel->SetEventHandler(this->contourevent);
-               
+
                //wxPanel* panel = contourevent->getSpreadPanel(spreadPanel);
                panelSpread = new interfSpreadPanel(spreadPanel);
-       
+
 
                wxStaticText* stattext = new wxStaticText(spreadPanel, -1, wxString(_T("   Automatic Spread   ")), wxDefaultPosition,
                        wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
@@ -629,7 +629,7 @@ void interfMainPanel::onSpreadPressed()
                flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
                flexsizer->Add(panelSpread, wxEXPAND);
                spreadPanel->Layout();
-       }       
+       }
        showPanel(spreadPanel);
        //hideAxis();
 }
@@ -644,6 +644,12 @@ void interfMainPanel::onSpreadAdd()
        wxContourMainFrame::getInstance()->onSpreadAdd();
 }
 
+void interfMainPanel::onSpreadAddAll()
+{
+       wxContourMainFrame::getInstance()->onSpreadAddAll();
+}
+
+
 void interfMainPanel::appendStringSpread(std::string val)
 {
     panelSpread->appendStringSpread(val);
@@ -661,12 +667,12 @@ void interfMainPanel::setStringSpread(std::string stringtemp)
 
 void interfMainPanel::onInformationPressed()
 {
-       
+
        // Statistics frame
        if(infoWin ==NULL){
                infoWin                 = new wxFrame (this, -1,_T("  Statistics  "), wxDefaultPosition, wxDefaultSize, wxFRAME_TOOL_WINDOW|wxSYSTEM_MENU | wxCAPTION |  wxCLIP_CHILDREN |wxFRAME_FLOAT_ON_PARENT | wxRESIZE_BORDER  );
                infoWin->SetSize( wxSize(825,650) );
-               
+
                wxSize sizepanel(825,675);
                informationPanel        = new interfInformationPanel(infoWin);//contourevent->getInformationPanel(infoWin);
 
@@ -687,57 +693,57 @@ void interfMainPanel::onInformationPressed()
                        infoWin->Show(true);
                }
        }
-               
-//CMRU 29-08-09----------------------------------------------------------------------------------------------- 
+
+//CMRU 29-08-09-----------------------------------------------------------------------------------------------
        if(panelAux == NULL)
        {
                panelAux = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxString(_T("")));
-       }       
+       }
 //------------------------------------------------------------------------------------------------------------
 
        // mask view control panel
        if(infoPanelMask == NULL){
                infoPanelMask = new wxPanel(panelAux, -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxString(_T("")));
-               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
+               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);
                infoPanelMask->SetSizer(flexsizer, true);
-               infoPanelMask->SetAutoLayout( true );   
+               infoPanelMask->SetAutoLayout( true );
                //configPanel->SetEventHandler(this->contourevent);
-               wxPanel *panel = wxContourMainFrame::getInstance()->getMaskImageViewPanel( infoPanelMask );                             
+               wxPanel *panel = wxContourMainFrame::getInstance()->getMaskImageViewPanel( infoPanelMask );
                wxStaticText* stattext = new wxStaticText(infoPanelMask, -1, wxString(_T("   Mask segmentation    ")), wxDefaultPosition,
                                                                                                  wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
-               
+
                flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
-               
+
                flexsizer->Add(panel, wxEXPAND);
                infoPanelMask->Layout();
-               
+
        }
-       
+
 //CMRU 29-08-09-----------------------------------------------------------------------------------------------
        //Calibration panel
        if(infoPanelCalibration == NULL)
        {
                infoPanelCalibration = new wxPanel(panelAux, -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER , wxString(_T("")));
-               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
+               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);
                infoPanelCalibration->SetSizer(flexsizer, true);
-               infoPanelCalibration->SetAutoLayout( true );    
+               infoPanelCalibration->SetAutoLayout( true );
 
                wxPanel *panel = new interfCalibrationPanel(infoPanelCalibration);
                wxStaticText* stattext = new wxStaticText(infoPanelCalibration, -1, wxString(_T("              Calibration               ")), wxDefaultPosition,
                                                                                                  wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
-               
+
                flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
-               
+
                flexsizer->Add(panel, wxEXPAND);
                infoPanelCalibration->Layout();
        }
 
        wxFlexGridSizer* sizer = new wxFlexGridSizer(1);
        panelAux->SetSizer(sizer, true);
-       panelAux->SetAutoLayout( true );        
+       panelAux->SetAutoLayout( true );
        sizer->Add(infoPanelMask);
        sizer->Add(infoPanelCalibration);
-       
+
        showPanel(panelAux);
 
 //------------------------------------------------------------------
@@ -794,13 +800,13 @@ void interfMainPanel::setColLableInfoPanel(int tmpIntB,wxString tmpTitleString)
 
 void interfMainPanel::SetScalarRange(int grayRangeMin,int grayRangeMax)
 {
-       wxContourMainFrame::getInstance()->SetScalarRange(grayRangeMin, grayRangeMax); 
+       wxContourMainFrame::getInstance()->SetScalarRange(grayRangeMin, grayRangeMax);
 }
 
-void interfMainPanel::onSaveResults(std::string directory,std::string namefile, std::string filename, 
+void interfMainPanel::onSaveResults(std::string directory,std::string namefile, std::string filename,
                                                                        int typeContourGroup, int selection, int minZ, int maxZ ,bool XYZValues, bool contourImage, bool statistics)
 {
-       wxContourMainFrame::getInstance()->onSaveResults(directory, namefile, filename, 
+       wxContourMainFrame::getInstance()->onSaveResults(directory, namefile, filename,
                typeContourGroup, selection, minZ,maxZ, XYZValues, contourImage, statistics);
 }
 
@@ -820,11 +826,11 @@ void interfMainPanel::onMirrorPressed(){
        {
 
                mirrorPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T("")));
-               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
+               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);
                mirrorPanel->SetSizer(flexsizer, true);
-               mirrorPanel->SetAutoLayout( true );     
+               mirrorPanel->SetAutoLayout( true );
                panelMirror = new interfMirrorPanel(mirrorPanel);
-       
+
                wxStaticText* stattext = new wxStaticText(mirrorPanel, -1, wxString(_T("   Mirroring Tool   ")), wxDefaultPosition,
                        wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
 
@@ -834,7 +840,7 @@ void interfMainPanel::onMirrorPressed(){
 
                refLineShown=true;
                wxContourMainFrame::getInstance()->referenceLine();
-       }       
+       }
 
        else
        {
@@ -883,11 +889,11 @@ void interfMainPanel::onColorLayerImagePressed()
        // Color Image Layer  view control panel
        if(colorImageLayerPanel == NULL){
                colorImageLayerPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxString(_T("")));
-               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
+               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);
                colorImageLayerPanel->SetSizer(flexsizer, true);
-               colorImageLayerPanel->SetAutoLayout( true );    
+               colorImageLayerPanel->SetAutoLayout( true );
                //configPanel->SetEventHandler(this->contourevent);
-               wxPanel *panel = wxContourMainFrame::getInstance()->getColorLayerImageViewPanel( colorImageLayerPanel );                                
+               wxPanel *panel = wxContourMainFrame::getInstance()->getColorLayerImageViewPanel( colorImageLayerPanel );
                wxStaticText* stattext = new wxStaticText(colorImageLayerPanel, -1, wxString(_T("   Color Image Layer     ")), wxDefaultPosition,
                                                                                                  wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
                flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
@@ -900,20 +906,20 @@ void interfMainPanel::onColorLayerImagePressed()
 
 //EED01
 void interfMainPanel::onThresholdPressed()
-{      
+{
        // Threshold view control panel
        if(thresholdPanel == NULL){
                thresholdPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxString(_T("")));
-               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
+               wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);
                thresholdPanel->SetSizer(flexsizer, true);
-               thresholdPanel->SetAutoLayout( true );  
+               thresholdPanel->SetAutoLayout( true );
                //configPanel->SetEventHandler(this->contourevent);
-               wxPanel *panel = wxContourMainFrame::getInstance()->getThresholdImageViewPanel( thresholdPanel );                               
+               wxPanel *panel = wxContourMainFrame::getInstance()->getThresholdImageViewPanel( thresholdPanel );
                wxStaticText* stattext = new wxStaticText(thresholdPanel, -1, wxString(_T("   Threshold segmentation    ")), wxDefaultPosition,
                                                                                                  wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
                flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
                flexsizer->Add(panel, wxEXPAND);
-               thresholdPanel->Layout();               
+               thresholdPanel->Layout();
        }
        showPanel(thresholdPanel);
        wxContourMainFrame::getInstance()->changeInstant();
@@ -932,7 +938,7 @@ void interfMainPanel::SetContourGroup(int contourGroup)
 }
 
 //CMRU 17-08-09 ---------------------------------------------
-void interfMainPanel::onPrintLabel () 
+void interfMainPanel::onPrintLabel ()
 {
        wxString label;
        manualBaseModel* manualModel = wxContourMainFrame::getInstance()->getContour();
@@ -945,10 +951,10 @@ void interfMainPanel::onPrintLabel ()
        }
 
        wxTextEntryDialog* dialog = new wxTextEntryDialog(this,_T("Enter a tag name: ")) ;
-       
+
        if (dialog->ShowModal() == wxID_OK)
        {
-               label = dialog->GetValue(); 
+               label = dialog->GetValue();
 
                if(label.Len()!=0)
                {
@@ -967,15 +973,15 @@ void interfMainPanel::onPrintLabel ()
 void interfMainPanel::onCalibration(wxString size, int unit)
 {
        int type = 0;
-       double contourSize = 0.0; 
+       double contourSize = 0.0;
        double realSizeDouble = 0.0;
 
-       type = wxContourMainFrame::getInstance()->getType(); 
+       type = wxContourMainFrame::getInstance()->getType();
        contourSize = wxContourMainFrame::getInstance()->getContourSizeInPixels();
 
        std::cout<<"Cata->Tamaño del contorno en pixeles:"<<contourSize<<endl;
-       
-       if ( type == 6 ) 
+
+       if ( type == 6 )
        {
                if (size.ToDouble(&realSizeDouble))
                {
@@ -987,27 +993,27 @@ void interfMainPanel::onCalibration(wxString size, int unit)
                        {
                                realSizeDouble = realSizeDouble * 25.4;
                        }
-                       std::cout<< "Valor del usuario" << realSizeDouble<< endl ; 
+                       std::cout<< "Valor del usuario" << realSizeDouble<< endl ;
                        onePixelSize (realSizeDouble,contourSize);
                 }
                 else
                 {
                        wxMessageDialog *dial = new wxMessageDialog(NULL, wxT("Please enter a numeric value"), wxT("Warning"), wxOK | wxICON_EXCLAMATION);
                        dial->ShowModal();
-                }              
+                }
        }
-       else 
+       else
        {
                wxMessageDialog *dial = new wxMessageDialog(NULL, wxT("Please select a line contour"), wxT("Warning"), wxOK | wxICON_EXCLAMATION);
                dial->ShowModal();
        }
-       
+
        wxMessageDialog *dial = new wxMessageDialog(NULL, wxT("The calibration was made"), wxT("Information"), wxOK | wxICON_INFORMATION);
        dial->ShowModal();
        std::cout<< "Cata-> Se ha realizado la calibracion" << endl ;
 }
 
-double interfMainPanel::onePixelSize (double realSize,double sizePixel) 
+double interfMainPanel::onePixelSize (double realSize,double sizePixel)
 {
        _pixelValue = realSize/sizePixel;
        std::cout<< "Valor del un pixel = " << _pixelValue<< endl ;
index cea3b745dc810773fd831809b637304505654aa4..730796e21e8535a84081a5dd3ac719055628bd10 100644 (file)
@@ -30,7 +30,7 @@
 class interfMainPanel : public wxPanel {
 
 public:
-       
+
        interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtHandler * evtHandler, std::string datadir = "data/Icons");
        ~interfMainPanel(void);
 
@@ -54,14 +54,14 @@ public:
        /**
        **      Adds a new checkbox to the scrolledwindow using the checkboxsizer
        **      @Params id of contour
-       **      
+       **
        **/
        void addContourCheckBox(std::string id);
 
        /**
        **      Removes a checkbox from the list of checkboxes in the flexsizer (checkboxsizer)
        **      @Params id of contour
-       **      
+       **
        **/
        void removeContourCheckBox(std::string id);
 
@@ -75,12 +75,12 @@ public:
        void onActionButtonPressed1( wxCommandEvent& event );
 
        /**
-       **      Shows the panel in the 
+       **      Shows the panel in the
        **/
        void showPanel(wxWindow* panel);
 
        /**
-       **      Hides the panel in the 
+       **      Hides the panel in the
        **/
        void hidePanel( );
 
@@ -88,14 +88,14 @@ public:
        **      Gets the Information panel
        **/
        wxPanel* getInfoPanel();
-       
+
        /**
        **      This methods connect the event in the class interfNewContourMenu with the world of the appli
        **/
        void onCreateContourSpline( );
        void onCreateContourRectangle( );
        void onCreateContourCircle( );
-       void onCreateContourLine( );    
+       void onCreateContourLine( );
        // RaC 09-09 ---------------------
        void onCreateContourPoints( );
        // RaC 09-09 ---------------------
@@ -103,7 +103,7 @@ public:
        // RaC 10-09 ---------------------
        void onCreateContourPolygon( );
        // RaC 10-09 ---------------------
-       
+
        void onCreateContoursBullEye(wxPanel* panBull);
        /////////////////////////////////
        void onDeleteContour();
@@ -148,6 +148,7 @@ public:
        void onConfigurationPressed();
        void resetAppend();
        void onSpreadAdd();
+       void onSpreadAddAll();
        void appendStringSpread(std::string val);
        void onSpreadGo(int type);
        void setStringSpread(std::string stringtemp);
@@ -155,7 +156,7 @@ public:
        void getInstantVector(std::vector<int>& tempVector);
        std::vector<std::string> getOutlinesName(int slide);
        void onInformationContourLabels(int typeContourGroup,int selection,int minZ,int maxZ,int grayRangeMin,int grayRangeMax);
-       void setStringInfoPanel(wxString tmpString);    
+       void setStringInfoPanel(wxString tmpString);
        void setRowLabelInfoPanel(int z, wxString tempString);
        int getNumberColsInformationPanel();
        void appendColsInformationPanel(int _numberOfVariablesStatistics);
@@ -171,27 +172,27 @@ public:
        void SetContourGroup(int contourGroup);
 
 //CMRU 29-08-09-----------------------------------------------------------------------------------------------
-       
+
        /**
        * Associates the current selected contour with a label
        */
        void onPrintLabel();
-       
-       
+
+
        /**
        * Calculates the pixel value in milimeters according to the current contour if the selected contour is a Line Contour
        * @param size Size in milimeters of the selected contour
        * @param unit Measurement unit
        */
        void onCalibration(wxString size, int unit);
-       
+
        /**
        * Calculate the pixel value in milimeters
        * @param realSize Size of the contour in milimeters
        * @param sizePixel Size of the contour in pixels
        */
        double onePixelSize (double realSize,double sizePixel);
-       
+
        /**
        * Returns the value of a pixel in milimeters
        */
@@ -199,7 +200,7 @@ public:
 //------------------------------------------------------------------------------------------------------------
 
 private:
-       
+
 
        static interfMainPanel* interfmainpanel;
 
@@ -220,12 +221,12 @@ private:
        wxPanel* infoPanelMask;
 
 //CMRU 17-08-09 ------------------------------------------------------------------
-       
+
        /**
        * Panel with the calibration options
        */
        wxPanel* infoPanelCalibration;
-       
+
        /**
        * Panel who contains the calibration panel and the information panel mask
        */
@@ -234,7 +235,7 @@ private:
        /**
        * Value of a pixel in milimeters
        */
-       double _pixelValue; 
+       double _pixelValue;
 //--------------------------------------------------------------------------------
 
        wxStaticText* statictext;
@@ -261,19 +262,19 @@ private:
        interfSpreadPanel       *panelSpread;
        wxWindow                        *infoWin;
        wxPanel                         *informationPanel;
-       
+
        wxPanel                         *testPanel;
        interfTestPanel         *panelTest;
 
        wxPanel                         *mirrorPanel;
-       interfMirrorPanel       *panelMirror;   
+       interfMirrorPanel       *panelMirror;
 
        wxPanel                         *thresholdPanel;
        wxPanel                         *colorImageLayerPanel;
-       
+
        bool axisshown;
        bool refLineShown;
-       
+
        //This attribute contains the panel in charge of adding and removing the corresponding checkboxes in
        //list of contours
        interfToolsSpreadPanel* toolspread;
@@ -300,7 +301,7 @@ private:
        **/
        wxPanel* setMenuTextSizer(wxWindow* parent, wxPanel* panel, wxStaticText* text);
 
-       
+
 };
 
 #endif
index f5f787192061b92bb8ea37e039be997d0e0c5802..aebcf21a14bcd7027525bf77b3cc5d9fd73460d6 100644 (file)
@@ -103,7 +103,8 @@ interfSpreadPanel::interfSpreadPanel(wxWindow* parent)
        //wxPanel *panel                                                        = new wxPanel(parent,-1,wxDefaultPosition, wxDefaultSize,wxNO_BORDER, wxString("",wxConvUTF8));
 
        wxButton *spreadResetBtn        = new wxButton(this,-1,_T("Reset"),wxDefaultPosition, wxDefaultSize );
-       wxButton *spreadAddBtn          = new wxButton(this,-1,_T("Add"),wxDefaultPosition, wxDefaultSize);
+       wxButton *spreadAddBtn          = new wxButton(this,-1,_T("Add key contour "),wxDefaultPosition, wxDefaultSize);
+       wxButton *spreadAddAllBtn       = new wxButton(this,-1,_T("Add All to key contour"),wxDefaultPosition, wxDefaultSize);
 
        wxString lstOptions[3];
        lstOptions[0]=_T("A");
@@ -120,11 +121,13 @@ interfSpreadPanel::interfSpreadPanel(wxWindow* parent)
 
        Connect( spreadResetBtn->GetId(),       wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadReset );
        Connect( spreadAddBtn->GetId(),         wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadAdd );
+       Connect( spreadAddAllBtn->GetId(),      wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadAddAll );
        Connect( spreadGoBtn->GetId(),          wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadGo );
 
        wxFlexGridSizer * sizer         = new wxFlexGridSizer(1);
        sizer -> Add( spreadResetBtn            , 1, wxGROW );
        sizer -> Add( spreadAddBtn                      , 1, wxGROW );
+       sizer -> Add( spreadAddAllBtn           , 1, wxGROW );
        sizer -> Add( _spreadMethodRadiobox     , 1, wxGROW );
        sizer -> Add( spreadGoBtn                       , 1, wxGROW );
        sizer -> Add( _staticTextSpread         , 1, wxGROW );
@@ -146,12 +149,16 @@ void interfSpreadPanel::onSpreadReset(wxCommandEvent& event){
        _wxtextctrlSpread->SetValue(wxString("",wxConvUTF8));
        interfMainPanel::getInstance()->resetAppend();
 }
+
 void interfSpreadPanel::onSpreadAdd(wxCommandEvent& event){
        interfMainPanel::getInstance()->onSpreadAdd();
 }
-void interfSpreadPanel::onSpreadGo(wxCommandEvent& event){
 
+void interfSpreadPanel::onSpreadAddAll(wxCommandEvent& event){
+       interfMainPanel::getInstance()->onSpreadAddAll();
+}
 
+void interfSpreadPanel::onSpreadGo(wxCommandEvent& event){
        setStringSpread("   ");
        int typeMethodFindCtrlPoints=_spreadMethodRadiobox->GetSelection();
 printf("EED interfSpreadPanel::onSpreadGo %d\n",typeMethodFindCtrlPoints);
index 85b05d62e509256f1bd68d1ff22e81c2b64a9b5c..afb64f64bfc9523e000fa95fce492a546a029241 100644 (file)
@@ -6,14 +6,14 @@
 #include "mBarRange.h"
 #include <wx/grid.h>
 
-class interfConfigurationPanel 
+class interfConfigurationPanel
        : public wxPanel
 {
 public:
-       interfConfigurationPanel(wxWindow * parent);            
+       interfConfigurationPanel(wxWindow * parent);
        ~interfConfigurationPanel();
 
-    
+
 
 private:
 
@@ -23,42 +23,43 @@ private:
 
        void OnInterpolation(wxCommandEvent& event);
 
-       
+
        wxSlider* _withOfContourLine;
        wxSlider* _brithtnessWindowLevel;
        wxSlider* _brithtnessColorLevel;
-       wxCheckBox* _interpolationCheckBox;     
-       
+       wxCheckBox* _interpolationCheckBox;
+
 };
 
 class interfSpreadPanel
        : public wxPanel
 {
 public:
-       interfSpreadPanel(wxWindow * parent);           
+       interfSpreadPanel(wxWindow * parent);
        ~interfSpreadPanel();
 
     void appendStringSpread(std::string val);
        void setStringSpread(std::string stringtemp);
 private:
 
-       wxRadioBox_spreadMethodRadiobox;
-       wxStaticText_staticTextSpread;
-       wxTextCtrl_wxtextctrlSpread;
+       wxRadioBox      *_spreadMethodRadiobox;
+       wxStaticText    *_staticTextSpread;
+       wxTextCtrl      *_wxtextctrlSpread;
 
        void onSpreadReset(wxCommandEvent& event);
        void onSpreadAdd(wxCommandEvent& event);
+       void onSpreadAddAll(wxCommandEvent& event);
        void onSpreadGo(wxCommandEvent& event);
 
-       
-               
+
+
 };
 
 class interfInformationPanel
        : public wxPanel
 {
 public:
-       interfInformationPanel(wxWindow * parent);              
+       interfInformationPanel(wxWindow * parent);
        ~interfInformationPanel();
 
     void setStringInfoPanel(wxString tmpString);
@@ -76,9 +77,9 @@ private:
        wxRadioBox* _informationRadiobox;
        wxRadioBox* _radiolstboxContourGroup;
        wxStaticText* _staticTextInformation;
-       wxCheckBox* _XYZValues; 
-       wxCheckBox* _contourImage;      
-       wxCheckBox* _statistics;        
+       wxCheckBox* _XYZValues;
+       wxCheckBox* _contourImage;
+       wxCheckBox* _statistics;
 
        void onInformationContourLabels(wxCommandEvent& event);
        void onExtractInformation(wxCommandEvent& event);
@@ -89,8 +90,8 @@ private:
        void onRangeSliceInformation(wxCommandEvent& event);
 
 
-       
-               
+
+
 };
 //CMRU 29-08-09-----------------------------------------------------------------------------------------------
 /**
@@ -105,7 +106,7 @@ public:
        * Initialized the panel
        * @param parent Window who contains the panel
        */
-       interfCalibrationPanel(wxWindow * parent);      
+       interfCalibrationPanel(wxWindow * parent);
 
        ~interfCalibrationPanel();
 
@@ -128,5 +129,5 @@ private:
 };
 //------------------------------------------------------------------------------------------------------------
 #endif
+
+
index 7017b47744d204e1472a795fb877356bad65c384..0b9b0093ca848863a0138a948bc5c5e52e9132bc 100644 (file)
@@ -835,10 +835,10 @@ void wxContourMainFrame :: createMirrorContourOf ( std::string anExistingKName,
 
 //EED04
 void wxContourMainFrame ::loadState(std::string filename){
-       
+
        deleteAllContours();
        onLoadContours(filename,false);
-       
+
        /* EED Borrame
        char tmp[255];
        FILE *pFile=fopen(filename.c_str(),"r+");
@@ -997,7 +997,7 @@ void wxContourMainFrame::onLoadContours(std::string fileNameContourROI, bool int
                        openContours(pFile,pFileData,false);
                        openContours(pFile,pFileData,true);     //Load StaticContours
                }
-               
+
                if (version=="1.0.2")
                {
 //EED001
@@ -1224,7 +1224,7 @@ void wxContourMainFrame::readDimSpc(FILE *pFile, bool interactiveOption)
                        dial->ShowModal();
 
                        int _tmpReadFileTypeOfTransformation = -1;
-                       bool transform = false;
+//EED                  bool transform = false;
 
                        if (dial->GetReturnCode() == wxID_OK)
                        {
@@ -2300,32 +2300,83 @@ void wxContourMainFrame::onChangeInstant(std::string name,int actual){
        _instantPanel->setConceptValue( name, actual );
 }
 
+
 void wxContourMainFrame::resetAppend(){
        kernelManager->resetAppend();
 
 }
 
+
 void wxContourMainFrame::onSpreadAdd(){
        std::vector<double> vecX;
        std::vector<double> vecY;
        std::vector<double> vecZ;
        _theViewPanel->GetPointsOfActualContour(&vecX , &vecY , &vecZ );
+       std::vector<int> tempVector;
+       _instantPanel->getInstant( tempVector );
+       std::string val = kernelManager->onSpreadAdd(&vecX , &vecY , &vecZ, tempVector);
+       interfMainPanel::getInstance()->appendStringSpread(val);
+}
+
+
+void wxContourMainFrame::onSpreadAddAll(){
+    printf("EED wxContourMainFrame::onSpreadAddAll \n");
+//EED02
 
        std::vector<int> tempVector;
        _instantPanel->getInstant( tempVector );
 
-       std::string val = kernelManager->onSpreadAdd(&vecX , &vecY , &vecZ, tempVector);
+       int minZ,maxZ;
+    minZ       = 0;
+    maxZ       = interfMainPanel::getInstance()->GetImageDataSizeZ();
 
-       interfMainPanel::getInstance()->appendStringSpread(val);
+       int z;
+       int sizeLstContourThings;
+
+       for ( z=minZ ; z<=maxZ ; z++ )
+       {
+               tempVector[1]=z;
+               Instant instant(&tempVector);
+               std::vector<ContourThing**> lstContourThings = kernelManager->getOutlinesAtInstant( &instant );
+               sizeLstContourThings = lstContourThings.size();
+
+               printf("EED wxContourMainFrame::onSpreadAddAll z=%d size=%d\n",z,sizeLstContourThings);
+
+               if (sizeLstContourThings>=1)
+        {
+
+            std::vector<double> vecX;
+            std::vector<double> vecY;
+            std::vector<double> vecZ;
+
+            ContourThing **contourthing = lstContourThings[0];
+                       manualBaseModel *cModel                         =  (*contourthing)->getModel();
+                       int i,size = cModel->GetNumberOfPointsSpline();
+                       double x,y,z;
+                       for (i=0; i<size; i++)
+                       {
+                               cModel->GetSpline_i_Point(i, &x, &y, &z);
+                               vecX.push_back(x);
+                               vecY.push_back(y);
+                               vecZ.push_back(z);
+                       }
+
+            std::string val = kernelManager->onSpreadAdd(&vecX , &vecY , &vecZ, tempVector);
+            interfMainPanel::getInstance()->appendStringSpread(val);
+
+               printf("EED wxContourMainFrame::onSpreadAddAll       ->  val=%s\n",val.c_str() );
+
+        }
+
+    }
 
 }
 
-void wxContourMainFrame::onSpreadGo(int type){
 
+void wxContourMainFrame::onSpreadGo(int type){
        //JCP 20-10-08 Undo redo implementation
        saveState();
        //JCP 20-10-08 Undo redo implementation
-
        wxBusyCursor wait;
        std::vector<double> vecCtrlPointX;
        std::vector<double> vecCtrlPointY;
index 90361d379e70f17022f0f82cca6f918c118a69e3..c109ece302ccdc7dce31f191bb5eca6f0c5897b4 100644 (file)
@@ -246,6 +246,7 @@ class wxContourMainFrame : public wxPanel {
        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);
@@ -383,9 +384,9 @@ private:
 
        void saveState();
        void loadState(std::string filename);
-       
+
 //     void loadContours( FILE *pFile, bool staticContour );
-       
+
        void saveFileWithContours( std::string filename );
        void onLoadContours(std::string fileNameContourROI, bool interactiveInterface);
 
index 57f9228ee6499549b0e365b5c5903e11b158e520..d189cbd4ce9b691424878f295e7f71fa49714859 100644 (file)
@@ -12,7 +12,7 @@ KernelManagerContour::KernelManagerContour(){
 **
 **/
        inredo = 0;
-       inundo = 0;     
+       inundo = 0;
 
        time_t seconds;
        seconds = time (NULL);
@@ -42,7 +42,7 @@ KernelManagerContour::KernelManagerContour(std::vector<vtkImageData*> images,std
 **
 **/
        inredo = 0;
-       inundo = 0;     
+       inundo = 0;
 
        time_t seconds;
        seconds = time (NULL);
@@ -51,7 +51,7 @@ KernelManagerContour::KernelManagerContour(std::vector<vtkImageData*> images,std
 
        stundoredo = tmpdir+"/temp"+intToString(time);
        _currentIndex = 0;
-       
+
        _contourPropagation = NULL;
 #if(WIN32)
        mkdir(tmpdir.c_str());
@@ -69,7 +69,7 @@ KernelManagerContour::KernelManagerContour(std::vector<vtkImageData*> images,std
 
 }
 KernelManagerContour::~KernelManagerContour(){
-}      
+}
 
 std::vector<vtkImageData*> KernelManagerContour::getVectImages(){
        return vectimages;
@@ -83,7 +83,7 @@ void KernelManagerContour::setVectImages(std::vector<vtkImageData*> vectimg){
                change->SetInputConnection(img->GetProducerPort());
 
                change->SetOutputSpacing(1,1,1);
-               
+
                change->Update();
 
                vectimg[i] = change->GetOutput();
@@ -102,7 +102,7 @@ void KernelManagerContour::initializeEnvironment(std::string datadir){
        std::map<std::string, ImageSourceThing *> * sourcesMap          = new std::map<std::string, ImageSourceThing *>();
        std::map<std::string, ImageSectionThing *>* sectionsMap         = new std::map<std::string, ImageSectionThing *>();
        std::map<std::string, AxeThing *>* axesMap                                      = new std::map<std::string, AxeThing *>();
-       std::map<std::string, ContourThing *>* outlinesMap                      = new std::map<std::string, ContourThing *>();  
+       std::map<std::string, ContourThing *>* outlinesMap                      = new std::map<std::string, ContourThing *>();
 
        for(int i = 0; i < (int)(vectimages.size()); i++){
                vtkImageData* selectedimage = vectimages[i];
@@ -110,11 +110,11 @@ void KernelManagerContour::initializeEnvironment(std::string datadir){
                std::string imgstring = "Source Image "+intToString(i+1);
                sourcesMap->insert(std::pair<std::string, ImageSourceThing *>( imgstring, thing));
        }
-       
+
 
        OutlineModelBuilder * _builder                                                          = new OutlineModelBuilder( conceptsFN ,datadir);
        _builder->buildImageSource_Envornment( imageSourcesFN, sourcesMap );
-       _builder->buildImageSection_Envornment( imageSectionsFN, sectionsMap );         
+       _builder->buildImageSection_Envornment( imageSectionsFN, sectionsMap );
        _builder->buildAxe_Envornment(axeThingsFN, axesMap );
        _builder->buildCountour_Envornment( imageSectionsFN, outlinesMap );
 
@@ -144,7 +144,7 @@ std::string KernelManagerContour::intToString(int num){
                while (k > 0){
                        char temp = k % 10 + 48;
                        k = k / 10;
-                       result = temp + result; 
+                       result = temp + result;
                }
        }
        return result;
@@ -208,7 +208,9 @@ std::string KernelManagerContour::createCopyContourOf ( std::string anExistingKN
 {
        return modelManager->createCopyContourOf(anExistingKName, instantNoTouchData);
 }
-manualBaseModel* KernelManagerContour::getOutlineByKeyName(std::string cloneName){
+
+manualBaseModel* KernelManagerContour::getOutlineByKeyName(std::string cloneName)
+{
        return modelManager->getOutlineByKeyName (cloneName )->getModel();
 }
 
@@ -216,16 +218,16 @@ bool KernelManagerContour::onRedo(std::string& filename){
        if(inredo > 0){
                inredo--;
                inundo++;
-               std::string str = intToString(inundo);        
-               filename = stundoredo + str + ".roi";   
-               //loadState(temp);              
+               std::string str = intToString(inundo);
+               filename = stundoredo + str + ".roi";
+               //loadState(temp);
                return true;
        }
        return false;
 }
 
 bool KernelManagerContour::onUndo(std::string& filename){
-       if(inundo>0){           
+       if(inundo>0){
                inredo++;
                inundo--;
 
@@ -233,9 +235,9 @@ bool KernelManagerContour::onUndo(std::string& filename){
                //itoa(inundo, str, 10);
                std::string str = intToString(inundo);
 
-        
+
                filename = stundoredo + str + ".roi";
-       
+
                return true;//loadState(temp);
        }
        return false;
@@ -259,7 +261,7 @@ bool KernelManagerContour::onUndoSaveFile(std::string& filename){
 
                        filename = stundoredo + str + ".roi";
                        return true;
-                       //saveFileWithContours(temp);                           
+                       //saveFileWithContours(temp);
 
                }
        }
@@ -271,53 +273,55 @@ void KernelManagerContour :: changeContourOfManager(std::string keyName, Instant
        modelManager->ChangeContourOfList(keyName, instant);
 }
 
-void KernelManagerContour ::resetAppend(){
-       if(isInitContourPropagation()){
+void KernelManagerContour ::resetAppend()
+{
+    if (_contourPropagation!=NULL)
+       {
                _contourPropagation->resetAppend();
-       }       
-}
-
-bool KernelManagerContour::isInitContourPropagation(){
-       if(_contourPropagation == NULL){
-               _contourPropagation = new ContourPropagation();
-       }else{
-               return true;
        }
-       return false;
-
 }
 
-std::string KernelManagerContour::onSpreadAdd( std::vector<double> *vecX, std::vector<double> *vecY, std::vector<double> *vecZ, std::vector<int> instants){
-       if(isInitContourPropagation()){
-               if (vecX->size()!=0){
-                       
-                       int i,size=vecZ->size();
-                       int actualSlice = instants[1];
-                       for ( i=0 ; i<size ; i++ )
-                       {
-                               (*vecZ)[i] = actualSlice;
-                       } // for
 
-                       _contourPropagation->appendContour(vecX , vecY , vecZ);
-                       return intToString(actualSlice);                
-               }
-       }
+std::string KernelManagerContour::onSpreadAdd( std::vector<double> *vecX, std::vector<double> *vecY, std::vector<double> *vecZ, std::vector<int> instants)
+{
+    if (_contourPropagation==NULL)
+    {
+               _contourPropagation = new ContourPropagation();
+    }
+
+    if (vecX->size()!=0){
+
+        int i,size=vecZ->size();
+        int actualSlice = instants[1];
+        for ( i=0 ; i<size ; i++ )
+        {
+            (*vecZ)[i] = actualSlice;
+        } // for
+
+        _contourPropagation->appendContour(vecX , vecY , vecZ);
+        return intToString(actualSlice);
+    }
        return "";
 }
 
-void KernelManagerContour::getMaxMinZ(double *minZ,double *maxZ){
-       if(isInitContourPropagation()){
+
+void KernelManagerContour::getMaxMinZ(double *minZ,double *maxZ)
+{
+    if (_contourPropagation!=NULL)
+       {
                _contourPropagation->getMaxMinZ(minZ, maxZ);
        }
 }
-void KernelManagerContour::CalculeSplinePropagation(){
+
+
+void KernelManagerContour::CalculeSplinePropagation()
+{
        _contourPropagation->setInterpolationNumber(100);
        _contourPropagation->CalculeSplinePropagation();
 }
 
-manualBaseModel* KernelManagerContour::GetPoints(int z,int type, std::vector<double>* vecCtrlPointX,std::vector<double>* vecCtrlPointY,std::vector<double>* vecCtrlPointZ, std::string& theName,int typeofcontour, std::vector<int> tempVector){
-    
-       
+manualBaseModel* KernelManagerContour::GetPoints(int z,int type, std::vector<double>* vecCtrlPointX,std::vector<double>* vecCtrlPointY,std::vector<double>* vecCtrlPointZ, std::string& theName,int typeofcontour, std::vector<int> tempVector)
+{
        bool addedModel = false;
        manualBaseModel* manModelContour=NULL;
 
@@ -328,9 +332,9 @@ manualBaseModel* KernelManagerContour::GetPoints(int z,int type, std::vector<dou
                int idTmp = _contourPropagation->FindIdWithZ(z);
 
                if (type==0) // Initial Points
-               {   
+               {
                        _contourPropagation->GetInitialControlPoints( idTmp , vecCtrlPointX,vecCtrlPointY,vecCtrlPointZ);
-               } 
+               }
                if (type==1)  // Automatique Method
                {
                        _contourPropagation->GetControlPoints( idTmp  ,vecCtrlPointX,vecCtrlPointY,vecCtrlPointZ);
@@ -354,13 +358,13 @@ manualBaseModel* KernelManagerContour::GetPoints(int z,int type, std::vector<dou
                if(!addedModel){
                        manModelContour = NULL;
                }
-               
+
        }// ifSliceKeyContourExist
        return manModelContour;
 }
 
 manualBaseModel * KernelManagerContour::factoryManualContourModel(int typeContour)
-{      
+{
        manualBaseModel *manModelContour=NULL;
 
        // Creating the model
@@ -395,7 +399,7 @@ manualBaseModel * KernelManagerContour::factoryManualContourModel(int typeContou
        {
                manModelContour = new manualContourModelLine();
        }
-       
+
        // points
        if (typeContour==7)
        {
@@ -419,7 +423,7 @@ std::vector<std::string> KernelManagerContour::getOutlinesNameAtInstant(std::vec
                ContourThing **contourthing = vectcont[i];
                vectname.push_back((*contourthing)->getName());
        }
-    return vectname;   
+    return vectname;
 }
 
 std::vector<ContourThing**> KernelManagerContour::getOutlinesAtInstant(Instant* instant ){
@@ -467,7 +471,7 @@ void KernelManagerContour::setCurrentFileName(std::string filenam){
 }
 
 std::string KernelManagerContour::parseOsirixFile(std::string filename){
-       
+
 
 #ifdef ParserOsirix_BUILD
        vtkImageData* sourceimage;
@@ -487,7 +491,7 @@ std::string KernelManagerContour::parseOsirixFile(std::string filename){
        return p.getContoursFileName();
 #else
        return "";
-#endif 
+#endif
 
 
 }
index 4df96d10df98a00503d1933a129488dd74c063ca..6aa151f5db8b8e4e04f20d08296636870ab28c6b 100644 (file)
@@ -52,14 +52,14 @@ public:
        */
        vtkImageData* getSourceImage();
 
-       
+
 
        void initializeEnvironment(std::string datadir);
 
 
        /**
        **      This methods connect the event in the class interfNewContourMenu with the world of the appli
-       **/     
+       **/
 
        std::string createOutline(manualBaseModel * manModelContour,std::vector<int> instantVector);
        /////////////////////////////////
@@ -89,7 +89,7 @@ public:
        void setInstant(Instant* theInstant);
        void setInstant(std::vector<int> vectInstant);
        std::string createCopyContourOf ( std::string anExistingKName, std::vector<int> &instantNoTouchData);
-       
+
        Instant * getCurrentInstant();
 
        manualBaseModel* getOutlineByKeyName(std::string cloneName);
@@ -135,11 +135,11 @@ public:
 
        std::vector<manualBaseModel*> ExploseEachModel( std::vector<manualBaseModel*> lstManConMod );
 
-       
+
        void getConceptsInformation(std::vector<std::string>& conceptNameVect, std::vector<int>& conceptSizeVect);
 
        vtkImageData* getImageAtInstant(std::vector<int> inst);
-       
+
 //------------------------------------------------------------------------------------------------------------
 // Constants
 //------------------------------------------------------------------------------------------------------------
@@ -148,7 +148,7 @@ public:
        std::string getCurrentFileName();
 
        std::string parseOsirixFile(std::string filename);
-private:       
+private:
 //------------------------------------------------------------------------------------------------------------
 // Attributes
 //------------------------------------------------------------------------------------------------------------
@@ -170,8 +170,6 @@ private:
 
        ContourPropagation* _contourPropagation;
 
-       bool isInitContourPropagation();
-
        OutlineModelManager* getOutlineModelManager();
 };
 #endif
index 6b2e68b25495332d6d6e275389abe33c2432d2aa..9dbb1dbf9d80a13bd8f35373c1f829dbd666ff0b 100644 (file)
                outlinesEnvironment                     = contourEnv;
 
                workSpace                                       = new ContourWorkspace(this);//implies a shared workSpace
-               keyGenerator                            = * new PrefixMaxKeyGenerator();        
+               keyGenerator                            = * new PrefixMaxKeyGenerator();
                counterIdKey                            = 0;
 
                actualInstantWrapping           = new InstantMembersNameList();
-               changeSourceImage                       = true; 
+               changeSourceImage                       = true;
 
                bool allOK      = keyGenerator.addKeyThing("Axes", "Axe");
                allOK &= keyGenerator.addKeyThing("Image Sources", "Image source");
                clean();
                delete actualInstant;
                delete workSpace;
-               delete actualInstantWrapping;           
+               delete actualInstantWrapping;
        }
 
 //------------------------------------------------------------------------------------------------------------
-// Methods 
+// Methods
 //------------------------------------------------------------------------------------------------------------
 
 
@@ -65,7 +65,7 @@
 
        /*
        * Sets the workSpace object
-       * @param  aWorkSpace The workSpace to set 
+       * @param  aWorkSpace The workSpace to set
        */
        void OutlineModelManager :: setWorkSpace( ContourWorkspace * aWorkSpace )
        {
        {
                bool executedComs = executionQueue.size()>0 ? true : false;
                while( executionQueue.size()>0 )
-               {                       
+               {
                        CommandObject * aCmmand = executionQueue.front();
                        executedComs &= executeCommand(aCmmand, fromRegistration);
                        executionQueue.pop_front();
                return executedComs;
        }
 
-       
+
        /*
-       * Sets the concepts of the environments and includes the concepts managed by the program 
+       * Sets the concepts of the environments and includes the concepts managed by the program
        * @conceptsScript Is the script for with the concepts descrition
        * @return Returns true if successful insert of the given concepts, false otherwise
        */
                int endSub;
                std::string::size_type equalIndex = conceptsScript.find("=", 0);
                std::string::size_type nextIndex = 0;
-               while( equalIndex != std::string::npos && allOK) 
-               {       
+               while( equalIndex != std::string::npos && allOK)
+               {
             endSub = equalIndex;
-                       std::string concept = conceptsScript.substr( 0, endSub ); 
-                       conceptsScript.erase( 0, endSub+1 ); 
-                       std::cout << "C: " << concept <<std::endl;                      
+                       std::string concept = conceptsScript.substr( 0, endSub );
+                       conceptsScript.erase( 0, endSub+1 );
+                       std::cout << "C: " << concept <<std::endl;
                        nextIndex = conceptsScript.find(";", 0);
                        std::string cSize;
                        if(nextIndex != std::string::npos)
                        {
                                endSub = nextIndex;
-                               cSize = conceptsScript.substr( 0, endSub ); 
-                               conceptsScript.erase( 0, endSub+1 ); 
+                               cSize = conceptsScript.substr( 0, endSub );
+                               conceptsScript.erase( 0, endSub+1 );
                        }
                        else
                        {
-                               endSub = conceptsScript.size();         
-                               cSize = conceptsScript.substr( 0, endSub ); 
-                               conceptsScript.erase( 0, endSub ); 
-                       }                       
-                       int intReturn = atoi(cSize.c_str());                    
-                       std::cout << "SZ: "<<intReturn <<std::endl;     
-                       equalIndex = conceptsScript.find("=", 0);       
+                               endSub = conceptsScript.size();
+                               cSize = conceptsScript.substr( 0, endSub );
+                               conceptsScript.erase( 0, endSub );
+                       }
+                       int intReturn = atoi(cSize.c_str());
+                       std::cout << "SZ: "<<intReturn <<std::endl;
+                       equalIndex = conceptsScript.find("=", 0);
                        if( intReturn>0 )
                                allOK &= addUserConcept(concept, intReturn);
                        else
                                allOK = false;
-               }               
+               }
                return allOK;
        }
 
        /*
-       * Add a concept to all the environments 
+       * Add a concept to all the environments
        * @param theConceptName Is the name of the new concept
-       * @param conceptSize Is the size of the concept, that represent the ammount of concept posible instances 
+       * @param conceptSize Is the size of the concept, that represent the ammount of concept posible instances
        * @return Returns true if successful insert of concept, false otherwise
-       */              
+       */
        bool OutlineModelManager :: addUserConcept(std::string theConceptName, int conceptSize)
-       {       
+       {
                bool allOK = axesEnvironment->addConcept(theConceptName, conceptSize);
                allOK &= imagesSectionEnvironment->addConcept(theConceptName, conceptSize);
                allOK &= imageSourceEnvironment->addConcept(theConceptName, conceptSize);
                        this->outlinesEnvironment->removeThingFromInstant(keyName, instant);
                } else {
                        ContourThing **contourthing  = staticContourLst[ispartofstaticlist];
-                       this->outlinesEnvironment->addInstantToThing    ( keyName , instant );                  
+                       this->outlinesEnvironment->addInstantToThing    ( keyName , instant );
                        staticContourLst.erase( staticContourLst.begin()+ispartofstaticlist );
                }
        }
                std::vector<std::string> kNamesVector;
                std::vector<ContourThing **> outlinesVector; //= new std::vector<ContourThing **>();
                std::vector<Instant *> lstInstants = getOutlineInstants();
-               int i,sizeLstInstants = lstInstants.size(); 
+               int i,sizeLstInstants = lstInstants.size();
                Instant *instant;
                for ( i=0 ; i<sizeLstInstants ; i++ )
                {
        * Gets the outlines at a specific form the outline's environment
        * @param aGroupName The name of the group containing the outlines names to get
        * @return The vector to the outlines at the given group
-       */ 
+       */
        std::vector<ContourThing*> OutlineModelManager :: getOutlinesFromGroup(std::string aGroupName)
        {
                std::vector<ContourThing *> outlinesVector;
                std::map< std::string,OutlineGroup * >::iterator iterP = outlineGroups.find(aGroupName);
                if ( iterP != outlineGroups.end() )
-               {       
-                       std::vector<std::string> kNamesVector = iterP->second->getGroupOutlinesNames(); 
+               {
+                       std::vector<std::string> kNamesVector = iterP->second->getGroupOutlinesNames();
                        for(int i=0; i<kNamesVector.size();i++)
                        {
                                ContourThing * outlineI = getOutlineByKeyName(kNamesVector[i]);
                                outlinesVector.push_back(outlineI);
-                       }                       
+                       }
                }
                return outlinesVector;
        }
        * Gets the outlines at a specific form the outline's environment
        * @param aGroupName The name of the group containing the outlines names to get
        * @return The vector to the outlineGroups at the given group
-       */ 
+       */
        bool OutlineModelManager :: addOutlinesGroup( std::string theOutlineName, OutlineGroup * theGroup )
        {
-        outlineGroups.insert(std::pair <std::string, OutlineGroup *> ( theOutlineName, theGroup ));                            
+        outlineGroups.insert(std::pair <std::string, OutlineGroup *> ( theOutlineName, theGroup ));
 //             std::map<std::string, OutlineGroup *> :: iterator iter = NULL;
                std::map<std::string, OutlineGroup *> :: iterator iter;
                iter = outlineGroups.find( theOutlineName );
        std::string  OutlineModelManager :: createOutline(manualBaseModel * model, std::vector<int> theInstantData, std::string aName)
        {
                ContourThing * theOutline = new ContourThing ( model );
-               theOutline->setName(aName);             
-               return addOutline( theOutline, new Instant( &theInstantData ) );                                
+               theOutline->setName(aName);
+               return addOutline( theOutline, new Instant( &theInstantData ) );
        }
 
        /*
        bool  OutlineModelManager :: createAxe(std::string aDescription, Instant * theInstantData)
        {
                AxeThing * theAxe = new AxeThing ();
-               theAxe->setDescription(aDescription);                 
-               return addAxe(theAxe, theInstantData);          
+               theAxe->setDescription(aDescription);
+               return addAxe(theAxe, theInstantData);
        }
 
        /*
        //bool OutlineModelManager :: createImageSource(std::string aSource, ImageSourceThing * &imageSource)
        bool OutlineModelManager :: createImageSource(std::string aSource, Instant * theInstantData)
        {
-//             imageSource = new ImageSourceThing(aSource);                
-               //return addImageSource(new ImageSourceThing(aSource), theInstantData);         
+//             imageSource = new ImageSourceThing(aSource);
+               //return addImageSource(new ImageSourceThing(aSource), theInstantData);
                return NULL;//***********************************************************************************************
        }
 
        //bool OutlineModelManager :: createImageSection(std::string aSecImageData, ImageSectionThing * &imageSection)
        bool OutlineModelManager :: createImageSection(std::string aSecImageData, Instant * theInstantData)
        {
-               //imageSection = new ImageSectionThing(aSecImageData);               
-//             return addImageSection(new ImageSectionThing(aSecImageData), theInstantData);   
+               //imageSection = new ImageSectionThing(aSecImageData);
+//             return addImageSection(new ImageSectionThing(aSecImageData), theInstantData);
                return NULL;
        }
 
        /*
-       * Adds an outlineThing 
+       * Adds an outlineThing
        * @param theOutline The outline/contour (thing)
        * @param theInstantData Is the instant for the outline to add
        * @return Returns true if the addition of the outline was successful
        */
        std::string OutlineModelManager :: addOutline( ContourThing * theOutline, Instant * theInstantData)
-       {               
+       {
                std::string kName;
 
-// EED 
+// EED
 //             bool added  = keyGenerator.generateKeyOf("Outlines", outlinesEnvironment->getNumberOfThings(),kName);
 
                counterIdKey++;
                if( added )
                        return kName;
                else
-                       return "";              
+                       return "";
        }
 
 
 
 
        /*
-       * Remove an outlineThing 
+       * Remove an outlineThing
        * @param theOutline The outline/contour (thing)
        */
        void OutlineModelManager :: removeOutline( std::string ss )
-       {               
+       {
                        outlinesEnvironment->removeThing( ss );
        }
 
                std::vector< ContourThing **>  thingsVector;
                outlinesEnvironment->getThingsOfEnvironment( &thingsVector );
                int i,sizeThingVector = thingsVector.size();
-               for(i=0;i<sizeThingVector;i++) 
+               for(i=0;i<sizeThingVector;i++)
                {
                        ContourThing ** contourthing =  thingsVector[i];
                    removeOutline(  (*contourthing)->getName()   );
 
 
        /*
-       * Adds an axeThing 
+       * Adds an axeThing
        * @param thaAxe The axe (thing)
        * @param theInstantData Is the instant for the axe to add
        * @return Returns true if the addition of the axe was successful
        bool OutlineModelManager :: addAxe( AxeThing * theAxe , Instant * theInstantData)
        {
                std::string kName;
-               bool added  = keyGenerator.generateKeyOf("Axes", axesEnvironment->getNumberOfThings(),kName);           
+               bool added  = keyGenerator.generateKeyOf("Axes", axesEnvironment->getNumberOfThings(),kName);
                added &= axesEnvironment->addThingWithInstant(kName,theAxe, theInstantData);
                return added;
        }
 
        /*
-       * Adds an imageSourceThing 
+       * Adds an imageSourceThing
        * @param imgageSource The image source (thing)
        * @param theInstantData Is the instant for the source to add
        * @return Returns true if the addition of the imageSource was successful
        * @return Returns true if the addition of the imageSection was successful
        */
        bool OutlineModelManager :: addImageSection(ImageSectionThing * imageSection, Instant * theInstantData)
-       {               
+       {
                std::string kName;
                bool added  = keyGenerator.generateKeyOf("Image Sections", imagesSectionEnvironment->getNumberOfThings(),kName);
                added &= imagesSectionEnvironment->addThingWithInstant(kName, imageSection, theInstantData);
                        actualInstantWrapping -> addOutlineName( kNamesVector[i], anOutline->getName() );
                }
        }
-       
+
        /*
        * Annotates the actual outline keyName-real name wrapping at the actual instant
        * @param actualKeyOutline The key name to annotate
        void OutlineModelManager :: annotateActualSectionImageWrap(std::string actualKeyImage, std::string theRealName)//---BORRAR...
        {
                actualInstantWrapping -> setActualSectionImageNamesWrapp(actualKeyImage, theRealName);
-       } 
+       }
 
        /*
        * Annotate the annotateActualSource image keyName-real name wrapping at the actual instant
        * @param actualKeyImage The key name to annotate
-       * @param theRealName The real name asigned to the annotateActualSource 
+       * @param theRealName The real name asigned to the annotateActualSource
        */
        void OutlineModelManager :: annotateActualSourceImageWrap(std::string actualKeyImage, std::string theRealName)//---BORRAR...
        {
                actualInstantWrapping -> setActualSourceImageNamesWrapp(actualKeyImage, theRealName);
-       } 
+       }
 
 
        /*
        /*
        * Gets the instants of a specific outline
        * @param thekName Is the name of the outline
-       * @return The instants set 
+       * @return The instants set
        */
        std::vector<Instant *> OutlineModelManager :: getOutlineInstantsByName(std::string thekName)
-       {               
-               return *outlinesEnvironment->getInstantsOfThing(thekName);              
+       {
+               return *outlinesEnvironment->getInstantsOfThing(thekName);
        }
 
        /*
        * Gets all instants outlines
-       * @return The instants set 
+       * @return The instants set
        */
        std::vector<Instant *> OutlineModelManager :: getOutlineInstants()
-       {               
-               return *outlinesEnvironment->getExistingInstants();             
+       {
+               return *outlinesEnvironment->getExistingInstants();
        }
 
 
        {
                return imageSourceEnvironment->addInstantToThing( imaKName,anInstantData );
        }
-       
+
        /*
        *       Method that retorns the name of each concept and the size of it.
        *       @param conceptNameVect, Vector in which is disposed to be setted the name for each of the included concepts
                {
                        //if (outlinesEnvironment->getNumberOfThings()>0)
                                outlinesEnvironment->getConceptsInformation(conceptNameVect, conceptSizeVect);
-               }       
+               }
        }
 
 
        /*
-       * Gets the contourWorspace 
+       * Gets the contourWorspace
        * @return Returns the workspace
        */
        ContourWorkspace * OutlineModelManager :: getContourWorkspace()
        * Update the registered objects in the InstantMemebersNameList, is the one that really changes the instant in the model
        */
        void OutlineModelManager :: updateToActualInstant()
-       {               
+       {
                Instant * longInstant = actualInstant;
                /*Instant * mediumInstant = new Instant();
-               Instant * shortInstant = new Instant();         
+               Instant * shortInstant = new Instant();
                std::vector<int>* theInstant = longInstant->getInstant();
                for(int i=1; i<theInstant->size(); i++)
                {
                                shortInstant->addConcept( (*theInstant)[i] );
                        mediumInstant->addConcept( (*theInstant)[i] );
                }
-               
+
                //getting the sourceAtInstant
                std::vector<std::string> kSourceVector;
                std::vector<ImageSourceThing **> imSourceVector;
                imageSourceEnvironment->getThings(kSourceVector, imSourceVector, shortInstant);
                annotateActualSourceImageWrap(kSourceVector[0], (**imSourceVector[0]).getSourceImage());
 
-        //getting the aAxeAtInstant 
+        //getting the aAxeAtInstant
                std::vector<std::string> kAxeVector;
                std::vector<AxeThing **> axesVector;
                axesEnvironment->getThings(kAxeVector, axesVector, mediumInstant);
                imagesSectionEnvironment->getThings(kSectionVector, imSectionVector, longInstant); if ( !kSectionVector.empty() )
            //annotateActualSectionImageWrap(kSectionVector[0], (**imSectionVector[0]).getImageData());
                */
-               
-               //getting the outlines          
+
+               //getting the outlines
 
                std::vector<ContourThing ** > vect = getOutlinesAtInstant( longInstant );
 
        }
-       
+
        /*
-       * Sets the automatic managed concepts including them in the environments. That are at the beginning of the instant vector for the corresponding environments.   
+       * Sets the automatic managed concepts including them in the environments. That are at the beginning of the instant vector for the corresponding environments.
        * @return Returns true if successful insert of the automatic concepts, false otherwise
        */
        bool OutlineModelManager :: setAutomaticConcepts()
                bool allOK = axesEnvironment->addConcept(axeConcept, axeC_size);
                allOK &= imagesSectionEnvironment->addConcept(axeConcept, axeC_size);
                allOK &= outlinesEnvironment->addConcept(axeConcept, axeC_size);
-               
+
                allOK &= imagesSectionEnvironment->addConcept(axeDepthConcept, axeDepthC_size);
                allOK &= outlinesEnvironment->addConcept(axeDepthConcept, axeDepthC_size);
 /*
        void OutlineModelManager::SaveThingName( FILE *pFile, FILE *pFileData, std::string nameThing )
        {
                std::vector< Instant * > *lstInstants;
-printf("EED OutlineModelManager::SaveThingName %s\n",nameThing.c_str() );
                lstInstants = outlinesEnvironment->getInstantsOfThing( nameThing );
-printf("EED OutlineModelManager::SaveThingName %d\n", (*lstInstants).size() );
                Instant *instant = (*lstInstants)[0];
                std::vector<int> *vecInst =instant->getInstant();
                int i,sizeVecInst = vecInst->size();