Modern IDL by Michael Galloy

API documentation for example code

single page | use frames     summary     class     fields     routine details     file attributes

widgets/

mg_ximage.pro


Simple image viewing/processing application. This example illustrates:

* using a single event handler for all events * resizing * using a pixmap * using a scrolling draw widget

To simplify the application, only indexed color images are used.

Routines

Routines from mg_ximage.pro

mg_ximage_loadimage, pstate [, /new]

Loads the current image into the pixmap.

mg_ximage_refreshgraphics, pstate

Refresh the graphics display.

mg_ximage_setstatus, pstate, msg

Set the status message.

mg_ximage_resize, pstate, x, y

Resize the widget program.

mg_ximage_open, pstate

Query the user for a file to open and open it.

mg_ximage_openfile, pstate, filename

Open a specified image file.

mg_ximage_save, pstate

Query user for location to save image and save it.

mg_ximage_dooperation, pstate, uname

Perform an image processing operation on the image.

mg_ximage_drawevent, pstate, event

Hande draw widget events.

mg_ximage_event, event

Event handler for MG_XIMAGE.

mg_ximage_cleanup, tlb

Free resources of the widget program.

mg_ximage [, im]

Simple program to view and do some basic image processing operations on an image.

Routine details

top source mg_ximage_loadimage

mg_ximage_loadimage, pstate [, /new]

Loads the current image into the pixmap. If the current image is a new image, use the NEW keyword to create a new pixmap (of a possibly different size).

Parameters

pstate in required type=pointer

pointer to state structure

Keywords

new in optional type=boolean

set to create a new pixmap (of a possibly different size)

top source mg_ximage_refreshgraphics

mg_ximage_refreshgraphics, pstate

Refresh the graphics display.

Parameters

pstate in required type=pointer

pointer to state structure

top source mg_ximage_setstatus

mg_ximage_setstatus, pstate, msg

Set the status message.

Parameters

pstate in required type=pointer

pointer to state structure

msg in required type=string

message to use as status

top source mg_ximage_resize

mg_ximage_resize, pstate, x, y

Resize the widget program.

Parameters

pstate in required type=pointer

pointer to state structure

x in required type=long

new xsize of tlb

y in required type=long

new ysize of tlb

top source mg_ximage_open

mg_ximage_open, pstate

Query the user for a file to open and open it.

Parameters

pstate in required type=pointer

pointer to state structure

top source mg_ximage_openfile

mg_ximage_openfile, pstate, filename

Open a specified image file.

Parameters

pstate in required type=pointer

pointer to state structure

filename in required type=string

filename of image file to open

top source mg_ximage_save

mg_ximage_save, pstate

Query user for location to save image and save it.

Parameters

pstate in required type=pointer

pointer to state structure

top source mg_ximage_dooperation

mg_ximage_dooperation, pstate, uname

Perform an image processing operation on the image.

Parameters

pstate in required type=pointer

pointer to state structure

uname in required type=string

name of operation to perform

top source mg_ximage_drawevent

mg_ximage_drawevent, pstate, event

Hande draw widget events.

Parameters

pstate in required type=pointer

pointer to state structure

event in required type=structure

DRAW_WIDGET event structure

top source mg_ximage_event

mg_ximage_event, event

Event handler for MG_XIMAGE.

Parameters

event in required type=structure

any event generated by the program

top source mg_ximage_cleanup

mg_ximage_cleanup, tlb

Free resources of the widget program.

Parameters

tlb in required type=long

widget identifier of the top-level base

top source mg_ximage

mg_ximage [, im]

Simple program to view and do some basic image processing operations on an image.

Parameters

im in optional type=2D image array

image to show and manipulate

File attributes

Modification date: Fri Aug 12 22:46:31 2011
Lines: 159
Docformat: rst rst