Skip to content
Snippets Groups Projects

MNT: Clarify *thrP usage

Merged Matthew Webster requested to merge mnt/thrP into master
1 file
+ 8
8
Compare changes
  • Side-by-side
  • Inline
+ 8
8
@@ -46,12 +46,12 @@ int printUsage(const string& programName)
cout << " -div : divide current image by following input" << endl;
cout << " -rem : modulus remainder - divide current image by following input and take remainder" << endl;
cout << " -mas : use (following image>0) to mask current image" << endl;
cout << " -thr : use following number to threshold current image (zero anything below the number)" << endl;
cout << " -thrp : use following percentage (0-100) of ROBUST RANGE to threshold current image (zero anything below the number)" << endl;
cout << " -thrP : use following percentage (0-100) of ROBUST RANGE of non-zero voxels and threshold below" << endl;
cout << " -uthr : use following number to upper-threshold current image (zero anything above the number)" << endl;
cout << " -uthrp : use following percentage (0-100) of ROBUST RANGE to upper-threshold current image (zero anything above the number)" << endl;
cout << " -uthrP : use following percentage (0-100) of ROBUST RANGE of non-zero voxels and threshold above" << endl;
cout << " -thr : threshold below the following number (zero anything below the number)" << endl;
cout << " -thrp : threshold below the following percentage (0-100) of ROBUST RANGE" << endl;
cout << " -thrP : threshold below the following percentage (0-100) of the positive voxels' ROBUST RANGE" << endl;
cout << " -uthr : upper-threshold above the following number (zero anything above the number)" << endl;
cout << " -uthrp : upper-threshold above the following percentage (0-100) of the ROBUST RANGE" << endl;
cout << " -uthrP : upper-threshold above the following percentage (0-100) of the positive voxels' ROBUST RANGE" << endl;
cout << " -max : take maximum of following input and current image" << endl;
cout << " -min : take minimum of following input and current image" << endl;
cout << " -seed : seed random number generator with following number" << endl;
@@ -548,7 +548,7 @@ if (!separatenoise)
else if (string(argv[i])=="-thrP")
{
volume4D<T> mask(inputVolume);
mask.binarise(0,inputVolume.max()+1,exclusive);
mask.binarise();
T lowerlimit =(T)(inputVolume.robustmin(mask)+(atof(argv[++i])/100.0)*(inputVolume.robustmax(mask)-inputVolume.robustmin(mask)));
inputVolume.threshold(lowerlimit,inputVolume.max()+1,inclusive);
}
@@ -564,7 +564,7 @@ if (!separatenoise)
else if (string(argv[i])=="-uthrP")
{
volume4D<T> mask(inputVolume);
mask.binarise(0,inputVolume.max()+1,exclusive);
mask.binarise();
T upperlimit = (T)(inputVolume.robustmin(mask)+(atof(argv[++i])/100.0)*(inputVolume.robustmax(mask)-inputVolume.robustmin(mask)));
inputVolume.threshold(inputVolume.min()-1,upperlimit,inclusive);
}
Loading