Hi Elijah,
> On Jul 5, 2016, at 18:01 , Rockers, Elijah D. <[log in to unmask]> wrote:
>
> Hello,
>
> Does anyone know of a command-line tool for thresholding toward a
> specific value (besides zero..) `fslmaths` can threshold to 0, but I
> would like to be able to do the following, as examples:
>
> - Threshold any voxel that is over 10, to be equal to 10.
> - Threshold any voxel that is over 10, to be equal to NaN.
I would be cautious about doing that, at least in Matlab handling NaNs used to be quite costly in computation times (see http://www.agner.org/optimize/instruction_tables.pdf for examples). Depending on your data type (presumably floating point ;) ) and data you might be able to find another normal value that is clearly out of range for your real data (say the largest losslessly representable integer values 16,777,216 for singles or 9,007,199,254,740,992 for doubles, or if your real data is always positive maybe a negative number like -1 would do). Or you could use an additional mask volume that contains 0 for all values > 10 and 1 for all others (or vice versa).
Best Regards
Sebastian
>
> So far, MATLAB seems to be the only option for doing this.
>
> Thanks,
>
> - Eli
>
> Houston Methodist. Leading Medicine.
>
> Ranked by U.S.News & World Report as one of America's "Best Hospitals" in 11 specialties. Named to FORTUNEĀ® Magazine's "100 Best Companies to Work ForĀ®" list 10 years in a row. Designated as a Magnet hospital for excellence in nursing. Visit us at houstonmethodist.org. Follow us at twitter.com/MethodistHosp and www.facebook.com/HoustonMethodist.
>
> ***CONFIDENTIALITY NOTICE*** This e-mail is the property of Houston Methodist Hospital and/or its relevant affiliates and may contain restricted and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender and delete all copies of the message. Thank you.
|