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