Skip to content
Snippets Groups Projects
Commit f0b01b9d authored by Saad Jbabdi's avatar Saad Jbabdi
Browse files

deals with mask containing non _1_ values

parent 34361b54
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,8 @@ void seedmask()
Counter counter(seeds,stline);
counter.initialise();
Seedmanager seedmanager(counter);
for(int z=0;z<seeds.zsize();z++){
cout <<"sl "<<z<<endl;
for(int y=0;y<seeds.ysize();y++){
......
......@@ -23,6 +23,25 @@ void twomasks()
volume<int> seeds,seeds2;
read_volume(seeds,opts.seedfile.value());
read_volume(seeds2,opts.mask2.value());
// correct for non-1 values
// should be seeds.binarise();
for(int z=seeds.minz();z<=seeds.maxz();z++)
for(int y=seeds.miny();y<=seeds.maxy();y++)
for(int x=seeds.minx();x<=seeds.maxx();x++)
if(seeds(x,y,z)!=0)
seeds(x,y,z)=1;
for(int z=seeds2.minz();z<=seeds2.maxz();z++)
for(int y=seeds2.miny();y<=seeds2.maxy();y++)
for(int x=seeds2.minx();x<=seeds2.maxx();x++)
if(seeds2(x,y,z)!=0)
seeds2(x,y,z)=1;
Streamliner stline;
Counter counter(seeds,stline);
counter.initialise();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment