Changeset 136 for trunk/SRC/Picture
- Timestamp:
- 07/10/06 17:20:19 (18 years ago)
- Location:
- trunk/SRC/Picture
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Picture/image_viewer.pro
r134 r136 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; The purpose of this program is to provide an interactive tool that can be used 5 5 ; to view JPEG, BMP, GIF, PNG, and TIFF picture files. Images are loaded into … … 11 11 ; @param event {in}{required} 12 12 ; 13 ; @restrictions While this program is running in an IDL session it will change the current 14 ; working directory, enables/disables color decomposition, and sets !QUIET=1, 15 ; !ORDER=0, & !P.BACKGROUND=0. These settings are returned to their initial 16 ; settings before the program was initiated once it is terminated. 17 ; 18 ; @restrictions This program is supported in IDL version 5.5 and newer. In order to open 19 ; GIF files or TIFF files with LZW compression the copy of IDL being used must 20 ; be licensed with these features. IDL only supports BMP files in the standard 21 ; Windows format and does not support OS2 bitmaps. 13 ; @restrictions 14 ; While this program is running in an IDL session it will change the current 15 ; working directory, enables/disables color decomposition, and sets !QUIET=1, 16 ; !ORDER=0, & !P.BACKGROUND=0. These settings are returned to their initial 17 ; settings before the program was initiated once it is terminated. 18 ; 19 ; @restrictions 20 ; This program is supported in IDL version 5.5 and newer. In order to open 21 ; GIF files or TIFF files with LZW compression the copy of IDL being used must 22 ; be licensed with these features. IDL only supports BMP files in the standard 23 ; Windows format and does not support OS2 bitmaps. 22 24 ; 23 25 ; @history Written by: AEB, 1/02. … … 972 974 ;********************************************************************************************* 973 975 ;+ 974 ; @param wid jetID {in}{required}976 ; @param widgetID {in}{required} 975 977 ;- 976 978 PRO IMAGE_VIEWER_CLEANUP,widgetID -
trunk/SRC/Picture/imdisp.pro
r134 r136 191 191 ;+ 192 192 ; 193 ; @file_comments 193 ; @file_comments 194 194 ; Display an image on the current graphics device. 195 195 ; IMDISP is an advanced replacement for TV and TVSCL. … … 216 216 ; @categories Image display 217 217 ; 218 ; @param IMAGE {in}{required} Array containing image data. 219 ; Pseudo (indexed) color images must have 2 dimensions. 220 ; True color images must have 3 dimensions, in either 221 ; [3, NX, NY], [NX, 3, NY], or [NX, NY, 3] form. 222 ; 223 ; @keyword RANGE For Pseudo Color images only, a vector with two elements 224 ; specifying the minimum and maximum values of the image 225 ; array to be considered when the image is byte-scaled 226 ; (default is minimum and maximum array values). 227 ; This keyword is ignored for True Color images, 228 ; or if the NOSCALE keyword is set. 229 ; 230 ; @keyword BOTTOM Bottom value in the color table to be used 231 ; for the byte-scaled image 232 ; (default is 0). 233 ; This keyword is ignored if the NOSCALE keyword is set. 234 ; 235 ; @keyword NCOLORS Number of colors in the color table to be used 236 ; for the byte-scaled image 237 ; (default is !D.TABLE_SIZE - BOTTOM). 238 ; This keyword is ignored if the NOSCALE keyword is set. 239 ; 240 ; @keyword MARGIN A scalar value specifying the margin to be maintained 241 ; around the image in normal coordinates 242 ; (default is 0.1, or 0.025 if !P.MULTI is set to display 243 ; multiple images). 244 ; 245 ; @keyword INTERP If set, the resized image will be interpolated using 246 ; bilinear interpolation 247 ; (default is nearest neighbor sampling). 248 ; 249 ; @keyword DITHER If set, true color images will be dithered when displayed 250 ; on an 8-bit graphics device 251 ; (default is no dithering). 252 ; 253 ; @keyword ASPECT A scalar value specifying the aspect ratio (height/width) 254 ; for the displayed image 255 ; (default is to maintain native aspect ratio). 256 ; 257 ; @keyword POSITION On input, a 4-element vector specifying the position 258 ; of the displayed image in the form [X0,Y0,X1,Y1] in 259 ; in normal coordinates 260 ; (default is [0.0,0.0,1.0,1.0]). 261 ; See the examples below to display an image where only the 262 ; offset and size are known (e.g. MAP_IMAGE output). 263 ; 264 ; @keyword OUT_POS On output, a 4-element vector specifying the position 265 ; actually used to display the image. 266 ; 267 ; @keyword NOSCALE If set, the image will not be byte-scaled 268 ; (default is to byte-scale the image). 269 ; 270 ; @keyword NORESIZE If set, the image will not be resized. 271 ; (default is to resize the image to fit the display). 272 ; 273 ; @keyword ORDER If set, the image is displayed from the top down 274 ; (default is to display the image from the bottom up). 275 ; Note that the system variable !ORDER is always ignored. 276 ; 277 ; @keyword USEPOS If set, the image will be sized to exactly fit a supplied 278 ; POSITION vector, over-riding ASPECT and MARGIN 279 ; (default is to honor ASPECT and MARGIN when a POSITION 280 ; vector is supplied). 281 ; 282 ; @keyword CHANNEL Display channel (Red, Green, or Blue) to be written. 283 ; 0 => All channels (the default) 284 ; 1 => Red channel 285 ; 2 => Green channel 286 ; 3 => Blue channel 287 ; This keyword is only recognized by graphics devices which 288 ; support 24-bit decomposed color (WIN, MAC, X). It is ignored 289 ; by all other graphics devices. However True color (RGB) 290 ; images can be displayed on any device supported by IMDISP. 291 ; 292 ; @keyword BACKGROUND If set to a positive integer, the background will be filled 293 ; with the color defined by BACKGROUND. 294 ; 295 ; @keyword ERASE If set, the screen contents will be erased. Note that if 296 ; !P.MULTI is set to display multiple images, the screen is 297 ; always erased when the first image is displayed. 298 ; 299 ; @keyword AXIS If set, plot axes will be drawn on the image. The default 300 ; x and y axis ranges are determined by the size of the image. 301 ; When the AXIS keyword is set, IMDISP accepts any keywords 302 ; supported by PLOT (e.g. TITLE, COLOR, CHARSIZE etc.). 303 ; 304 ; @keyword NEGATIVE If set, a photographic negative of the image is displayed. 305 ; The values of BOTTOM and NCOLORS are honored. This keyword 306 ; allows True color images scanned from color negatives to be 307 ; displayed. It also allows Pseudo color images to be displayed 308 ; as negatives without reversing the color table. This keyword 309 ; is ignored if the NOSCALE keyword is set. 310 ; 311 ; @restrictions The image is displayed on the current graphics device. 312 ; 313 ; @restrictions Requires IDL 5.0 or higher (square bracket array syntax). 218 ; @param IMAGE {in}{required} 219 ; Array containing image data. 220 ; Pseudo (indexed) color images must have 2 dimensions. 221 ; True color images must have 3 dimensions, in either 222 ; [3, NX, NY], [NX, 3, NY], or [NX, NY, 3] form. 223 ; 224 ; @keyword RANGE 225 ; For Pseudo Color images only, a vector with two elements 226 ; specifying the minimum and maximum values of the image 227 ; array to be considered when the image is byte-scaled 228 ; (default is minimum and maximum array values). 229 ; This keyword is ignored for True Color images, 230 ; or if the NOSCALE keyword is set. 231 ; 232 ; @keyword BOTTOM 233 ; Bottom value in the color table to be used 234 ; for the byte-scaled image 235 ; (default is 0). 236 ; This keyword is ignored if the NOSCALE keyword is set. 237 ; 238 ; @keyword NCOLORS 239 ; Number of colors in the color table to be used 240 ; for the byte-scaled image 241 ; (default is !D.TABLE_SIZE - BOTTOM). 242 ; This keyword is ignored if the NOSCALE keyword is set. 243 ; 244 ; @keyword MARGIN 245 ; A scalar value specifying the margin to be maintained 246 ; around the image in normal coordinates 247 ; (default is 0.1, or 0.025 if !P.MULTI is set to display 248 ; multiple images). 249 ; 250 ; @keyword INTERP 251 ; If set, the resized image will be interpolated using 252 ; bilinear interpolation 253 ; (default is nearest neighbor sampling). 254 ; 255 ; @keyword DITHER 256 ; If set, true color images will be dithered when displayed 257 ; on an 8-bit graphics device 258 ; (default is no dithering). 259 ; 260 ; @keyword ASPECT 261 ; A scalar value specifying the aspect ratio (height/width) 262 ; for the displayed image 263 ; (default is to maintain native aspect ratio). 264 ; 265 ; @keyword POSITION {default= [0.0,0.0,1.0,1.0]} 266 ; On input, a 4-element vector specifying the position 267 ; of the displayed image in the form [X0,Y0,X1,Y1] in 268 ; in normal coordinates 269 ; See the examples below to display an image where only the 270 ; offset and size are known (e.g. MAP_IMAGE output). 271 ; 272 ; @keyword OUT_POS 273 ; On output, a 4-element vector specifying the position 274 ; actually used to display the image. 275 ; 276 ; @keyword NOSCALE 277 ; If set, the image will not be byte-scaled 278 ; (default is to byte-scale the image). 279 ; 280 ; @keyword NORESIZE 281 ; If set, the image will not be resized. 282 ; (default is to resize the image to fit the display). 283 ; 284 ; @keyword ORDER 285 ; If set, the image is displayed from the top down 286 ; (default is to display the image from the bottom up). 287 ; Note that the system variable !ORDER is always ignored. 288 ; 289 ; @keyword USEPOS 290 ; If set, the image will be sized to exactly fit a supplied 291 ; POSITION vector, over-riding ASPECT and MARGIN 292 ; (default is to honor ASPECT and MARGIN when a POSITION 293 ; vector is supplied). 294 ; 295 ; @keyword CHANNEL 296 ; Display channel (Red, Green, or Blue) to be written. 297 ; 0 => All channels (the default) 298 ; 1 => Red channel 299 ; 2 => Green channel 300 ; 3 => Blue channel 301 ; This keyword is only recognized by graphics devices which 302 ; support 24-bit decomposed color (WIN, MAC, X). It is ignored 303 ; by all other graphics devices. However True color (RGB) 304 ; images can be displayed on any device supported by IMDISP. 305 ; 306 ; @keyword BACKGROUND 307 ; If set to a positive integer, the background will be filled 308 ; with the color defined by BACKGROUND. 309 ; 310 ; @keyword ERASE 311 ; If set, the screen contents will be erased. Note that if 312 ; !P.MULTI is set to display multiple images, the screen is 313 ; always erased when the first image is displayed. 314 ; 315 ; @keyword AXIS 316 ; If set, plot axes will be drawn on the image. The default 317 ; x and y axis ranges are determined by the size of the image. 318 ; When the AXIS keyword is set, IMDISP accepts any keywords 319 ; supported by PLOT (e.g. TITLE, COLOR, CHARSIZE etc.). 320 ; 321 ; @keyword NEGATIVE 322 ; If set, a photographic negative of the image is displayed. 323 ; The values of BOTTOM and NCOLORS are honored. This keyword 324 ; allows True color images scanned from color negatives to be 325 ; displayed. It also allows Pseudo color images to be displayed 326 ; as negatives without reversing the color table. This keyword 327 ; is ignored if the NOSCALE keyword is set. 328 ; 329 ; @restrictions 330 ; The image is displayed on the current graphics device. 331 ; 332 ; @restrictions 333 ; Requires IDL 5.0 or higher (square bracket array syntax). 314 334 ; 315 335 ; @examples … … 317 337 ;;- Load test data 318 338 ; 319 ; openr, lun, filepath('ctscan.dat', subdir='examples/data'), /get_lun339 ; openr, lun, filepath('ctscan.dat', subdir='examples/data'), /get_lun 320 340 ;ctscan = bytarr(256, 256) 321 341 ;readu, lun, ctscan … … 452 472 ;map_grid 453 473 ; 454 ; @history Liam.Gumley @ssec.wisc.edu474 ; @history Liam.Gumley\@ssec.wisc.edu 455 475 ; http://cimss.ssec.wisc.edu/~gumley 456 476 ; … … 471 491 ; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 472 492 ; 473 ; @version $Id : imdisp.pro,v 1.47 2002/06/05 16:31:07 gumley Exp$493 ; @version $Id$ 474 494 ; 475 495 ;- … … 485 505 ; 486 506 487 rcs_id = '$Id : imdisp.pro,v 1.47 2002/06/05 16:31:07 gumley Exp$'507 rcs_id = '$Id$' 488 508 489 509 ;------------------------------------------------------------------------------- -
trunk/SRC/Picture/saveimage.pro
r134 r136 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; Save the current graphics window to an output file (GIF by default). 5 5 ; … … 17 17 ; @categories Input/Output. 18 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 32 ; JPEG output (default 75). Ranges from 0 ("terrible") to 33 ; 100 ("excellent"). Smaller quality values yield higher 34 ; compression ratios and smaller output files. 35 ; 36 ;@keyword DITHER If set, dither the output image when creating 8-bit output 37 ; which is read from a 24-bit display (default is no dithering). 38 ; 39 ; @keyword CUBE If set, use the color cube method to quantize colors when 40 ; creating 8-bit output which is read from a 24-bit display 41 ; (default is to use the statistical method). This may improve 42 ; the accuracy of colors in the output image, especially white. 43 ; @keyword QUIET Set this keyword to suppress the information message 44 ; (default is to print an information message). 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). 19 ; @param FILE {in}{required} 20 ; Name of the output file (GIF format by default). 21 ; 22 ; @keyword BMP 23 ; Set this keyword to create BMP format (8-bit with color table). 24 ; 25 ; @keyword PNG 26 ; Set this keyword to create PNG format (8-bit with color table). 27 ; 28 ; @keyword PICT 29 ; Set this keyword to create PICT format (8-bit with color table). 30 ; 31 ; @keyword JPEG 32 ; Set this keyword to create JPEG format (24-bit true color). 33 ; 34 ; @keyword TIFF 35 ; Set this keyword to create TIFF format (24-bit true color). 36 ; 37 ; @keyword QUALITY 38 ; If set to a named variable, specifies the quality for 39 ; JPEG output (default 75). Ranges from 0 ("terrible") to 40 ; 100 ("excellent"). Smaller quality values yield higher 41 ; compression ratios and smaller output files. 42 ; 43 ; @keyword DITHER 44 ; If set, dither the output image when creating 8-bit output 45 ; which is read from a 24-bit display (default is no dithering). 46 ; 47 ; @keyword CUBE 48 ; If set, use the color cube method to quantize colors when 49 ; creating 8-bit output which is read from a 24-bit display 50 ; (default is to use the statistical method). This may improve 51 ; the accuracy of colors in the output image, especially white. 52 ; 53 ; @keyword QUIET 54 ; Set this keyword to suppress the information message 55 ; (default is to print an information message). 56 ; 57 ; @restrictions 58 ; The output file is overwritten if it exists. 59 ; 60 ; @restrictions 61 ; requires IDL 5.0 or higher (square bracket array syntax). 51 62 ; 52 63 ; @examples 53 64 ; 54 ; openr, lun, filepath('hurric.dat', subdir='examples/data'), /get_lun55 ; image = bytarr(440, 330)56 ; readu, lun, image57 ; free_lun, lun58 ; loadct, 1359 ; tvscl, image60 ; saveimage, 'hurric.gif'65 ; IDL> openr, lun, filepath('hurric.dat', subdir='examples/data'), /get_lun 66 ; IDL> image = bytarr(440, 330) 67 ; IDL> readu, lun, image 68 ; IDL> free_lun, lun 69 ; IDL> loadct, 13 70 ; IDL> tvscl, image 71 ; IDL> saveimage, 'hurric.gif' 61 72 ; 62 73 ; @history Liam.Gumley@ssec.wisc.edu -
trunk/SRC/Picture/showimage.pro
r134 r136 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; Show the contents of a graphics file in the current window. 5 5 ; … … 16 16 ; @categories Input/Output. 17 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 21 ; 24-bit images on an 8-bit display (default is no dithering). 22 ; @keyword CURRENT Set this keyword to display the image in the current window 23 ; (default is to create a new window sized to fit the image). 24 ; 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 18 ; @param FILE {in}{required} 19 ; Name of the output file (format is identified automatically). 20 ; 21 ; @keyword DITHER 22 ; Set this keyword to dither the input image when displaying 23 ; 24-bit images on an 8-bit display (default is no dithering). 24 ; 25 ; @keyword CURRENT 26 ; Set this keyword to display the image in the current window 27 ; (default is to create a new window sized to fit the image). 28 ; 29 ; @restrictions 30 ; The color table is modified. 31 ; 32 ; @restrictions 33 ; Requires IDL 5.2 or higher (image QUERY functions). 34 ; 35 ; @examples $ 36 ; IDL> showimage, filepath('rose.jpg', subdir='examples/data') 37 ; 38 ; @history Liam.Gumley\@ssec.wisc.edu 32 39 ; http://cimss.ssec.wisc.edu/~gumley 33 40 ; … … 46 53 ; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 47 54 ; 48 ; @version $Id$ 55 ; @version $Id$ 49 56 ; 50 57 ;-
Note: See TracChangeset
for help on using the changeset viewer.