User Tools

Site Tools


jvs:fscan:manual:chapter3:imagekeys:threshold

fScan Reference Manual, Chapter 3 (KeyCmds:ImageKeys): thresholds

Thresholds -- Control display thresholding features

usage: mode,options K

The interactive 'K' command is used to control all thresholding parameters. The THRESH Taskbar icons provide a graphical user interface (GUI) for the 'K' command. For a general introduction to intensity thresholding in fScan, see Thresholding Overview.

The following summarizes how the K command is used:

MODE: 0 K            - turn off thresholds
      1 K            - turn on thresholds
      2,flag,flag2 K - set threshold flag
            FLAG: 1 - must be >= low thresh
                  2 - must be <= high thresh
                  4 - either >= low thresh OR <= high thresh (low>high)
                  8 - only show boundaries of threshold region
                 16 - high thresh is band-width
                      must be >= low AND <= (low+high)
                 32 - threshold is flagged by low data bit or bits (see Mode=8 below)
                 64 - fill flag (?)
                256 - adjust thresholds by tenths (default is whole units)
                512 - adjust thresholds by hundredths
                768 - adjust thresholds by thousandths
               1024 - only activate thresholds within active ROI
           Note, FLAG2 lets you change only selected bits:
            FLAG2= -1 - set bits to FLAG (default)
                    0 - turn off bits in FLAG
                    1 - turn on bits in FLAG
                    2 - toggle bits in FLAG

      3,val,min,max K - set lower threshold values
                        Lower threshold is set to VAL
                        Allowable range for lower threshold can be
                         clamped to MIN - MAX
      4,val,min,max K - set upper threshold values
                        Upper threshold is set to VAL
                        Allowable range for upper threshold can be
                         clamped to MIN - MAX
      5,flag K         - set threshold(s) to value at cursor
          FLAG  0 - set lower threshold
                1 - set upper threshold
               >1 - set both thresholds:
                     Lower = intens - flag/2
                     Upper = intens + flag/2
      6,Nbits,mask,flg K
          NBITS: Number of low bits to use for mask bits (default 1)
          MASK:  Bit mask for sampling high data bits (default is -NBITS-1 )
          FLG: 1 - adjust brightness scale and threshold values
               2 - shift if necessary, but otherwise don't clear low bits
             010 - set 1 bit for all voxels where MASK value is non-zero
             020 - set 2 bit for all voxels where MASK value is non-zero
             030 - set 3 bit for all voxels where MASK value is non-zero
      7,flg,fillval,datamask,low,high K       convert threshold to bit mask
          FLG: 1-6 - same as 2K values
               010 - clear low bits before setting mask
               020 - use 2 bits for mask
      8,nbits,flg K    - set bit mask to NBITS
               FLG  0 - simply set io->maskbits to nbits (default)
                    1 - create mask of NBITS (shift data values if nec.)
                    2 - clear maskbits (before setting ON if FLG&1)
                    4 - set mask bit ON for all thresholded voxels
      9 K              - show threshold values
      K                - toggle threshold on/off

See Also:
fScan Home, fScan Manual, KeyCmds, ImageKeys, Manual Help

jvs/fscan/manual/chapter3/imagekeys/threshold.txt · Last modified: 2023/02/23 18:43 (external edit)