diff --git a/stim/cuda/branch_detection.cuh b/stim/cuda/branch_detection.cuh index 61105e0..9adf987 100644 --- a/stim/cuda/branch_detection.cuh +++ b/stim/cuda/branch_detection.cuh @@ -7,7 +7,7 @@ #include #include typedef unsigned int uint; -typedef unsigned int uchar; +//typedef unsigned int uchar; std::vector< stim::vec > diff --git a/stim/cuda/spider_cost.cuh b/stim/cuda/spider_cost.cuh index d35ef75..10d7f5f 100644 --- a/stim/cuda/spider_cost.cuh +++ b/stim/cuda/spider_cost.cuh @@ -3,7 +3,7 @@ #include #include -#include +//#include #include #include #include diff --git a/stim/grids/image_stack.h b/stim/grids/image_stack.h index 0f99409..afb9a12 100644 --- a/stim/grids/image_stack.h +++ b/stim/grids/image_stack.h @@ -68,7 +68,7 @@ public: stim::image I(file_list[i].str()); //retrieve the interlaced data from the image - store it in the grid - I.data_interleaved(&ptr[ i * R[0] * R[1] * R[2] ]); + I.get_interleaved_rgb(&ptr[ i * R[0] * R[1] * R[2] ]); } } diff --git a/stim/image/image.h b/stim/image/image.h index 9cb985d..d101ec4 100644 --- a/stim/image/image.h +++ b/stim/image/image.h @@ -148,7 +148,7 @@ public: if(C() == 1) memcpy(buffer, img, bytes()); else if(C() == 3) - data_interleaved_bgr(buffer); + get_interleaved_bgr(buffer); cv::Mat cvImage((int)Y(), (int)X(), cv_type(), buffer); cv::imwrite(filename, cvImage); } @@ -170,7 +170,7 @@ public: } } - void data_interleaved_bgr(T* data){ + void get_interleaved_bgr(T* data){ //for each channel for(size_t y = 0; y < Y(); y++){ @@ -182,6 +182,11 @@ public: } } + void get_interleaved_rgb(T* data){ + memcpy(data, img, bytes()); + } + + image channel(size_t c){ //create a new image diff --git a/stim/math/circle.h b/stim/math/circle.h index 852ff9d..874b292 100644 --- a/stim/math/circle.h +++ b/stim/math/circle.h @@ -175,5 +175,4 @@ public: }; } ->>>>>>> origin/Master_Clone_W_Branch #endif diff --git a/stim/parser/filename.h b/stim/parser/filename.h index 613bdb8..f33a492 100644 --- a/stim/parser/filename.h +++ b/stim/parser/filename.h @@ -22,6 +22,9 @@ #include #include "../parser/parser.h" +#ifdef BOOST_PRECOMPILED +#include +#endif namespace stim{ //filename class designed to work with both Windows and Unix @@ -234,8 +237,40 @@ public: } return file_list; #else - std::cout<<"File lists aren't currently supported on Unix/Linux systems."< file_list; + if(boost::filesystem::exists(p)){ + if(boost::filesystem::is_directory(p)){ + typedef std::vector vec; // store paths, + vec v; // so we can sort them later + std::copy(boost::filesystem::directory_iterator(p), boost::filesystem::directory_iterator(), back_inserter(v)); + std::sort(v.begin(), v.end()); // sort, since directory iteration + // is not ordered on some file systems + //compare file names to the current template (look for wild cards) + for (vec::const_iterator it(v.begin()), it_end(v.end()); it != it_end; ++it) + { + //if the filename is a wild card *or* it matches the read file name + if( prefix == "*" || prefix == (*it).filename().stem().string()){ + //if the extension is a wild card *or* it matches the read file extension + if( ext == "*" || "." + ext == (*it).filename().extension().string()){ + file_list.push_back((*it).string()); //include it in the final list + } + + } + + + + } + + } + + } + return file_list; + + +// std::cout<<"File lists aren't currently supported on Unix/Linux systems."< > result; - vec p0 = e[i].P; //initialize p0 to the first point on the centerline + vec p0 = e[0].P; //initialize p0 to the first point on the centerline vec p1; unsigned N = size(); //number of points in the current centerline diff --git a/stim/visualization/obj.h b/stim/visualization/obj.h index e625f55..09e8a68 100644 --- a/stim/visualization/obj.h +++ b/stim/visualization/obj.h @@ -158,6 +158,7 @@ protected: using std::vector::size; using std::vector::at; using std::vector::push_back; + using std::vector::resize; geometry(){} -- libgit2 0.21.4