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

no mask needed by default

parent 69979552
No related branches found
No related tags found
No related merge requests found
...@@ -244,8 +244,18 @@ int do_vecreg(){ ...@@ -244,8 +244,18 @@ int do_vecreg(){
if(maskfile.value()!="") if(maskfile.value()!="")
read_volume(mask,maskfile.value()); read_volume(mask,maskfile.value());
else{ else{
mask.reinitialize(ivol[0].xsize(),ivol[0].ysize(),ivol[0].zsize());
copybasicproperties(ivol,mask); copybasicproperties(ivol,mask);
mask=1; for(int z=0;z<mask.zsize();z++)
for(int y=0;y<mask.ysize();y++)
for(int x=0;x<mask.xsize();x++){
if(ivol(x,y,z,0)*ivol(x,y,z,0)
+ivol(x,y,z,1)*ivol(x,y,z,1)
+ivol(x,y,z,2)*ivol(x,y,z,2) != 0)
mask(x,y,z) = 1;
else
mask(x,y,z) = 0;
}
} }
/////////////////////// ///////////////////////
......
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