Changeset 133 for trunk/SRC/Picture
- Timestamp:
- 07/07/06 11:57:27 (18 years ago)
- Location:
- trunk/SRC/Picture
- Files:
-
- 1 added
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Picture/image_viewer.pro
r132 r133 1 1 ;+ 2 ; NAME: 3 ; IMAGE_VIEWER 4 ; 5 ; PURPOSE: 6 ; The purpose of this program is to provide an interactive tool that can be used 7 ; to view JPEG, BMP, GIF, PNG, and TIFF picture files. Images are loaded into 8 ; memory, so the initial file access may take a while, but once each picture has 9 ; been opened they can all be viewed in a very rapid fashion. 10 ; 11 ; CATEGORY: 12 ; Visualization, Widgets 13 ; 14 ; CALLING SEQUENCE: 15 ; image_viewer 16 ; 17 ; INPUT PARAMETERS: 18 ; None. 19 ; 20 ; KEYWORD PARAMETERS: 21 ; None. 22 ; 23 ; OUTPUTS: 24 ; None. 25 ; 26 ; COMMON BLOCKS: 27 ; None. 28 ; 29 ; SIDE EFFECTS: 30 ; While this program is running in an IDL session it will change the current 2 ; 3 ; @file_comments 4 ; The purpose of this program is to provide an interactive tool that can be used 5 ; to view JPEG, BMP, GIF, PNG, and TIFF picture files. Images are loaded into 6 ; memory, so the initial file access may take a while, but once each picture has 7 ; been opened they can all be viewed in a very rapid fashion. 8 ; 9 ; @categories Visualization, Widgets 10 ; 11 ; @param event {in}{required} 12 ; 13 ; @restrictions While this program is running in an IDL session it will change the current 31 14 ; working directory, enables/disables color decomposition, and sets !QUIET=1, 32 15 ; !ORDER=0, & !P.BACKGROUND=0. These settings are returned to their initial 33 16 ; settings before the program was initiated once it is terminated. 34 17 ; 35 ; RESTRICTIONS: 36 ; This program is supported in IDL version 5.5 and newer. In order to open 18 ; @restrictions This program is supported in IDL version 5.5 and newer. In order to open 37 19 ; GIF files or TIFF files with LZW compression the copy of IDL being used must 38 20 ; be licensed with these features. IDL only supports BMP files in the standard 39 21 ; Windows format and does not support OS2 bitmaps. 40 22 ; 41 ; MODIFICATION HISTORY:42 ; Written by: AEB, 1/02.43 ; -44 45 46 ;********************************************************************************************* 23 ; @history Written by: AEB, 1/02. 24 ; 25 ; @version $Id$ 26 ;********************************************************************************************* 27 ;_ 28 47 29 PRO IMAGE_VIEWER_OPEN_FILES,event 48 30 ;THIS PROCEDURE IS CALLED WHEN A USER SELECTS "File > Open Picture Files" FROM THE MAIN MENU … … 126 108 127 109 ;********************************************************************************************* 110 ;+ 111 ; @param event {in}{required} 112 ;- 128 113 PRO IMAGE_VIEWER_OPEN_FOLDER,event 129 114 ;THIS PROCEDURE IS CALLED WHEN A USER SELECTS "File > Open All In Folder" FROM THE MAIN MENU … … 208 193 209 194 ;********************************************************************************************* 195 ;+ 196 ; @param event {in}{required} 197 ;- 210 198 PRO IMAGE_VIEWER_CANCEL,event 211 199 ;obtain state structure for top-level-base from its UVALUE: … … 221 209 222 210 ;********************************************************************************************* 211 ;+ 212 ; @param event {in}{required} 213 ;- 223 214 PRO IMAGE_VIEWER_TIMER,event 224 215 ;obtain state structure for top-level-base from its UVALUE: … … 893 884 894 885 ;********************************************************************************************* 886 ;+ 887 ; @param event {in}{required} 888 ;- 895 889 PRO IMAGE_VIEWER_EXIT,event 896 890 ;THIS PROCEDURE IS CALLED WHEN A USER SELECTS "File > Exit" FROM THE MAIN MENU … … 905 899 906 900 ;********************************************************************************************* 901 ;+ 902 ; @param event {in}{required} 903 ;- 907 904 PRO IMAGE_VIEWER_HELP,event 908 905 ;THIS PROCEDURE IS CALLED WHEN A USER SELECTS "Help > Help on IMAGE_VIEWER" … … 924 921 925 922 ;********************************************************************************************* 923 ;+ 924 ; @param event {in}{required} 925 ;- 926 926 PRO IMAGE_VIEWER_THUMBS,event 927 927 ;THIS PROCEDURE IS CALLED WHEN A USER CLICKS ON ONE OF THE THUMBNAIL PICTURES … … 971 971 972 972 ;********************************************************************************************* 973 ;+ 974 ; @param widjetID {in}{required} 975 ;- 973 976 PRO IMAGE_VIEWER_CLEANUP,widgetID 974 977 ;THIS PROCEDURE IS CALLED WHEN THE PROGRAM IS TERMINATED AND XMANAGER REGISTERS A CLEANUP: … … 999 1002 1000 1003 ;********************************************************************************************* 1004 ;+ 1005 ; @param event {in}{required} 1006 ;- 1001 1007 PRO IMAGE_VIEWER_EVENT,event 1002 1008 ;THIS PROCEDURE IS CALLED WHEN A USER RESIZES THE TOP-LEVEL BASE -
trunk/SRC/Picture/imdisp.pro
r132 r133 1 1 ;------------------------------------------------------------------------------- 2 ;+ 3 ; @hidden 4 ;- 2 5 FUNCTION IMDISP_GETPOS, ASPECT, POSITION=POSITION, MARGIN=MARGIN 3 6 ; … … 47 50 END 48 51 ;------------------------------------------------------------------------------- 52 ;+ 53 ; @hidden 54 ;- 49 55 FUNCTION IMDISP_IMSCALE, IMAGE, RANGE=RANGE, BOTTOM=BOTTOM, NCOLORS=NCOLORS, $ 50 56 NEGATIVE=NEGATIVE … … 78 84 END 79 85 ;------------------------------------------------------------------------------- 86 ;+ 87 ; @hidden 88 ;- 80 89 FUNCTION IMDISP_IMREGRID, DATA, NX, NY, INTERP=INTERP 81 90 ; … … 119 128 END 120 129 ;------------------------------------------------------------------------------- 130 ;+ 131 ; @hidden 132 ;- 121 133 PRO IMDISP_IMSIZE, IMAGE, X0, Y0, XSIZE, YSIZE, ASPECT=ASPECT, $ 122 134 POSITION=POSITION, MARGIN=MARGIN … … 176 188 177 189 END 178 ;------------------------------------------------------------------------------- 179 PRO IMDISP, IMAGE, RANGE=RANGE, BOTTOM=BOTTOM, NCOLORS=NCOLORS, $ 180 MARGIN=MARGIN, INTERP=INTERP, DITHER=DITHER, ASPECT=ASPECT, $ 181 POSITION=POSITION, OUT_POS=OUT_POS, NOSCALE=NOSCALE, NORESIZE=NORESIZE, $ 182 ORDER=ORDER, USEPOS=USEPOS, CHANNEL=CHANNEL, $ 183 BACKGROUND=BACKGROUND, ERASE=ERASE, $ 184 AXIS=AXIS, NEGATIVE=NEGATIVE, _EXTRA=EXTRA_KEYWORDS 185 ; 186 compile_opt idl2, strictarrsubs 187 ; 188 190 ;******************************************************************************* 189 191 ;+ 190 ; NAME: 191 ; IMDISP 192 ; 193 ; PURPOSE: 192 ; 193 ; @file_comments 194 194 ; Display an image on the current graphics device. 195 195 ; IMDISP is an advanced replacement for TV and TVSCL. … … 214 214 ; - Photographic negative images can be displayed via the NEGATIVE keyword. 215 215 ; 216 ; CATEGORY: 217 ; Image display 218 ; 219 ; CALLING SEQUENCE: 220 ; IMDISP, IMAGE 221 ; 222 ; INPUTS: 223 ; IMAGE Array containing image data. 216 ; @categories Image display 217 ; 218 ; @param IMAGE {in}{required} Array containing image data. 224 219 ; Pseudo (indexed) color images must have 2 dimensions. 225 220 ; True color images must have 3 dimensions, in either 226 221 ; [3, NX, NY], [NX, 3, NY], or [NX, NY, 3] form. 227 222 ; 228 ; OPTIONAL INPUTS: 229 ; None. 230 ; 231 ; KEYWORD PARAMETERS: 232 ; RANGE For Pseudo Color images only, a vector with two elements 223 ; @keyword RANGE For Pseudo Color images only, a vector with two elements 233 224 ; specifying the minimum and maximum values of the image 234 225 ; array to be considered when the image is byte-scaled … … 237 228 ; or if the NOSCALE keyword is set. 238 229 ; 239 ; BOTTOMBottom value in the color table to be used230 ; @keyword BOTTOM Bottom value in the color table to be used 240 231 ; for the byte-scaled image 241 232 ; (default is 0). 242 233 ; This keyword is ignored if the NOSCALE keyword is set. 243 234 ; 244 ; NCOLORSNumber of colors in the color table to be used235 ; @keyword NCOLORS Number of colors in the color table to be used 245 236 ; for the byte-scaled image 246 237 ; (default is !D.TABLE_SIZE - BOTTOM). 247 238 ; This keyword is ignored if the NOSCALE keyword is set. 248 239 ; 249 ; MARGINA scalar value specifying the margin to be maintained240 ; @keyword MARGIN A scalar value specifying the margin to be maintained 250 241 ; around the image in normal coordinates 251 242 ; (default is 0.1, or 0.025 if !P.MULTI is set to display 252 243 ; multiple images). 253 244 ; 254 ; INTERPIf set, the resized image will be interpolated using245 ; @keyword INTERP If set, the resized image will be interpolated using 255 246 ; bilinear interpolation 256 247 ; (default is nearest neighbor sampling). 257 248 ; 258 ; DITHERIf set, true color images will be dithered when displayed249 ; @keyword DITHER If set, true color images will be dithered when displayed 259 250 ; on an 8-bit graphics device 260 251 ; (default is no dithering). 261 252 ; 262 ; ASPECTA scalar value specifying the aspect ratio (height/width)253 ; @keyword ASPECT A scalar value specifying the aspect ratio (height/width) 263 254 ; for the displayed image 264 255 ; (default is to maintain native aspect ratio). 265 256 ; 266 ; POSITIONOn input, a 4-element vector specifying the position257 ; @keyword POSITION On input, a 4-element vector specifying the position 267 258 ; of the displayed image in the form [X0,Y0,X1,Y1] in 268 259 ; in normal coordinates … … 271 262 ; offset and size are known (e.g. MAP_IMAGE output). 272 263 ; 273 ; OUT_POSOn output, a 4-element vector specifying the position264 ; @keyword OUT_POS On output, a 4-element vector specifying the position 274 265 ; actually used to display the image. 275 266 ; 276 ; NOSCALEIf set, the image will not be byte-scaled267 ; @keyword NOSCALE If set, the image will not be byte-scaled 277 268 ; (default is to byte-scale the image). 278 269 ; 279 ; NORESIZEIf set, the image will not be resized.270 ; @keyword NORESIZE If set, the image will not be resized. 280 271 ; (default is to resize the image to fit the display). 281 272 ; 282 ; ORDERIf set, the image is displayed from the top down273 ; @keyword ORDER If set, the image is displayed from the top down 283 274 ; (default is to display the image from the bottom up). 284 275 ; Note that the system variable !ORDER is always ignored. 285 276 ; 286 ; USEPOSIf set, the image will be sized to exactly fit a supplied277 ; @keyword USEPOS If set, the image will be sized to exactly fit a supplied 287 278 ; POSITION vector, over-riding ASPECT and MARGIN 288 279 ; (default is to honor ASPECT and MARGIN when a POSITION 289 280 ; vector is supplied). 290 281 ; 291 ; CHANNELDisplay channel (Red, Green, or Blue) to be written.282 ; @keyword CHANNEL Display channel (Red, Green, or Blue) to be written. 292 283 ; 0 => All channels (the default) 293 284 ; 1 => Red channel … … 299 290 ; images can be displayed on any device supported by IMDISP. 300 291 ; 301 ; BACKGROUNDIf set to a positive integer, the background will be filled292 ; @keyword BACKGROUND If set to a positive integer, the background will be filled 302 293 ; with the color defined by BACKGROUND. 303 294 ; 304 ; ERASEIf set, the screen contents will be erased. Note that if295 ; @keyword ERASE If set, the screen contents will be erased. Note that if 305 296 ; !P.MULTI is set to display multiple images, the screen is 306 297 ; always erased when the first image is displayed. 307 298 ; 308 ; AXISIf set, plot axes will be drawn on the image. The default299 ; @keyword AXIS If set, plot axes will be drawn on the image. The default 309 300 ; x and y axis ranges are determined by the size of the image. 310 301 ; When the AXIS keyword is set, IMDISP accepts any keywords 311 302 ; supported by PLOT (e.g. TITLE, COLOR, CHARSIZE etc.). 312 303 ; 313 ; NEGATIVEIf set, a photographic negative of the image is displayed.304 ; @keyword NEGATIVE If set, a photographic negative of the image is displayed. 314 305 ; The values of BOTTOM and NCOLORS are honored. This keyword 315 306 ; allows True color images scanned from color negatives to be … … 318 309 ; is ignored if the NOSCALE keyword is set. 319 310 ; 320 ; OUTPUTS: 321 ; None. 322 ; 323 ; OPTIONAL OUTPUTS: 324 ; None 325 ; 326 ; COMMON BLOCKS: 327 ; None 328 ; 329 ; SIDE EFFECTS: 330 ; The image is displayed on the current graphics device. 331 ; 332 ; RESTRICTIONS: 333 ; Requires IDL 5.0 or higher (square bracket array syntax). 334 ; 335 ; EXAMPLE: 311 ; @restrictions The image is displayed on the current graphics device. 312 ; 313 ; @restrictions Requires IDL 5.0 or higher (square bracket array syntax). 314 ; 315 ; @examples 336 316 ; 337 317 ;;- Load test data … … 472 452 ;map_grid 473 453 ; 474 ; MODIFICATION HISTORY: 475 ; Liam.Gumley@ssec.wisc.edu 454 ; @history Liam.Gumley@ssec.wisc.edu 476 455 ; http://cimss.ssec.wisc.edu/~gumley 477 ; $Id: imdisp.pro,v 1.47 2002/06/05 16:31:07 gumley Exp $478 456 ; 479 457 ; Copyright (C) 1999, 2000 Liam E. Gumley … … 492 470 ; along with this program; if not, write to the Free Software 493 471 ; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 472 ; 473 ; @version $Id: imdisp.pro,v 1.47 2002/06/05 16:31:07 gumley Exp $ 474 ; 494 475 ;- 476 ;------------------------------------------------------------------------------- 477 PRO IMDISP, IMAGE, RANGE=RANGE, BOTTOM=BOTTOM, NCOLORS=NCOLORS, $ 478 MARGIN=MARGIN, INTERP=INTERP, DITHER=DITHER, ASPECT=ASPECT, $ 479 POSITION=POSITION, OUT_POS=OUT_POS, NOSCALE=NOSCALE, NORESIZE=NORESIZE, $ 480 ORDER=ORDER, USEPOS=USEPOS, CHANNEL=CHANNEL, $ 481 BACKGROUND=BACKGROUND, ERASE=ERASE, $ 482 AXIS=AXIS, NEGATIVE=NEGATIVE, _EXTRA=EXTRA_KEYWORDS 483 ; 484 compile_opt idl2, strictarrsubs 485 ; 495 486 496 487 rcs_id = '$Id: imdisp.pro,v 1.47 2002/06/05 16:31:07 gumley Exp $' -
trunk/SRC/Picture/saveimage.pro
r132 r133 1 PRO SAVEIMAGE, FILE, BMP=BMP, PNG=PNG, PICT=PICT, JPEG=JPEG, TIFF=TIFF, $2 QUALITY=QUALITY, DITHER=DITHER, CUBE=CUBE, QUIET=QUIET, MULTIPLE = multiple3 ;4 compile_opt idl2, strictarrsubs5 ;6 7 1 ;+ 8 ; NAME: 9 ; SAVEIMAGE 10 ; 11 ; PURPOSE: 12 ; Save the current graphics window to an output file (GIF by default). 2 ; 3 ; @file_comments 4 ; Save the current graphics window to an output file (GIF by default). 13 5 ; 14 6 ; The output formats supported are: … … 23 15 ; 8-bit or 24-bit output files are done automatically. 24 16 ; 25 ; CATEGORY: 26 ; Input/Output. 27 ; 28 ; CALLING SEQUENCE: 29 ; SAVEIMAGE, FILE 30 ; 31 ; INPUTS: 32 ; FILE Name of the output file (GIF format by default). 33 ; 34 ; OPTIONAL INPUTS: 35 ; None. 36 ; 37 ; KEYWORD PARAMETERS: 38 ; BMP Set this keyword to create BMP format (8-bit with color table). 39 ; PNG Set this keyword to create PNG format (8-bit with color table). 40 ; PICT Set this keyword to create PICT format (8-bit with color table). 41 ; JPEG Set this keyword to create JPEG format (24-bit true color). 42 ; TIFF Set this keyword to create TIFF format (24-bit true color). 43 ; QUALITY If set to a named variable, specifies the quality for 17 ; @categories Input/Output. 18 ; 19 ; @param FILE {in}{required} Name of the output file (GIF format by default). 20 ; 21 ; @keyword BMP Set this keyword to create BMP format (8-bit with color table). 22 ; 23 ; @keyword PNG Set this keyword to create PNG format (8-bit with color table). 24 ; 25 ; @keyword PICT Set this keyword to create PICT format (8-bit with color table). 26 ; 27 ; @keyword JPEG Set this keyword to create JPEG format (24-bit true color). 28 ; 29 ; @keyword TIFF Set this keyword to create TIFF format (24-bit true color). 30 ; 31 ; @keyword QUALITY If set to a named variable, specifies the quality for 44 32 ; JPEG output (default 75). Ranges from 0 ("terrible") to 45 33 ; 100 ("excellent"). Smaller quality values yield higher 46 34 ; compression ratios and smaller output files. 47 ; DITHER If set, dither the output image when creating 8-bit output 35 ; 36 ;@keyword DITHER If set, dither the output image when creating 8-bit output 48 37 ; which is read from a 24-bit display (default is no dithering). 49 ; CUBE If set, use the color cube method to quantize colors when 38 ; 39 ; @keyword CUBE If set, use the color cube method to quantize colors when 50 40 ; creating 8-bit output which is read from a 24-bit display 51 41 ; (default is to use the statistical method). This may improve 52 42 ; the accuracy of colors in the output image, especially white. 53 ; 43 ; @keyword QUIET Set this keyword to suppress the information message 54 44 ; (default is to print an information message). 55 ; MULTIPLE to write multiple gif image 56 ; 57 ; OUTPUTS: 58 ; None. 59 ; 60 ; OPTIONAL OUTPUTS: 61 ; None 62 ; 63 ; COMMON BLOCKS: 64 ; None 65 ; 66 ; SIDE EFFECTS: 67 ; The output file is overwritten if it exists. 68 ; 69 ; RESTRICTIONS: 70 ; Requires IDL 5.0 or higher (square bracket array syntax). 71 ; 72 ; EXAMPLE: 45 ; @keyword MULTIPLE to write multiple gif image. 46 ; 47 ; @restrictions The output file is overwritten if it exists. 48 ; 49 ; 50 ; @restrictions requires IDL 5.0 or higher (square bracket array syntax). 51 ; 52 ; @examples 73 53 ; 74 54 ;openr, lun, filepath('hurric.dat', subdir='examples/data'), /get_lun … … 80 60 ;saveimage, 'hurric.gif' 81 61 ; 82 ; MODIFICATION HISTORY: 83 ; Liam.Gumley@ssec.wisc.edu 62 ; @history Liam.Gumley@ssec.wisc.edu 84 63 ; http://cimss.ssec.wisc.edu/~gumley 85 ; $Id$86 ;87 ; Copyright (C) 1999 Liam E. Gumley88 64 ; 89 65 ; This program is free software; you can redistribute it and/or … … 100 76 ; along with this program; if not, write to the Free Software 101 77 ; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 78 ; 79 ; @version $Id$ 80 ; 102 81 ;- 82 PRO SAVEIMAGE, FILE, BMP=BMP, PNG=PNG, PICT=PICT, JPEG=JPEG, TIFF=TIFF, $ 83 QUALITY=QUALITY, DITHER=DITHER, CUBE=CUBE, QUIET=QUIET, MULTIPLE = multiple 84 ; 85 compile_opt idl2, strictarrsubs 86 ; 103 87 104 88 rcs_id = '$Id$' -
trunk/SRC/Picture/showimage.pro
r132 r133 1 PRO SHOWIMAGE, FILE, DITHER=DITHER, CURRENT=CURRENT2 ;3 compile_opt idl2, strictarrsubs4 ;5 6 1 ;+ 7 ; NAME: 8 ; SHOWIMAGE 9 ; 10 ; PURPOSE: 11 ; Show the contents of a graphics file in the current window. 2 ; 3 ; @file_comments 4 ; Show the contents of a graphics file in the current window. 12 5 ; 13 6 ; The input formats supported are: … … 21 14 ; to 8-bit or 24-bit images on-screen are done automatically. 22 15 ; 23 ; CATEGORY: 24 ; Input/Output. 25 ; 26 ; CALLING SEQUENCE: 27 ; SHOWIMAGE, FILE 28 ; 29 ; INPUTS: 30 ; FILE Name of the output file (format is identified automatically). 31 ; 32 ; OPTIONAL INPUTS: 33 ; None. 34 ; 35 ; KEYWORD PARAMETERS: 36 ; DITHER Set this keyword to dither the input image when displaying 16 ; @categories Input/Output. 17 ; 18 ; @param FILE {in}{required} Name of the output file (format is identified automatically). 19 ; 20 ; @keyword DITHER Set this keyword to dither the input image when displaying 37 21 ; 24-bit images on an 8-bit display (default is no dithering). 38 ; CURRENTSet this keyword to display the image in the current window22 ; @keyword CURRENT Set this keyword to display the image in the current window 39 23 ; (default is to create a new window sized to fit the image). 40 24 ; 41 ; OUTPUTS: 42 ; None. 43 ; 44 ; OPTIONAL OUTPUTS: 45 ; None 46 ; 47 ; COMMON BLOCKS: 48 ; None 49 ; 50 ; SIDE EFFECTS: 51 ; The color table is modified. 52 ; 53 ; RESTRICTIONS: 54 ; Requires IDL 5.2 or higher (image QUERY functions). 55 ; 56 ; EXAMPLE: 57 ; 58 ;showimage, filepath('rose.jpg', subdir='examples/data') 59 ; 60 ; MODIFICATION HISTORY: 61 ; Liam.Gumley@ssec.wisc.edu 25 ; @restrictions The color table is modified. 26 ; 27 ; @restrictions Requires IDL 5.2 or higher (image QUERY functions). 28 ; 29 ; @examples showimage, filepath('rose.jpg', subdir='examples/data') 30 ; 31 ; @history Liam.Gumley@ssec.wisc.edu 62 32 ; http://cimss.ssec.wisc.edu/~gumley 63 ; $Id$64 ;65 ; Copyright (C) 1999 Liam E. Gumley66 33 ; 67 34 ; This program is free software; you can redistribute it and/or … … 78 45 ; along with this program; if not, write to the Free Software 79 46 ; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 47 ; 48 ; @version $Id$ 49 ; 80 50 ;- 81 51 PRO SHOWIMAGE, FILE, DITHER=DITHER, CURRENT=CURRENT 52 ; 53 compile_opt idl2, strictarrsubs 54 ; 82 55 rcs_id = '$Id$' 83 56
Note: See TracChangeset
for help on using the changeset viewer.