]> Creatis software - creaContours.git/blobdiff - lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
BUG MACOS
[creaContours.git] / lib / Interface_ManagerContour_NDimensions / wxContourMainFrame.cxx
index e81e73084b2cd0225ef3ecb515e20eb8240cd06d..e202f987e1758ae98719cbe999e9e45da2f43199 100644 (file)
@@ -102,7 +102,16 @@ char wxContourMainFrame::COPY = 'C';
        inredo = 0;
        inundo = 0;
 
-       kernelManager = new KernelManagerContour(images,datadir+"/data/");
+#if defined(__GNUC__)
+               std::string str_home(getenv("HOME"));
+#elif defined(_WIN32)
+               std::string str_home(getenv("USERPROFILE"));
+#endif
+               std::string strCreaContourDataTmp = str_home + "/.creaContourDataTemp/";
+//             std::string command("mkdir "+strCreaContourDataTmp);
+//        system( command.c_str() );
+               
+               kernelManager = new KernelManagerContour( images , datadir+"/data/" , strCreaContourDataTmp );
        //kernelManager->setVectImages(images);
        //kernelManager->initializeEnvironment();
                        
@@ -709,10 +718,10 @@ void wxContourMainFrame :: createMirrorContourOf ( std::string anExistingKName,
 
        double pnt1X = refPoint1->GetX();
        double pnt1Y = refPoint1->GetY();
-       double pnt1Z = refPoint1->GetZ();
+//     double pnt1Z = refPoint1->GetZ();
        double pnt2X = refPoint2->GetX();
        double pnt2Y = refPoint2->GetY();
-       double pnt2Z = refPoint2->GetZ();
+//     double pnt2Z = refPoint2->GetZ();
 
        double angle = (atan2(pnt2Y - pnt1Y, pnt2X - pnt1X) * 180 / 3.1415926535897932384626433832795)+90;
        vtkTransform *t = vtkTransform::New();
@@ -1483,8 +1492,8 @@ myfile.close();
        {
                id      = polyDataResult->GetLines()->GetData()->GetValue(ii);
                p       = polyDataResult->GetPoint(id);
-               double x=p[0];
-               double y=p[1];
+//             double x=p[0];
+//             double y=p[1];
                vecX.push_back( p[0] );
                vecY.push_back( p[1] );
                vecZ.push_back( -900 );
@@ -2049,7 +2058,8 @@ void wxContourMainFrame::onSaveResults(std::string directory,std::string namefil
        int iTitle,sizeTitle = (maxX / _numberOfVariablesStatistics);
        for ( iTitle=0; iTitle<sizeTitle ; iTitle++)
        {
-               fprintf(pFile,"-- \t %d-Size \t SizeRange \t Min \t Max \t Ave \t StDv \t" , iTitle,tmpString.c_str() );
+               //              fprintf(pFile,"-- \t %d-Size \t SizeRange \t Min \t Max \t Ave \t StDv \t" , iTitle,tmpString.c_str() );
+               fprintf(pFile,"-- \t %d-Size \t SizeRange \t Min \t Max \t Ave \t StDv \t" , iTitle );
        }
        fprintf(pFile,"\n" );
 
@@ -2358,7 +2368,8 @@ void wxContourMainFrame::onSnakePressed(){
 
                wxDialog* dialog = new wxDialog(this, -1, wxString(_T("Snake")));
                wxPanel* panel = new wxPanel(dialog,-1); 
-               wxStaticText* sttext = new wxStaticText(panel, -1, wxString(_T("Panel para snake")));
+               //              wxStaticText* sttext = new wxStaticText(panel, -1, wxString(_T("Panel para snake")));
+         new wxStaticText(panel, -1, wxString(_T("Panel para snake")));
                dialog->ShowModal();
        } // if