Commit 0322ab29b5926fd13dd452f401aa59efb5eddf9f
1 parent
d9084b86
saving and loading of image stacks
Showing
2 changed files
with
5 additions
and
17 deletions
Show diff stats
main.cu
... | ... | @@ -3,28 +3,16 @@ |
3 | 3 | #include <vector> |
4 | 4 | #include <algorithm> |
5 | 5 | #include "stim/parser/filename.h" |
6 | +#include "stim/grids/image_stack.h" | |
6 | 7 | |
7 | 8 | #include <unistd.h> |
8 | 9 | |
9 | 10 | int main(){ |
10 | 11 | |
11 | - stim::filename test = stim::filename::cwd(); | |
12 | - std::cout<<test.str()<<std::endl; | |
12 | + stim::image_stack<unsigned char> stack; | |
13 | + stack.load_images("ob/*.jpg"); | |
13 | 14 | |
14 | - stim::filename test_rel = test.get_relative("../../oogabooga/dooba/test.bat"); | |
15 | - std::cout<<test_rel.str()<<std::endl; | |
16 | - | |
17 | - | |
18 | - | |
19 | - | |
20 | - stim::filename f("/home/david/working/software/volume-spider/*.cu"); | |
21 | - | |
22 | - std::vector<stim::filename> lst = f.get_list(); | |
23 | - | |
24 | - std::cout<<"Files contained in "<<f.dir()<<":"<<std::endl; | |
25 | - | |
26 | - for(unsigned int f = 0; f<lst.size(); f++) | |
27 | - std::cout<<lst[f].str()<<std::endl; | |
15 | + stack.save_images("test/????.jpg"); | |
28 | 16 | |
29 | 17 | return 0; |
30 | 18 | } | ... | ... |