BIC-MNI / minc-tools

Basic minc-tools from former minc repository
Other
30 stars 25 forks source link

minccmp range values #29

Open andrewjanke opened 8 years ago

andrewjanke commented 8 years ago

Allow users to input a list of range/floor/ceil values.

Currently the range only applies to the first input volume.

https://github.com/BIC-MNI/minc/blob/master/progs/minccmp/minccmp.c#L333

Code for doing this is already in mincstats so copying that over should be straight forward.

rdvincent commented 8 years ago

So minccmp would completely ignore voxels outside the range, for every file? This seems to imply a sort of "and" operation, where the logic would be that we ignore any voxel that falls outside the prescribed range for any of the input volumes?

andrewjanke commented 8 years ago

This feature request was prompted by Paul's request on minc-users for a different range/float/ceil for two input volumes. If we take the more general approach as per in mincstats then yes what you are suggesting makes sense:

if (a list of range/ceil/floor values is given){
   if (list size doesn't match the input files){
      bomb;
      }

   use them;
   }

else{  # only one value given
   set all values in the list to the input value;  # achieves logical 'and'
   }