SET(USE_BOOST ON)
 SET(USE_XERCES ON)
 
+OPTION (${PROJECT_NAME}_DOC "${PROJECT_NAME}_DOC" OFF)
+
 CREA_FIND_AND_USE_LIBRARIES()
 
 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
 
        nom.push_back("Import an OSIRIX XML file with contours");
        funct.push_back((wxObjectEventFunction) &interfIOMenu:: onImport);
 
+       //First step, include the image and the alternate text of the button.
+       //Obviously, a callback function must also be specified.
+       path.push_back(datadir + "/test.png");
+       nom.push_back("Performing a test on how to add a new button");
+       funct.push_back((wxObjectEventFunction) &interfIOMenu:: onTest);
+
        this->addButtons(path, nom);
        this->setVectorFunction(funct);
 
        interfMainPanel::getInstance()->onImport();
 }
 
+void interfIOMenu::onTest(wxCommandEvent& event){
+       interfMainPanel::getInstance()->onTest();
+}
+
 interfIOMenu::~interfIOMenu()
 {
 }
 
        void onSave(wxCommandEvent& event);
 
        void onImport(wxCommandEvent& event);
+       void onTest(wxCommandEvent& event);
 
 private:
        //wxEvtHandler* eventHandler;
 
        wxContourMainFrame::getInstance()->onImport();
 }
 
+void interfMainPanel::onTest(){
+       wxContourMainFrame::getInstance()->onTest();
+}
+
 void interfMainPanel::RefreshInterface()
 {
        wxContourMainFrame::getInstance()->RefreshInterface();
 
        void onLoad();
        void onSave();
        void onImport();
+       void onTest();
 /////////////////////////////7
        void RefreshInterface();
        vtkImageData* getImageData();
 
        }
 }
 
+void wxContourMainFrame::onTest(){
+       std::string filename, filenamecontours;
+       wxFileDialog dialog(NULL, _T("Choose a XML Osirix File"), _T(""), _T(""), _T("*.xml"), wxOPEN );
+
+       if (dialog.ShowModal() == wxID_OK)
+       {
+               filename = dialog.GetPath().mb_str();           
+               filenamecontours = kernelManager->parseOsirixFile(filename);
+
+               if(filenamecontours.compare("") != 0){
+                       onLoadContours(filenamecontours);
+               }
+
+       }
+}
+
+
 //AD: 29-05-09
 void wxContourMainFrame::onSave(){
 //CMRU 03-09-09-----------------------------------------------------------------------------------------------
 
        void onLoad();
        void onSave();
        void onImport();
+       void onTest();
        void openContours( FILE *pFile, FILE *pFileData, int version, bool staticContour );
 
        void RefreshInterface();
 
-format 66
+format 67
 "GeneralArchitecture" // GeneralArchitecture
-  revision 8
-  modified_by 2 "davila"
+  revision 9
+  modified_by 89 "vargas"
   // class settings
   //class diagram settings
   draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default
 
-format 66
+format 67
 "GeneralArchitecture"
-  revision 1
-  modified_by 2 "davila"
+  revision 2
+  modified_by 89 "vargas"
 
 
   
 
   mark_for_import
   
+  ncouples 1
+  key "html dir" value "C:/Users/vargas/Documents/moi/Fichiers Importants/point-html/"
   package_ref 128002 // GeneralArchitecture
 end
 
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head>
+<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Adding a new Button</title>
+
+<style type="text/css">
+.titles {
+font-family: Geneva, Arial, Helvetica, sans-serif;
+color: #000000;
+font-size: large;
+font-weight: bold;
+}
+.text {
+font-family: Geneva, Arial, Helvetica, sans-serif;
+font-size: small;
+font-weight: normal;
+}
+a.el {
+font-weight:bold;
+text-decoration:none;
+}
+a {
+color:#1A41A8;
+}
+.subtitles {
+font-family: Geneva, Arial, Helvetica, sans-serif;
+font-size: 90%;
+font-weight: bold;
+text-decoration: underline;
+}
+.listDiagrams {
+font-family: Geneva, Arial, Helvetica, sans-serif;
+margin-left: 25px;
+font-size: small;
+font-weight: bold;
+}
+.paragraph {
+margin-left: 40px;
+font-family: Geneva, Arial, Helvetica, sans-serif;
+font-size: small;
+}
+.style1 {
+text-decoration: underline;
+font-weight: bold;
+}
+.style3 {
+font-family: Geneva, Arial, Helvetica, sans-serif;
+font-size: 21px;
+text-decoration: underline;
+text-align: justify;
+}
+.style4 {
+font-family: Geneva, Arial, Helvetica, sans-serif;
+color: #000000;
+font-size: x-large;
+font-weight: bold;
+text-align: center;
+}
+</style>
+</head><body>
+<h2 style="text-align: left;" class="style4">Adding
+a new button to creaContours</h2>
+<span class="text">After taking a quick look at <a class="el" href="http://www.creatis.insa-lyon.fr/site/fr/CreatoolsCreaContours">creaContours'</a>
+interface,
+it's easy to agree that buttons are a very important part of it!
+Adding, editing and deleting contours; extracting statistical data;
+performing basic and complex
+segmentation. All this is accomplished by pressing on the right button.
+<br><br>This guide is concerned with the process of adding a new button to <a class="el" href="http://www.creatis.insa-lyon.fr/site/fr/CreatoolsCreaContours">creaContours</a>.
+For that purpose, a detailed how-to guide is included in this
+documentation alongside a sequence diagram that serves as an example of
+the process that takes place
+once a button is pressed.<br></span><hr style="width: 100%; height: 2px;"><br><span class="text">
+</span>
+</body></html>
\ No newline at end of file