wiki:pixelflip

Version 2 (modified by pborissow, 14 years ago) ( diff )

--

pixelflip

converts pixel values

Usage

pixelflip [options] <output_type> <input_file> <output_file> <target_value> <replacement_value>

Options

  --disable-elev           Will disable the elevation
  --disable-notify         Takes an argument. Arguments are ALL, WARN, 
			NOTICE, INFO, FATAL, DEBUG.  If you want multiple 
			disables then just do multiple --disable-notify on the 
			command line.  All argument are case insensitive.  Default 				is all are enabled.
  --ossim-logfile          takes a logfile as an argument.  All output messages
                          are redirected to the specified log file.  By default
                          there is no log file and all messages are enabled.
  -K                     specify individual keywords to add to the preferences
                          keyword list: name=value
  -P                     specify a preference file to load
  -T                     specify the classes to trace, ex:
                          ossimInit|ossimImage.* 
                          will trace ossimInit and all ossimImage classes
  -c or --clamp-value      clamp values (any pixel with value larger than input
                           will be clamped to input)
  -h or --help             Display this information
  -m                       Replacement mode (see notes below)
  -o or --create-overview  Creates and overview for the output image
  -w                       output tile width(only valid with tiled output
                           types).  Must be a multiply of 16

Replacement Mode

-m Replacement mode option explanation. Valid modes = "all", "partial", and "full" (default=all)

  • all Any pixel with dn of target will be replaced.
  • partial Target will be replaced only at least one subpixel(band) does not have the target.
  • full Target will be repaced only if all subpixels(bands) have the target.

Example:

 target      = 0
 replacement = 1
 Pixel at (0, 0) r=0, g=0,  b=0
 Pixel at (0, 1) r=0, g=30, b=21

 Mode is "all":
 Pixel at (0, 0) becomes  r=1, g=1,  b=1
 Pixel at (0, 1) becomes  r=1, g=30, b=21

 Mode is "partial":
 Pixel at (0, 0) remains  r=0, g=0,  b=0
 Pixel at (0, 1) becomes  r=1, g=30, b=21

 Mode is "full":
 Pixel at (0, 0) becomes  r=1, g=1,  b=1
 Pixel at (0, 1) remains  r=0, g=30, b=21
Note: See TracWiki for help on using the wiki.