Skip to content
Snippets Groups Projects
Commit 664e1ed4 authored by Matthew Webster's avatar Matthew Webster
Browse files

fixed 3D mask bug

parent 085f8f85
No related branches found
No related tags found
No related merge requests found
......@@ -131,14 +131,15 @@ int generate_masks(volume4D<float> &mask, volume4D<float> &masknz, const volume4
if (!uthr_used) { uthr=vin.max()+1; }
mask = binarise(vin,lthr,uthr,exclusive);
if (mask.tsize()!=1) masknz = (binarise(vin,0.0f, 0.0f)-1.0f)*-1.0f*mask;
else masknz = (binarise(vin,0.0f, 0.0f)-1.0f)*mask[0];
else masknz = (binarise(vin,0.0f, 0.0f)-1.0f)*-1.0f*mask[0];
save_volume4D(masknz,"masknz");
return 0;
}
int generate_masks(const volume4D<float> &mask, volume4D<float> &masknz, const volume4D<float> &vin)
{
if (mask.tsize()!=1) masknz = (binarise(vin,0.0f, 0.0f)-1.0f)*-1.0f*mask;
else masknz = (binarise(vin,0.0f, 0.0f)-1.0f)*mask[0];
else masknz = (binarise(vin,0.0f, 0.0f)-1.0f)*-1.0f*mask[0];
return 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