]> Creatis software - creaContours.git/commitdiff
Loading osirix files, problem when installed version
authorJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Thu, 14 Apr 2011 15:37:26 +0000 (15:37 +0000)
committerJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Thu, 14 Apr 2011 15:37:26 +0000 (15:37 +0000)
appli/wxContourGUIExample/wxContourGUIExample.cxx
lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx
lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.cxx

index 4c26c642884fd832f49c57bef62093f14bb5be4e..19bccf399d1128f7a4dcf34680d7310738d1d775 100644 (file)
@@ -124,7 +124,7 @@ bool wxTheApplication :: OnInit()
 //JCP
 
            #ifdef LINUX /* assume this is OSX */
-                  datadir=datadir+"/../share/creaContours";
+                   datadir=datadir+"/../share/creaContours";
            #endif // MACOSX
 
                #ifdef MACOSX /* assume this is OSX */
index d189cbd4ce9b691424878f295e7f71fa49714859..8efa5a9eef6582f686059ca8d872b1b45a6d9e64 100644 (file)
@@ -64,7 +64,7 @@ KernelManagerContour::KernelManagerContour(std::vector<vtkImageData*> images,std
 /**
 **  FINISH PERSISTANCE
 **/
-       setVectImages(images);
+       setVectImages(images);        
        initializeEnvironment(datadir);
 
 }
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
        
 }