]> Creatis software - creaContours.git/blobdiff - lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.cxx
Loading osirix files, problem when installed version
[creaContours.git] / lib / kernel_ManagerContour_NDimensions / ParserOsirix / OsirixParser.cxx
index b913b5b3900985c6a0133fbdaf3d60462beaef22..030590434a895fa0a970f9d6df2c041731881bb5 100644 (file)
@@ -65,6 +65,7 @@ OsirixParser::OsirixParser(std::string xsdfile, double* spacing, int* extent)
        /*STATICCONTOURS*/
        CREACONTOUR_NUMBEROFCONTOURSSTATIC = "NumberOfContoursStatic";
 
+        TEMPIMPORTOSIRIXFILE = "";
 
 #ifdef WIN32
 
@@ -77,7 +78,15 @@ OsirixParser::OsirixParser(std::string xsdfile, double* spacing, int* extent)
        TEMPIMPORTOSIRIXFILE.append("\\data\\TEMPIMPORTOSIRIXFILE.roi");
        
 #else
-       TEMPIMPORTOSIRIXFILE = "./data/TEMPIMPORTOSIRIXFILE";
+        char * pPath;
+        pPath = getenv ("HOME");
+
+        if(pPath){
+            TEMPIMPORTOSIRIXFILE.append(pPath);
+        }else{
+            TEMPIMPORTOSIRIXFILE.append(".");
+        }
+        TEMPIMPORTOSIRIXFILE.append("/.creaContourDataTemp/TEMPIMPORTOSIRIXFILE.roi");
 #endif
        
 }