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