Commit abb832b815327d981f6f5fe9172717987ffccabe
1 parent
f097c379
fixed drive letter problems in stim::filename
Showing
3 changed files
with
6 additions
and
5 deletions
Show diff stats
stim/grids/image_stack.h
@@ -155,12 +155,13 @@ public: | @@ -155,12 +155,13 @@ public: | ||
155 | void save_images(std::string file_mask){ | 155 | void save_images(std::string file_mask){ |
156 | 156 | ||
157 | stim::filename file_path(file_mask); | 157 | stim::filename file_path(file_mask); |
158 | + //stim::filename abs_file_path = file_pat | ||
158 | 159 | ||
159 | //create a list of file names | 160 | //create a list of file names |
160 | std::vector<std::string> file_list = stim::wildcards::increment(file_path.str(), 0, R[3]-1, 1); | 161 | std::vector<std::string> file_list = stim::wildcards::increment(file_path.str(), 0, R[3]-1, 1); |
161 | - | ||
162 | - for(int i=0; i<R[3]; i++) | 162 | + for (int i = 0; i < R[3]; i++) { |
163 | save_image(file_list[i], i); | 163 | save_image(file_list[i], i); |
164 | + } | ||
164 | } | 165 | } |
165 | 166 | ||
166 | /// Returns the pixel at the specified point | 167 | /// Returns the pixel at the specified point |
stim/math/spharmonics.h
@@ -181,7 +181,7 @@ namespace stim { | @@ -181,7 +181,7 @@ namespace stim { | ||
181 | /// @param n is the number of points of the surface of the sphere used to create the PDF. DEFAULT 1000 | 181 | /// @param n is the number of points of the surface of the sphere used to create the PDF. DEFAULT 1000 |
182 | /// @param norm, a boolean that sets where the output vectors will be normalized between 0 and 1. | 182 | /// @param norm, a boolean that sets where the output vectors will be normalized between 0 and 1. |
183 | /// @param | 183 | /// @param |
184 | - void pdf(std::vector<stim::vec3<T> > sph_pts, unsigned int l, int m, stim::vec3<T> c = stim::vec3<T>(0, 0, 0), unsigned int n = 1000, bool norm = true, std::vector<T> w = std::vector<T>()) | 184 | + /*void pdf(std::vector<stim::vec3<T> > sph_pts, unsigned int l, int m, stim::vec3<T> c = stim::vec3<T>(0, 0, 0), unsigned int n = 1000, bool norm = true, std::vector<T> w = std::vector<T>()) |
185 | { | 185 | { |
186 | std::vector<double> weights; ///the weight at each point on the surface of the sphere. | 186 | std::vector<double> weights; ///the weight at each point on the surface of the sphere. |
187 | // weights.resize(n); | 187 | // weights.resize(n); |
@@ -223,7 +223,7 @@ namespace stim { | @@ -223,7 +223,7 @@ namespace stim { | ||
223 | } | 223 | } |
224 | } | 224 | } |
225 | mcEnd(); | 225 | mcEnd(); |
226 | - } | 226 | + }*/ |
227 | 227 | ||
228 | std::string str() { | 228 | std::string str() { |
229 | 229 |
stim/parser/filename.h
@@ -65,6 +65,7 @@ protected: | @@ -65,6 +65,7 @@ protected: | ||
65 | std::string current_drive; | 65 | std::string current_drive; |
66 | std::vector<std::string> current_dir; | 66 | std::vector<std::string> current_dir; |
67 | parse_path(current_drive, current_dir, current); //get the current drive and directories | 67 | parse_path(current_drive, current_dir, current); //get the current drive and directories |
68 | + drive = current_drive; //all relative paths have to be relative to the current drive | ||
68 | if (current_dir.size() > 0) { | 69 | if (current_dir.size() > 0) { |
69 | 70 | ||
70 | // step through each directory in the relative path, adjusting the current directory | 71 | // step through each directory in the relative path, adjusting the current directory |
@@ -91,7 +92,6 @@ protected: | @@ -91,7 +92,6 @@ protected: | ||
91 | } | 92 | } |
92 | 93 | ||
93 | /// Parses a directory string into a drive (NULL if not Windows) and list of hierarchical directories | 94 | /// Parses a directory string into a drive (NULL if not Windows) and list of hierarchical directories |
94 | - /// Returns true if the path is relative, false if it is absolute | ||
95 | void parse_path(std::string &drive, std::vector<std::string> &absolute, std::string dir){ | 95 | void parse_path(std::string &drive, std::vector<std::string> &absolute, std::string dir){ |
96 | drive = ""; //initialize the drive to NULL (it will stay that way for Windows) | 96 | drive = ""; //initialize the drive to NULL (it will stay that way for Windows) |
97 | std::vector<std::string> path; | 97 | std::vector<std::string> path; |