Skip to content

Commit

Permalink
Merge pull request #69 from sameeul/v206
Browse files Browse the repository at this point in the history
update version string
  • Loading branch information
sameeul authored May 23, 2024
2 parents ccbb583 + 4ad8bd1 commit b08b589
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/filepattern/cpp/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
#define VERSIONH_INCLUDED

#define PROJECT_NAME "filepattern"
#define PROJECT_VER "2.0.5"
#define PROJECT_VER "2.0.6"

#endif // VERSIONH_INCLUDED
55 changes: 55 additions & 0 deletions tests/cpp/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#include <iostream>
#include "../../src/filepattern/cpp/interface/filepattern.h"
#include "test_truth_data.h"
#include <unordered_map>
#include <variant>



void test01()
{
std::string path = "/mnt/hdd8/axle/data/intensity1";
std::string pattern = "p03_x{x:dd}_y{y:dd}_wx0_wy0_c{c:d}.ome.tif";

auto* files = new FilePattern(path, pattern);
std::cout<<"pattern is " <<files->getPattern()<<std::endl;;

auto vars = files->getUniqueValues(files->getVariables());

for(auto& v:vars){

std::cout << v.first <<std::endl;
auto set_of_vals = v.second;
for(auto& val: set_of_vals){
std::cout<<std::get<int>(val)<<" ";
}
}
auto var_list = files->getVariables();
auto fv = files->getFiles();
for(const auto& [mp, vl]: fv){
for (const auto& [key, value] : mp){
std::cout << key<< " "<< std::get<int>(value) <<std::endl;
}

for(auto var: var_list){

std::cout << var << ": ";
auto it = mp.find(var);
if(it != mp.end()){
auto& val = std::get<int>(it->second);
}

}
std::cout << std::endl;
for(auto& f: vl){
std::cout << f << " \n";
}

}
delete files;
}

int main(){
std::cout <<"hola " << std::endl;
test01();
}

0 comments on commit b08b589

Please sign in to comment.