]> Creatis software - creaContours.git/blobdiff - lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
*** empty log message ***
[creaContours.git] / lib / Interface_ManagerContour_NDimensions / wxContourMainFrame.cxx
index 8941bde86d9e44287e06a66071e3e4e6164291c1..1e6ff4c9337394ae6d46937c305884932a33ccf8 100644 (file)
@@ -153,7 +153,8 @@ void wxContourMainFrame::setVectImages(std::vector<vtkImageData*> imgs)
 }
 
 
-       wxContourMainFrame* wxContourMainFrame :: getInstance(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector<vtkImageData*> images, long style,std::string datadir ){
+       wxContourMainFrame* wxContourMainFrame :: getInstance(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector<vtkImageData*> images, long style,std::string datadir )
+       {
                if(instance == NULL){
                        instance = new wxContourMainFrame(parent, id, title, pos, size, images, style,datadir);
                }
@@ -1008,6 +1009,23 @@ void wxContourMainFrame::onImport(){
        }
 }
 
+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-----------------------------------------------------------------------------------------------
@@ -3106,4 +3124,4 @@ void wxContourMainFrame::SetFileLocation(std::string newFileLocation)
        _fileLocation = newFileLocation;
        std::cout<<"GETFILELOCATION:"<<_fileLocation<<std::endl;
 }
-//------------------------------------------------------------------------------------------------------------
\ No newline at end of file
+//------------------------------------------------------------------------------------------------------------