[163] | 1 | |
---|
| 2 | |
---|
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
| 4 | <head> |
---|
| 5 | <title>imdisp.pro (SAXO Documentation Assistant)</title> |
---|
| 6 | </head> |
---|
| 7 | |
---|
| 8 | <body text="#000000" bgcolor="#FFFFFF"> |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | <!-- Navbar template takes a structure with the following fields: |
---|
| 12 | overview_href : |
---|
| 13 | overview_selected : |
---|
| 14 | dir_overview_href : |
---|
| 15 | dir_overview_selected : |
---|
| 16 | categories_href : |
---|
| 17 | categories_selected : |
---|
| 18 | index_href : |
---|
| 19 | index_selected : |
---|
| 20 | search_href : |
---|
| 21 | search_selected : |
---|
| 22 | file_selected : |
---|
| 23 | source_href : |
---|
| 24 | source_selected : |
---|
| 25 | help_href : |
---|
| 26 | help_selected : |
---|
| 27 | etc_selected : |
---|
| 28 | |
---|
| 29 | prev_file_href : |
---|
| 30 | next_file_href : |
---|
| 31 | |
---|
| 32 | view_single_page_href : |
---|
| 33 | view_frames_href : |
---|
| 34 | |
---|
| 35 | summary_fields_href : |
---|
| 36 | summary_routine_href : |
---|
| 37 | details_routine_href : |
---|
| 38 | |
---|
| 39 | title : |
---|
| 40 | subtitle : |
---|
| 41 | user : |
---|
| 42 | --> |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | <table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom"> |
---|
| 46 | <tr> |
---|
| 47 | <td width="10%"> |
---|
| 48 | <a href="image_viewer.html"><img src="./../prev.gif" border="0" alt="Previous"></a></td> |
---|
| 49 | <td width="80%" align="center" valign="center"> |
---|
| 50 | <font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../home.html">Overview</a></font></td> |
---|
| 51 | <td width="10%" align="right"> |
---|
| 52 | <a href="saveimage.html"><img src="./../next.gif" border="0" alt="Next"></a></td> |
---|
| 53 | </tr> |
---|
| 54 | </table> |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | <h1><font size="-2">Picture/</font></h1> |
---|
| 58 | <h2>imdisp.pro</h2> |
---|
| 59 | |
---|
| 60 | <dl> |
---|
| 61 | </dl> |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | Display an image on the current graphics device. |
---|
[290] | 65 | IMDISP is an advanced replacement for <a href="/Applications/rsi/idl_6.3/help/online_help/TV.html">TV</a> and |
---|
| 66 | <a href="/Applications/rsi/idl_6.3/help/online_help/TVSCL.html">TVSCL</a>. |
---|
[163] | 67 | |
---|
| 68 | - Supports WIN, MAC, X, CGM, PCL, PRINTER, PS, and Z graphics devices, |
---|
| 69 | - Image is automatically byte-scaled (can be disabled), |
---|
| 70 | - Custom byte-scaling of Pseudo color images via the RANGE keyword, |
---|
| 71 | - Pseudo (indexed) color and True color images are handled automatically, |
---|
| 72 | - 8-bit and 24-bit graphics devices are handled automatically, |
---|
| 73 | - Decomposed color settings are handled automatically, |
---|
| 74 | - Image is automatically sized to fit the display (can be disabled), |
---|
| 75 | - The !P.MULTI system variable is honored for multiple image display, |
---|
| 76 | - Image can be positioned via the POSITION keyword, |
---|
| 77 | - Color table splitting via the BOTTOM and NCOLORS keywords, |
---|
| 78 | - Image aspect ratio customization via the ASPECT keyword, |
---|
| 79 | - Resized images can be resampled (default) or interpolated, |
---|
| 80 | - Top down image display via the ORDER keyword (!ORDER is ignored), |
---|
| 81 | - Selectable display channel (R/G/B) via the CHANNEL keyword, |
---|
| 82 | - Background can be set to a specified color via the BACKGROUND keyword, |
---|
| 83 | - Screen can be erased prior to image display via the ERASE keyword, |
---|
| 84 | - Plot axes can be drawn on the image via the AXIS keyword, |
---|
| 85 | - Photographic negative images can be displayed via the NEGATIVE keyword. |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | <a name="#_imdisp"></a> |
---|
| 92 | |
---|
| 93 | <h2>imdisp <font size="-1" color="#006633"> |
---|
| 94 | Picture |
---|
| 95 | </font></h2> |
---|
| 96 | |
---|
| 97 | <p><font face="Courier">imdisp<i>, <a href="#_imdisp_keyword_IMAGE">IMAGE</a></i>, <a href="#_imdisp_keyword_RANGE">RANGE</a>=<i>vector</i>, <a href="#_imdisp_keyword_BOTTOM">BOTTOM</a>=<i>BOTTOM</i>, <a href="#_imdisp_keyword_NCOLORS">NCOLORS</a>=<i>NCOLORS</i>, <a href="#_imdisp_keyword_MARGIN">MARGIN</a>=<i>MARGIN</i>, <a href="#_imdisp_keyword_INTERP">INTERP</a>=<i>INTERP</i>, <a href="#_imdisp_keyword_DITHER">DITHER</a>=<i>DITHER</i>, <a href="#_imdisp_keyword_ASPECT">ASPECT</a>=<i>ASPECT</i>, <a href="#_imdisp_keyword_POSITION">POSITION</a>=<i>POSITION</i>, <a href="#_imdisp_keyword_OUT_POS">OUT_POS</a>=<i>OUT_POS</i>, <a href="#_imdisp_keyword_NOSCALE">NOSCALE</a>=<i>NOSCALE</i>, <a href="#_imdisp_keyword_NORESIZE">NORESIZE</a>=<i>NORESIZE</i>, <a href="#_imdisp_keyword_ORDER">ORDER</a>=<i>ORDER</i>, <a href="#_imdisp_keyword_USEPOS">USEPOS</a>=<i>USEPOS</i>, <a href="#_imdisp_keyword_CHANNEL">CHANNEL</a>=<i>CHANNEL</i>, <a href="#_imdisp_keyword_BACKGROUND">BACKGROUND</a>=<i>BACKGROUND</i>, <a href="#_imdisp_keyword_ERASE">ERASE</a>=<i>ERASE</i>, <a href="#_imdisp_keyword_AXIS">AXIS</a>=<i>AXIS</i>, <a href="#_imdisp_keyword_NEGATIVE">NEGATIVE</a>=<i>NEGATIVE</i>, <a href="#_imdisp_keyword__EXTRA">_EXTRA</a>=<i>_EXTRA</i></font></p> |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | <h3>Parameters</h3> |
---|
| 106 | |
---|
| 107 | |
---|
| 108 | <a name="#_imdisp_keyword_IMAGE"></a> |
---|
| 109 | <h4>IMAGE |
---|
| 110 | <font size="-1" color="#006633">in</font> |
---|
| 111 | |
---|
| 112 | |
---|
| 113 | <font size="-1" color="#006633">required</font> |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | </h4> |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | Array containing image data. |
---|
| 122 | Pseudo (indexed) color images must have 2 dimensions. |
---|
| 123 | True color images must have 3 dimensions, in either |
---|
| 124 | [3, NX, NY], [NX, 3, NY], or [NX, NY, 3] form. |
---|
| 125 | |
---|
| 126 | |
---|
| 127 | |
---|
| 128 | |
---|
| 129 | |
---|
| 130 | <h3>Keywords</h3> |
---|
| 131 | |
---|
| 132 | |
---|
| 133 | <a name="#_imdisp_keyword_RANGE"></a> |
---|
| 134 | <h4>RANGE |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>vector</i></font> |
---|
| 141 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>min and max array values</i></font> |
---|
| 142 | |
---|
| 143 | </h4> |
---|
| 144 | |
---|
| 145 | |
---|
| 146 | For Pseudo Color images only, a vector with two elements |
---|
| 147 | specifying the minimum and maximum values of the image |
---|
| 148 | array to be considered when the image is byte-scaled |
---|
| 149 | This keyword is ignored for True Color images, |
---|
| 150 | or if the NOSCALE keyword is set. |
---|
| 151 | |
---|
| 152 | |
---|
| 153 | <a name="#_imdisp_keyword_BOTTOM"></a> |
---|
| 154 | <h4>BOTTOM |
---|
| 155 | |
---|
| 156 | |
---|
| 157 | |
---|
| 158 | |
---|
| 159 | |
---|
| 160 | |
---|
| 161 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>0</i></font> |
---|
| 162 | |
---|
| 163 | </h4> |
---|
| 164 | |
---|
| 165 | |
---|
| 166 | Bottom value in the color table to be used |
---|
| 167 | for the byte-scaled image. |
---|
| 168 | This keyword is ignored if the NOSCALE keyword is set. |
---|
| 169 | |
---|
| 170 | |
---|
| 171 | <a name="#_imdisp_keyword_NCOLORS"></a> |
---|
| 172 | <h4>NCOLORS |
---|
| 173 | |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | |
---|
| 177 | |
---|
| 178 | |
---|
| 179 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>!D.TABLE_SIZE - BOTTOM</i></font> |
---|
| 180 | |
---|
| 181 | </h4> |
---|
| 182 | |
---|
| 183 | |
---|
| 184 | Number of colors in the color table to be used |
---|
| 185 | for the byte-scaled image |
---|
| 186 | This keyword is ignored if the NOSCALE keyword is set. |
---|
| 187 | |
---|
| 188 | |
---|
| 189 | <a name="#_imdisp_keyword_MARGIN"></a> |
---|
| 190 | <h4>MARGIN |
---|
| 191 | |
---|
| 192 | |
---|
| 193 | |
---|
| 194 | |
---|
| 195 | |
---|
| 196 | |
---|
| 197 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>0.1 or 0.025 if !P.MULTI is set to display multiple images</i></font> |
---|
| 198 | |
---|
| 199 | </h4> |
---|
| 200 | |
---|
| 201 | |
---|
| 202 | A scalar value specifying the margin to be maintained |
---|
| 203 | around the image in normal coordinates |
---|
| 204 | |
---|
| 205 | |
---|
| 206 | <a name="#_imdisp_keyword_INTERP"></a> |
---|
| 207 | <h4>INTERP |
---|
| 208 | |
---|
| 209 | |
---|
| 210 | |
---|
| 211 | |
---|
| 212 | |
---|
| 213 | |
---|
| 214 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>nearest neighbor sampling</i></font> |
---|
| 215 | |
---|
| 216 | </h4> |
---|
| 217 | |
---|
| 218 | |
---|
| 219 | If set, the resized image will be interpolated using |
---|
| 220 | bilinear interpolation |
---|
| 221 | |
---|
| 222 | |
---|
| 223 | <a name="#_imdisp_keyword_DITHER"></a> |
---|
| 224 | <h4>DITHER |
---|
| 225 | |
---|
| 226 | |
---|
| 227 | |
---|
| 228 | |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>no dithering</i></font> |
---|
| 232 | |
---|
| 233 | </h4> |
---|
| 234 | |
---|
| 235 | |
---|
| 236 | If set, true color images will be dithered when displayed |
---|
| 237 | on an 8-bit graphics device |
---|
| 238 | |
---|
| 239 | |
---|
| 240 | <a name="#_imdisp_keyword_ASPECT"></a> |
---|
| 241 | <h4>ASPECT |
---|
| 242 | |
---|
| 243 | |
---|
| 244 | |
---|
| 245 | |
---|
| 246 | |
---|
| 247 | |
---|
| 248 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>maintain native aspect ratio</i></font> |
---|
| 249 | |
---|
| 250 | </h4> |
---|
| 251 | |
---|
| 252 | |
---|
| 253 | A scalar value specifying the aspect ratio (height/width) |
---|
| 254 | for the displayed image |
---|
| 255 | |
---|
| 256 | |
---|
| 257 | <a name="#_imdisp_keyword_POSITION"></a> |
---|
| 258 | <h4>POSITION |
---|
| 259 | |
---|
| 260 | |
---|
| 261 | |
---|
| 262 | |
---|
| 263 | |
---|
| 264 | |
---|
| 265 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i> [0.0,0.0,1.0,1.0]</i></font> |
---|
| 266 | |
---|
| 267 | </h4> |
---|
| 268 | |
---|
| 269 | |
---|
| 270 | On input, a 4-element vector specifying the position |
---|
| 271 | of the displayed image in the form [X0,Y0,X1,Y1] in |
---|
| 272 | in normal coordinates |
---|
| 273 | See the examples below to display an image where only the |
---|
| 274 | offset and size are known (e.g. MAP_IMAGE output). |
---|
| 275 | |
---|
| 276 | |
---|
| 277 | <a name="#_imdisp_keyword_OUT_POS"></a> |
---|
| 278 | <h4>OUT_POS |
---|
| 279 | |
---|
| 280 | |
---|
| 281 | |
---|
| 282 | |
---|
| 283 | |
---|
| 284 | |
---|
| 285 | |
---|
| 286 | |
---|
| 287 | </h4> |
---|
| 288 | |
---|
| 289 | |
---|
| 290 | On output, a 4-element vector specifying the position |
---|
| 291 | actually used to display the image. |
---|
| 292 | |
---|
| 293 | |
---|
| 294 | <a name="#_imdisp_keyword_NOSCALE"></a> |
---|
| 295 | <h4>NOSCALE |
---|
| 296 | |
---|
| 297 | |
---|
| 298 | |
---|
| 299 | |
---|
| 300 | |
---|
| 301 | |
---|
| 302 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>to byte-scale the image</i></font> |
---|
| 303 | |
---|
| 304 | </h4> |
---|
| 305 | |
---|
| 306 | |
---|
| 307 | If set, the image will not be byte-scaled. |
---|
| 308 | |
---|
| 309 | |
---|
| 310 | <a name="#_imdisp_keyword_NORESIZE"></a> |
---|
| 311 | <h4>NORESIZE |
---|
| 312 | |
---|
| 313 | |
---|
| 314 | |
---|
| 315 | |
---|
| 316 | |
---|
| 317 | |
---|
| 318 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>To resize the image to fit the display</i></font> |
---|
| 319 | |
---|
| 320 | </h4> |
---|
| 321 | |
---|
| 322 | |
---|
| 323 | If set, the image will not be resized. |
---|
| 324 | |
---|
| 325 | |
---|
| 326 | <a name="#_imdisp_keyword_ORDER"></a> |
---|
| 327 | <h4>ORDER |
---|
| 328 | |
---|
| 329 | |
---|
| 330 | |
---|
| 331 | |
---|
| 332 | |
---|
| 333 | |
---|
| 334 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>To display the image from the bottom up</i></font> |
---|
| 335 | |
---|
| 336 | </h4> |
---|
| 337 | |
---|
| 338 | |
---|
| 339 | If set, the image is displayed from the top down |
---|
| 340 | Note that the system variable !ORDER is always ignored. |
---|
| 341 | |
---|
| 342 | |
---|
| 343 | <a name="#_imdisp_keyword_USEPOS"></a> |
---|
| 344 | <h4>USEPOS |
---|
| 345 | |
---|
| 346 | |
---|
| 347 | |
---|
| 348 | |
---|
| 349 | |
---|
| 350 | |
---|
| 351 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>To honor ASPECT and MARGIN when POSITION vector is supplied</i></font> |
---|
| 352 | |
---|
| 353 | </h4> |
---|
| 354 | |
---|
| 355 | |
---|
| 356 | If set, the image will be sized to exactly fit a supplied |
---|
| 357 | POSITION vector, over-riding ASPECT and MARGIN. |
---|
| 358 | |
---|
| 359 | |
---|
| 360 | <a name="#_imdisp_keyword_CHANNEL"></a> |
---|
| 361 | <h4>CHANNEL |
---|
| 362 | |
---|
| 363 | |
---|
| 364 | |
---|
| 365 | |
---|
| 366 | |
---|
| 367 | |
---|
| 368 | |
---|
| 369 | |
---|
| 370 | </h4> |
---|
| 371 | |
---|
| 372 | |
---|
| 373 | Display channel (Red, Green, or Blue) to be written. |
---|
| 374 | 0 => All channels (the default) |
---|
| 375 | 1 => Red channel |
---|
| 376 | 2 => Green channel |
---|
| 377 | 3 => Blue channel |
---|
| 378 | This keyword is only recognized by graphics devices which |
---|
| 379 | support 24-bit decomposed color (WIN, MAC, X). It is ignored |
---|
| 380 | by all other graphics devices. However True color (RGB) |
---|
| 381 | images can be displayed on any device supported by IMDISP. |
---|
| 382 | |
---|
| 383 | |
---|
| 384 | <a name="#_imdisp_keyword_BACKGROUND"></a> |
---|
| 385 | <h4>BACKGROUND |
---|
| 386 | |
---|
| 387 | |
---|
| 388 | |
---|
| 389 | |
---|
| 390 | |
---|
| 391 | |
---|
| 392 | |
---|
| 393 | |
---|
| 394 | </h4> |
---|
| 395 | |
---|
| 396 | |
---|
| 397 | If set to a positive integer, the background will be filled |
---|
| 398 | with the color defined by BACKGROUND. |
---|
| 399 | |
---|
| 400 | |
---|
| 401 | <a name="#_imdisp_keyword_ERASE"></a> |
---|
| 402 | <h4>ERASE |
---|
| 403 | |
---|
| 404 | |
---|
| 405 | |
---|
| 406 | |
---|
| 407 | |
---|
| 408 | |
---|
| 409 | |
---|
| 410 | |
---|
| 411 | </h4> |
---|
| 412 | |
---|
| 413 | |
---|
| 414 | If set, the screen contents will be erased. Note that if |
---|
| 415 | !P.MULTI is set to display multiple images, the screen is |
---|
| 416 | always erased when the first image is displayed. |
---|
| 417 | |
---|
| 418 | |
---|
| 419 | <a name="#_imdisp_keyword_AXIS"></a> |
---|
| 420 | <h4>AXIS |
---|
| 421 | |
---|
| 422 | |
---|
| 423 | |
---|
| 424 | |
---|
| 425 | |
---|
| 426 | |
---|
| 427 | |
---|
| 428 | |
---|
| 429 | </h4> |
---|
| 430 | |
---|
| 431 | |
---|
| 432 | If set, plot axes will be drawn on the image. The default |
---|
| 433 | x and y axis ranges are determined by the size of the image. |
---|
| 434 | When the AXIS keyword is set, IMDISP accepts any keywords |
---|
| 435 | supported by PLOT (e.g. TITLE, COLOR, CHARSIZE etc.). |
---|
| 436 | |
---|
| 437 | |
---|
| 438 | <a name="#_imdisp_keyword_NEGATIVE"></a> |
---|
| 439 | <h4>NEGATIVE |
---|
| 440 | |
---|
| 441 | |
---|
| 442 | |
---|
| 443 | |
---|
| 444 | |
---|
| 445 | |
---|
| 446 | |
---|
| 447 | |
---|
| 448 | </h4> |
---|
| 449 | |
---|
| 450 | |
---|
| 451 | If set, a photographic negative of the image is displayed. |
---|
| 452 | The values of BOTTOM and NCOLORS are honored. This keyword |
---|
| 453 | allows True color images scanned from color negatives to be |
---|
| 454 | displayed. It also allows Pseudo color images to be displayed |
---|
| 455 | as negatives without reversing the color table. This keyword |
---|
| 456 | is ignored if the NOSCALE keyword is set. |
---|
| 457 | |
---|
| 458 | |
---|
| 459 | <a name="#_imdisp_keyword__EXTRA"></a> |
---|
| 460 | <h4>_EXTRA |
---|
| 461 | |
---|
| 462 | |
---|
| 463 | |
---|
| 464 | |
---|
| 465 | |
---|
| 466 | |
---|
| 467 | |
---|
| 468 | |
---|
| 469 | </h4> |
---|
| 470 | |
---|
| 471 | |
---|
| 472 | |
---|
| 473 | |
---|
| 474 | |
---|
[234] | 475 | <h3>Examples</h3><pre> |
---|
[163] | 476 | |
---|
| 477 | ;- Load test data |
---|
| 478 | |
---|
| 479 | openr, lun, filepath('ctscan.dat', subdir='examples/data'), /get_lun |
---|
| 480 | ctscan = bytarr(256, 256) |
---|
| 481 | readu, lun, ctscan |
---|
| 482 | free_lun, lun |
---|
| 483 | openr, lun, filepath('hurric.dat', subdir='examples/data'), /get_lun |
---|
| 484 | hurric = bytarr(440, 330) |
---|
| 485 | readu, lun, hurric |
---|
| 486 | free_lun, lun |
---|
| 487 | read_jpeg, filepath('rose.jpg', subdir='examples/data'), rose |
---|
| 488 | help, ctscan, hurric, rose |
---|
| 489 | |
---|
| 490 | ;- Display single images |
---|
| 491 | |
---|
| 492 | !p.multi = 0 |
---|
| 493 | loadct, 0 |
---|
| 494 | imdisp, hurric, /erase |
---|
| 495 | wait, 3.0 |
---|
| 496 | imdisp, rose, /interp, /erase |
---|
| 497 | wait, 3.0 |
---|
| 498 | |
---|
| 499 | ;- Display multiple images without color table splitting |
---|
| 500 | ;- (works on 24-bit displays only; top 2 images are garbled on 8-bit displays) |
---|
| 501 | |
---|
| 502 | !p.multi = [0, 1, 3, 0, 0] |
---|
| 503 | loadct, 0 |
---|
| 504 | imdisp, ctscan, margin=0.02 |
---|
| 505 | loadct, 13 |
---|
| 506 | imdisp, hurric, margin=0.02 |
---|
| 507 | imdisp, rose, margin=0.02 |
---|
| 508 | wait, 3.0 |
---|
| 509 | |
---|
| 510 | ;- Display multiple images with color table splitting |
---|
| 511 | ;- (works on 8-bit or 24-bit displays) |
---|
| 512 | |
---|
| 513 | !p.multi = [0, 1, 3, 0, 0] |
---|
| 514 | loadct, 0, ncolors=64, bottom=0 |
---|
| 515 | imdisp, ctscan, margin=0.02, ncolors=64, bottom=0 |
---|
| 516 | loadct, 13, ncolors=64, bottom=64 |
---|
| 517 | imdisp, hurric, margin=0.02, ncolors=64, bottom=64 |
---|
| 518 | imdisp, rose, margin=0.02, ncolors=64, bottom=128 |
---|
| 519 | wait, 3.0 |
---|
| 520 | |
---|
| 521 | ;- Display an image at a specific position, over-riding aspect and margin |
---|
| 522 | |
---|
| 523 | !p.multi = 0 |
---|
| 524 | loadct, 0 |
---|
| 525 | imdisp, hurric, position=[0.0, 0.0, 1.0, 0.5], /usepos, /erase |
---|
| 526 | wait, 3.0 |
---|
| 527 | |
---|
| 528 | ;- Display an image with axis overlay |
---|
| 529 | |
---|
| 530 | !p.multi = 0 |
---|
| 531 | loadct, 0 |
---|
| 532 | imdisp, rose, /axis, /erase |
---|
| 533 | wait, 3.0 |
---|
| 534 | |
---|
| 535 | ;- Display an image with contour plot overlay |
---|
| 536 | |
---|
| 537 | !p.multi = 0 |
---|
| 538 | loadct, 0 |
---|
| 539 | imdisp, hurric, out_pos=out_pos, /erase |
---|
| 540 | contour, smooth(hurric, 10, /edge), /noerase, position=out_pos, $ |
---|
| 541 | xstyle=1, ystyle=1, levels=findgen(5)*40.0, /follow |
---|
| 542 | wait, 3.0 |
---|
| 543 | |
---|
| 544 | ;- Display a small image with correct resizing |
---|
| 545 | |
---|
| 546 | !p.multi = 0 |
---|
| 547 | loadct, 0 |
---|
| 548 | data = (dist(8))[1:7, 1:7] |
---|
| 549 | imdisp, data, /erase |
---|
| 550 | wait, 3.0 |
---|
| 551 | imdisp, data, /interp |
---|
| 552 | wait, 3.0 |
---|
| 553 | |
---|
| 554 | ;- Display a true color image without and with interpolation |
---|
| 555 | |
---|
| 556 | !p.multi = 0 |
---|
| 557 | imdisp, rose, /erase |
---|
| 558 | wait, 3.0 |
---|
| 559 | imdisp, rose, /interp |
---|
| 560 | wait, 3.0 |
---|
| 561 | |
---|
| 562 | ;- Display a true color image as a photographic negative |
---|
| 563 | |
---|
| 564 | imdisp, rose, /negative, /erase |
---|
| 565 | wait, 3.0 |
---|
| 566 | |
---|
| 567 | ;- Display a true color image on PostScript output |
---|
| 568 | ;- (note that color table is handled automatically) |
---|
| 569 | |
---|
| 570 | current_device = !d.name |
---|
| 571 | set_plot, 'PS' |
---|
| 572 | device, /color, bits_per_pixel=8, filename='imdisp_true.ps' |
---|
| 573 | imdisp, rose, /axis, title='PostScript True Color Output' |
---|
| 574 | device, /close |
---|
| 575 | set_plot, current_device |
---|
| 576 | |
---|
| 577 | ;- Display a pseudo color image on PostScript output |
---|
| 578 | |
---|
| 579 | current_device = !d.name |
---|
| 580 | set_plot, 'PS' |
---|
| 581 | device, /color, bits_per_pixel=8, filename='imdisp_pseudo.ps' |
---|
| 582 | loadct, 0 |
---|
| 583 | imdisp, hurric, /axis, title='PostScript Pseudo Color Output' |
---|
| 584 | device, /close |
---|
| 585 | set_plot, current_device |
---|
| 586 | |
---|
| 587 | ;- Display an image where only the offset and size are known |
---|
| 588 | |
---|
| 589 | ;- Read world elevation data |
---|
| 590 | file = filepath('worldelv.dat', subdir='examples/data') |
---|
| 591 | openr, lun, file, /get_lun |
---|
| 592 | data = bytarr(360, 360) |
---|
| 593 | readu, lun, data |
---|
| 594 | free_lun, lun |
---|
| 595 | ;- Reorganize array so it spans 180W to 180E |
---|
| 596 | world = data |
---|
| 597 | world[0:179, *] = data[180:*, *] |
---|
| 598 | world[180:*, *] = data[0:179, *] |
---|
| 599 | ;- Create remapped image |
---|
| 600 | map_set, /orthographic, /isotropic, /noborder |
---|
| 601 | remap = map_image(world, x0, y0, xsize, ysize, compress=1) |
---|
| 602 | ;- Convert offset and size to position vector |
---|
| 603 | pos = fltarr(4) |
---|
| 604 | pos[0] = x0 / float(!d.x_vsize) |
---|
| 605 | pos[1] = y0 / float(!d.y_vsize) |
---|
| 606 | pos[2] = (x0 + xsize) / float(!d.x_vsize) |
---|
| 607 | pos[3] = (y0 + ysize) / float(!d.y_vsize) |
---|
| 608 | ;- Display the image |
---|
| 609 | loadct, 0 |
---|
| 610 | imdisp, remap, pos=pos, /usepos |
---|
| 611 | map_continents |
---|
| 612 | map_grid |
---|
| 613 | |
---|
[234] | 614 | </pre><h3>Version history</h3> |
---|
[163] | 615 | |
---|
[234] | 616 | <h4>Version</h4> |
---|
[290] | 617 | $Id: imdisp.pro 262 2007-08-21 14:19:32Z pinsard $ |
---|
[163] | 618 | |
---|
[234] | 619 | <h4>History</h4> |
---|
| 620 | Liam.Gumley@ssec.wisc.edu |
---|
| 621 | <a href="http://cimss.ssec.wisc.edu/~gumley"/> |
---|
[163] | 622 | |
---|
| 623 | Copyright (C) 1999, 2000 Liam E. Gumley |
---|
| 624 | |
---|
| 625 | This program is free software; you can redistribute it and/or |
---|
| 626 | modify it under the terms of the GNU General Public License |
---|
| 627 | as published by the Free Software Foundation; either version 2 |
---|
| 628 | of the License, or (at your option) any later version. |
---|
| 629 | |
---|
| 630 | This program is distributed in the hope that it will be useful, |
---|
| 631 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 632 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 633 | GNU General Public License for more details. |
---|
| 634 | |
---|
| 635 | You should have received a copy of the GNU General Public License |
---|
| 636 | along with this program; if not, write to the Free Software |
---|
| 637 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
| 638 | |
---|
| 639 | |
---|
| 640 | |
---|
| 641 | <h3>Known issues</h3> |
---|
| 642 | |
---|
| 643 | |
---|
| 644 | |
---|
| 645 | <h4>Restrictions</h4> |
---|
| 646 | The image is displayed on the current graphics device. |
---|
| 647 | |
---|
| 648 | |
---|
| 649 | Requires IDL 5.0 or higher (square bracket array syntax). |
---|
| 650 | |
---|
| 651 | |
---|
| 652 | |
---|
| 653 | |
---|
| 654 | |
---|
| 655 | |
---|
| 656 | |
---|
| 657 | |
---|
| 658 | |
---|
| 659 | |
---|
| 660 | <font size="-3"><p> </p></font> |
---|
| 661 | <hr size="1" color="#CCCCCC"/> |
---|
| 662 | |
---|
| 663 | |
---|
| 664 | |
---|
| 665 | |
---|
[187] | 666 | <p><font color="gray" size="-3"> Produced by IDLdoc 2.0.</font></p> |
---|
[163] | 667 | |
---|
| 668 | </body> |
---|
[249] | 669 | </html> |
---|