Image Window Library Reference Guide

Introduction

The Image Window Library (IWL) consists of a set of function calls that allow you to communicate with IVE's Image Windows (Monitors) from your application program. The Monitor program displays multiwave, multitime, volumetric image data as a stack of sections, which can be traversed using mouse or key events or thru a calling application. Multiple waves can be displayed together, overlayed in different colors, or one at a time in pseudocolor. The Monitor also draws graphics on top of images to aid in segmenting, region selection, or any kind of marking that contributes to image understanding. There can be multiple Monitors running at any one time and applications can communicate with any or all of them. For just about everything that the monitor can do, there is a function call that returns the current setting, and for many things there is a function call to change the setting. The IW Lib, IM Lib and the WM Lib work together to make programs interactive with the monitor. Most header information is accessed thru IM calls; events such as keypress, mouse and display change are registered with WM calls. Then information such as mouse position, current display section, wave, wid etc are returned through IWL...

C programs using the IWL need to include IWInclude.h.

Topics

Release Notes | Initialization and Shutdown | Window Attributes | Image Display | Image Info | Graphics |
Mouse, Keys and Events | Query Shared Memory | Utility Functions | Matrix and Vector Operations |
Alphabetical List of Functions


Release Notes

New functions or changes which break backward compatibility made since the end of 1998:


Initialization and Shutdown

Of the following functions, IWAttach may be of use to many applications in order to explicitly initialize communications with the image windows. The remaining functions are only useful to applications that need to create or destroy the infrastructure for the image windows.


Window Attributes

The following set of calls modify or return the current settings for the various attributes of an image window.

Alter Settings

Return Settings


Image Display

These calls effect the display of images in the window.

Alter Settings

Return Settings


Image Info

The image file header contains all sorts of information about the data. Most of the window header parallels the image header and so data info is available thru the IM calls. These calls reference information applicable only to image windows and not files.

Alter Settings

Return Settings


Graphics

Add Graphics (IWGrAdd<object> 2D, 3D, 5D)

The following graphics calls let you put graphics into the monitor window. A list of the graphics is maintained so that you only need to tell the monitor once about the graphic and it will be displayed whenever the users returns to a section it is supposed to be displayed in. All of the IWGrAdd calls draw 2D objects only. For all of the IWGrAdd calls, there are four versions:

The version without a D at the end is the window coordinate version. This means that regardless of the zoom of your underlying image, your graphics will remain a fixed size and will be displayed no matter which section you change to. For window graphics, you will most likely need to scale your x and y range to fit in the windows range which is by default, 0 -512.

2D graphics also are drawn to all sections, but are in data coordinates, so when the image is zoomed up or down, the graphics will zoom along with it.

3D graphics are only drawn to the specified z section. If there are multiple waves or times in the image window, the graphic will be shown in this z section for all waves and times.

5D graphics let you specify a z, wave and time so that the graphic will only show up in one z, one wave and one time section. 2D and 3D graphics are actually a subset of 5D graphics in that if you enter a -1 in the z parameter, the graphic will be drawn in all z's, similarly if you enter -1 for wave, the graphic would be shown in the specified section in all waves, and the same for time.

Display Graphics

Once graphics are added, they need to be displayed. They will either be displayed the first time the image is redrawn or by using a call to draw the graphic on top of the image.

Remove Graphics

When the graphics are no longer needed, they need to be removed.

5D Model Graphics

Use these calls to control which window the 5D model graphics are drawn into. The model graphics do not use the above IWGr calls.

Overlay Graphics

Use when fast graphics are needed for things like rubberbanding or roaming graphic objects. Instead of redrawing the image and graphics, the graphic can just be drawn into the overlay buffer.

Alter Other Graphics Parameters

Return Other Graphics Parameters


Mouse, Keys and Events

Events are generally registered using WMMenu calls: WMAddEventHandler and WMAddDisplayChangeEvent.

Event Broadcast Control

Getting Information from Events

Old IW Calls For Registering Events


Shared Memory


Query


Utility Functions


Alphabetical List of Image Window Functions


Initialization and Shutdown


IWAttach

Explicitly initializes communications with image windows.

Synopsis (C)

int IWAttach(void);

Synopsis (Fortran)

integer function iwattach()

Description

IWAttach performs the necessary steps to enable an application to communicate with the image windows. IWAttach returns IW_SUCCESS (1) if it could establish the communication channel. IWAttach returns IW_ERROR (-1) if it could not establish the communication channel. One possible cause for a failure is that no application had previously called IWStart to create the infrastructure necessary to communicate with image windows.

Many applications do not need to call IWAttach because a successful attempt to open an image window with IMOpen or IWAttachWin implicitly enables the communication channel. As a corollary, any IW function that expects a stream number as an argument can be safely called: either the stream number has been attached to an image window or the stream is not attached to an image window and the function will simply return. Of the remaining IW functions, the following may be safely called whether or not the communication channel to the image windows has been enabled:


IWStart

Creates the components needed for communication with the image windows.

Synopsis (C)

int IWStart(int left, int bottom, int width, int height);

Synopsis (Fortran)

integer function iwstart(left, bottom, width, height)
integer left, bottom, width, height

Description

Allocates and initializes the resources necessary to create image windows and communicate with them. The four arguments, left, bottom, width, and height, are a relic: the only effect they have is on the behavior of IWRtScrnGeom. Traditionally, applications have passed zero for left and bottom, 1280 for width, and 1024 for height.

Calling IWStart while the user already has an image windows session will have disastrous consequences for both the old and new sessions unless the environment variable IVE_SHMDIR has been set differently in both sessions. A common practice (which unfortunately involves a race condition) is to call IWAttach to check if an image windows session has already been started, and if one has not been started, to then call IWStart.

Return Value

Returns IW_SUCCESS (1) if the components necessary for creating and communicating with image windows could be created; otherwise, returns IW_ERROR (-1).


IWStop

Destroys any open image windows and the infrastructure necessary to communicate with the image windows.

Synopsis (C)

int IWStop(void);

Synopsis (Fortran)

integer function iwstop()

Limitations

Does not currently destroy all the resources allocated by IWStart. As a workaround, applications have been using something like the C code shown below after calling IWStop:

#include<stdio.h>
#include<stdlib.h>
    char* login_name = getenv("LOGNAME");
    char filename[256];
    char command[300];

    if (login_name != 0) {
        (void) sprintf(
            command, "rm -rf \"%s\"/.ive_\"%s\"_*", filename, login_name
        );
    } else {
        (void) sprintf(command, "rm -rf \"%s\"/.ive_*", filename);
    }
    system(command);

Return Value

Always returns IW_SUCCESS (1).


Alter Window Information - "IWAl"


IWAlBufImg

Enables or disables image display buffering.

Synopsis (C)

int IWAlBufImg(int istream, int iflag);

Synopsis (Fortran)

integer function iwalbufimg(istream, iflag)
integer istream, iflag

Description

If iflag is zero, instructs the image window attached to istream to not buffer displayed images. If iflag is non-zero, instructs the image window attached to istream to buffer displayed images. Unless configured otherwise by the user, displayed images are buffered by default.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window, otherwise, returns IW_ERROR (-1).


IWAlClrBkg

Requests that the next redraw should clear the window background.

Synopsis (C)

int IWAlClrBkg(int istream, int iflag);

Synopsis (Fortran)

integer function iwalclrbkg(istream, iflag)
integer istream, iflag

Description

If iflag is not zero, requests that the next redraw for the image window attached to istream should clear the window's background as well. If iflag is zero, requests that the next redraw for the image window should not clear the window's background.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window, otherwise, returns IW_ERROR (-1).


IWAlColorMode

Changes whether an image window uses true color or pseudocolor to display images

Synopsis (C)

int IWAlColormode(int istream, int mode);

Synopsis (Fortran)

integer function iwalcolormode(istream, mode)
integer istream, mode

Description

If mode is IW_PSEUDO (1), causes the image window attached to istream to display images composed of one wavelength rendered in pseudocolor. If mode is IW_TRUE_COLOR (0), causes the image window attached to istream to display images which can be composed of one or to three wavelengths with each wavelength rendered in a different color.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and the workstation's graphics support the given mode; otherwise, returns IW_ERROR (-1).


IWAlColorNames

Changes the names of the graphics colors associated with all windows.

Synopsis (C)

int IWAlColorNames(char *colors[IW_NUM_COLORS]);

Description

There are only IW_NUM_COLORS (12) graphic colors available at any one time, but they can be changed by modifying the RGB values with IWAlLut. Each of the colors has a name associated with it to make it easier for end users to select a color. Use IWAlColorNames to change the names associated with all the graphic colors. The new color names, colors, is an array of null-terminated strings.

IWAlColorNames ignores any characters in a color name after the first IW_COLOR_NAME_LEN (12) characters.

Return Value

Returns IW_SUCCESS (1) if the color names were modified; returns IW_ERROR (-1) if the shared memory storage for the color names could not be located.


IWAlComplexDis

Changes the way complex-valued images are displayed.

Synopsis (C)

int IWAlComplexDis(int istream, int iflag);

Synopsis (Fortran)

integer function iwalcomplexdis(istream, iflag)
integer istream, iflag

Description

Changes how the image window attached to istream converts complex-valued data to render it as an image. iflag specifies the new conversion method and may be one of the following values:

IW_COMPLEX_AMPLITUDE (0x10000 hexadecimal)
Use the amplitude of the complex value when calculating displayed images.
IW_COMPLEX_REAL (0x20000 hexadecimal)
Use the real component of the complex value when calculating displayed images.
IW_COMPLEX_IMAGINARY (0x30000 hexadecimal)
Use the imaginary component of the complex value when calculating displayed images.
IW_COMPLEX_PHASE (0x40000 hexadecimal)
Use the phase, in radians, of the complex value when calculating displayed images.

Return Value

Returns IW_SUCCESS if istream is attached to an image window which currently contains complex-valued data; otherwise, returns IW_ERROR.


IWAlCursor

Changes the mouse pointer symbol used in an image window.

Synopsis (C)

int IWAlCursor(int istream, int shape);

Synopsis (Fortran)

integer function iwalcursor(istream, shape)
integer istream, shape

Description

If shape is one, makes the mouse pointer a small red bar for the image window attached to istream. Typically this is done to hide the normal cursor when an application draws a custom cursor using the image window graphics calls. If shape is not one, changes the mouse pointer to its normal crosshair shape for the image window attached to istream.

Return Value

If istream is attached to an image window, returns IW_SUCCESS (1); otherwise, returns IW_ERROR (-1).


IWAlDisDelay

Changes the interval between repetitions automatically generated for key and mouse button events.

Synopsis (C)

int IWAlDisDelay(int istream, int delay);

Synopsis (Fortran)

integer function iwaldisdelay(istream, delay)
integer istream, delay

Description

Pressing and holding a key in an image window will generate multiple key press events if the button is held down long enough. IWAlDisDelay sets the interval between sending each subsequent event to be delay microseconds. Until changed, the value for the delay is one microsecond.

Return Value

If istream is attached to an image window, IWAlDisDelay returns IW_SUCCESS (1); otherwise, returns IW_ERROR (-1).


IWAlDisImg

Enables or disables image display.

Synopsis (C)

int IWAlDisImg(int istream, int iflag);

Synopsis (Fortran)

integer function iwaldisimg(istream, iflag)
integer istream, iflag

Description

If iflag is zero, instructs the image window attached to istream to not display images (overlayed graphics are still drawn). If iflag is non-zero, instructs the image window to display images. Unless configured otherwise by the user, images are displayed by default.

Return Value

If istream is attached to an image window, returns IW_SUCCESS (1); otherwise returns IW_ERROR (-1).


IWAlDisOffset

Sets the horizontal and vertical offsets applied when displaying a given wave.

Synopsis (C)

int IWAlDisOffset(int istream, int iwave, int ipixel[2]);

Synopsis (Fortran)

integer function iwaldisoffset(istream, iwave, ipixel)
integer istream, iwave, ipixel(2)

Description

The positioning of images within an image window's image display area depends on four parameters: the image window's size, the size of the data's x and y dimensions, the number of rows and columns of images displayed simultaneously, and wave-dependent horizontal and vertical offsets in x and y. For the wave with index iwave in the window attached to istream, IWAlDisOffset sets the current values for that wave's horizontal and vertical offsets. IWAlDisOffset gets the horizontal offset from the first element of ipixel and gets the vertical offset from the second element of ipixel; both values are assumed to be in units of data pixels. Valid values of the wave index, iwave, range from zero to the number of waves in the window minus one.

Return Value

Returns IW_SUCCESS (1) if istream is attached to a window and that window has the specified wave, iwave; otherwise, returns IW_ERROR (-1).


IWAlDisSec_ZWT

Changes the currently displayed section (specified by its z, wave, and time indices).

Synopsis (C)

int IWAlDisSec_ZWT(int istream, int iz, int iw, int it);

Synopsis (Fortran)

integer function iwaldissec_zwt(istream, iz, iw, it)
integer istream, iz, iw, it

Description

Changes the currently displayed Z section (iz), wavelength (iw), and time-point (it). If the current sections in different waves are synchronized (see IWRtDisSyncMode and IWAlDisSyncMode), then the current section in other wavelengths will also be changed (enforcement of synchronization was added in the August 2000 release).

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and iz, iw, and it are valid z, wave, and time, respectively, indices for that image window. Otherwise, returns IW_ERROR (-1).


IWAlDisSec

Changes the currently displayed section (specified by its index in the list of sections).

Synopsis (C)

int IWAlDisSec(int istream, int isec);

Synopsis (Fortran)

integer function iwaldissec(istream, isec)
integer istream, isec

Description

Sets isec to be the current section displayed in the window attached to istream. If the current sections in different waves are synchronized (see IWRtDisSyncMode and different waves are synchronized (see IWRtDisSyncMode and IWAlDisSyncMode), then the current section in other wavelengths will also be changed (enforcement of synchronization was added in the August 2000 release). If the image window displays multiple images in a matrix, the current section is the section show in the first image in the matrix.

It is usually more convenient to use IWAlDisSec_ZWT.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and isec is a valid section index for that image window; otherwise, returns IW_ERROR (-1).


IWAlDisSyncMode

Enables or disables synchronized display of data with multiple waves.

Synopsis (C)

int IWAlDisSyncmode(int istream, int mode);

Synopsis (Fortran)

integer function iwaldissyncmode(istream, mode)
integer istream, mode

Description

An image window maintains the concept of a current section for each wave and can enforce a relationship between the current sections in different waves. For the image window attached to istream, IWAlDisSyncMode changes the relationship enforced between the current sections in different waves. The new policy is set by mode which may be one of the following:

IW_APPLY_SYNC (0)
The image window forces the current sections in different waves to have the same z and time indices.
IW_APPLY_NONE (1)
The image window does not enforce a relationship between the current sections in different waves.
IW_APPLY_ALL (2)
If one current section is changed, the image window applies the same relative change to the current sections in all other waves; the image window then coerces the modified indices for the current sections so that they fall within the bounds of the data set.

Unless configured otherwise by the user, the default behavior for image windows is IW_APPLY_SYNC.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window; otherwise, returns IW_ERROR (-1).


IWAlDisWinBdr

Changes the decorations added to an image display window.

Synopsis (C)

int IWAlDisWinBdr(int istream, int borderSettings);

Synopsis (Fortran)

integer function iwaldiswinbdr(istream, borderSettings)
integer istream, borderSettings

Description

The parameter borderSettings sets what type of decorations are present. Valid values are:

IW_MON_FULL_BRDR (0)
window title and resize border shown
IW_MON_RESIZE_BRDR (1)
window resize border shown
IW_MON_NO_BRDR (2)
no decorations added to window

Return Value

If istream is attached to an image window and borderSettings is one of the allowed values shown above, returns IW_SUCCESS (1); otherwise returns IW_ERROR (-1).


IWAlDisWinTool

Changes which menus and tool bars are shown with an image window.

Synopsis (C)

int IWAlDisWinTool(int istream, int toolSettings);

Synopsis (Fortran)

integer function iwaldiswintool(istream, toolSettings)
integer istream, toolSettings

Description

The argument toolSettings sets what type of menus and tool bars are present for the display window attached to istream. Valid values for toolSettings are a bitwise or (or simple sum in FORTRAN) of one or more of the following:

IW_MON_NO_MENU_TOOLS (0)
no menu or tool bars are shown
IW_MON_SHOW_MENU (1)
menu bar along the top of the image window is shown
IW_MON_SHOW_LEFTTOOLS (2)
buttons and slider along left side of image window are shown
IW_MON_ALL_MENU_TOOLS (3)
all menu and tool bars are shown

Return Value

If istream is attached to an image window and toolSettings is one of the values shown above, returns IW_SUCCESS (1); otherwise, returns IW_ERROR (-1).


IWAlFileFormat

Changes the byte ordering and floating-point representation assumed for an image file.

Synopsis (C)

int IWAlFileFormat(int istream, int iflag);

Synopsis (Fortran)

integer function iwalfileformat(istream, iflag)
integer istream, iflag

Description

Two different formats for image data files are supported: one in which multi-byte quantities are written in big-endian format and one in which they are written in little-endian format. Both formats use IEEE floating point representation. By default, the library automatically detects the format of the file when reading it and will apply any necessary byte swapping. When writing files, the default is to always write them in the big-endian format. If you wish to override these defaults, use IWAlFileFormat to alter how subsequent reads and writes will be performed. Setting iflag to a non-zero value will force the file to be interpreted in the small-endian format; setting it to zero forces the use of the big-endian format.

Prior to the June 1999 release of Priism, the two formats supported were a big-endian one which used the IEEE representation for floating-point values and a little-endian one which used a VAX representation for floating-point values. Library support for the VAX format was dropped in the June 1999 release and replaced with the little-endian format with IEEE floating-point values.

Return Value

If istrream is attached to an image window, IWAlFileFormat returns IW_SUCCESS (1); otherwise, returns IW_ERROR.


IWAlFilename

Changes the name of the file associated with a wave in an image window.

Synopsis (C)

int IWAlFilename(int istream, int iwave, char *filename);

Synopsis (Fortran)

integer function iwalfilename(istream, iwave, filename)
integer istream, iwave
character filename(*)

Description

Changes the name of the file associated with wave, iwave, in the image window referenced by istream to be filename.

Return Value

Returns IW_SUCCESS if istream is attached to an image window and iwave is a valid wave index for that window; otherwise, returns IW_ERROR.


IWAlGrColors

Changes the graphic colors associated with each wavelength.

Synopsis (C)

int IWAlGrColors(int istream, int icolor[IW_MAX_WAVE]);

Synopsis (Fortran)

integer function iwalgrcolors(istream, icolor)
integer istream, icolor(5)

Description

Sets the graphic color for the ith wave to the ith element of icolor where i ranges from zero to IW_MAX_WAVE - 1.

Return Value

Returns IW_ERROR (-1) if istream is not valid or any of elements of icolor are not in the range from 0 to IW_NUM_COLORS - 1; otherwise, returns IW_SUCCESS (1).


IWAlGrDis

Enables or disables display of graphics on an image window.

Synopsis (C)

int IWAlGrDis(int istream, int iflag);

Synopsis (Fortran)

integer function iwalgrdis(istream, iflag)
integer istream, iflag

Description

If iflag is not zero, enables display of graphics in the image window attached to istream. If iflag is zero, disables display of graphics in the image window attached to istream.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window; otherwise, returns IW_ERROR (-1).


IWAlGrDisRange

Allows the graphics from more than one section to be drawn when a single image is drawn.

Synopsis (C)

int IWAlGrDisRange(int istream, int range[4]);

Synopsis (Fortran)

integer function iwalgrdisrange(istream, range)
integer istream, range(4)

Description

Sets the range for drawing graphics in istream. range has four elements:

range[0]
number of z sections before current section
range[1]
number of z sections after current section
range[2]
number of time sections before current section
range[3]
number of time sections after current section

Return Value

If istream is attached to an image window, returns IW_SUCCESS (1); otherwise, returns IW_ERROR (-1).


IWAlImgColor

Sets the image display colors for each channel ("wavelength") in the image window.

Synopsis (C)

int IWAlImgColor(int istream, int icolor[IW_MAX_WAVE]);

Synopsis (Fortran)

integer function iwalimgcolor(istream, icolor)
integer istream, icolor(5)

Description

The image display color for each wavelength is given in icolor. Valid values of icolor are: IW_RED (1), IW_GREEN (2), IW_BLUE (4), IW_WHITE (7), IW_BLACK (0), IW_YELLOW (3), IW_PINK (5), or IW_CYAN (6).

Return Value

If istream is attached to an image window and icolor is one of the valid options listed above, IWAlImgColor returns IW_SUCCESS; otherwise, returns IW_ERROR.


IWAlInterp

Enables or disables interpolation of zoomed up images.

Synopsis (C)

int IWAlInterp(int istream, int iflag);

Synopsis (Fortran)

integer function iwalinterp(istream, iflag)
integer istream, iflag

Description

Sets how the image window attached to istream displays images when the zoom factor is greater than one. If iflag is 0, the zoomed images will not be interpolated; if iflag is not 0, the zoomed images will be interpolated. Unless configured otherwise by the user, the default is not to interpolate images when the zoom factor is greater than one.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window; otherwise, returns IW_ERROR (-1).


IWAlLut

Changes the RGB lookup tables (LUTs) used by all image windows.

Synopsis (C)

void IWAlLut(int ired[], int igreen[], int iblue[]);

Synopsis (Fortran)

subroutine iwallut(ired, igreen, iblue)
integer ired(*), igreen(*), iblue(*)

Description

Copies ired to the red component of the image windows' color table, igreen to the green component of the image windows' color table and iblue to the blue component of the image windows' color table. ired, igreen, and iblue must have at least imin + IWRtLutSize() + IW_NUM_COLORS elements where imin is the position of the first color used for pseudocolor image display. Use IWRtSclMinMax to determine the value of imin.


IWAlMulDis

Changes the number of horizontally and vertically displayed images within a single window.

Synopsis (C)

int IWAlMulDis(int istream, int imdx, int imdy);

Synopsis (Fortran)

integer function iwalmuldis(istream, imdx, imdy)
integer istream, imdx, imdy

Description

Changes the number of horizontally (imdx) and vertically (imdy) displayed images.

By default, imdx and imdy are one.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and imdx and imdy are both positive; otherwise, returns IW_ERROR (-1).


IWAlNoCopy

Sets whether data is copied when written to an image window.

Synopsis (C)

int IWAlNoCopy(int istream, int iflag);

Synopsis (Fortran)

integer function iwalnocopy(istream, iflag)
integer istream, iflag

Description

Functions that write entire images to image windows will either copy the data that is passed to them or assume control (including responsibility of deallocation) of the block of memory passed to them avoiding the overhead of a copy. The former is the default; the latter requires that the image be allocated in shared memory with IWAlcSHM.

Call IWAlNoCopy with iflag set to a non-zero value to bypass copying when writing images to istream. Call IWAlNoCopy with iflag set to zero to cause a copy to be performed when a write is done.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window; otherwise, returns IW_ERROR (-1).


IWAlOffsetGroup

Synopsis (C)

int IWAlOffsetGroup(int istream, int flags[]);

Synopsis (Fortran)

integer function iwaloffsetgroup(istream, flags)
integer istream
integer flags(*)


IWAlOVColors

Changes the colors used for drawing in the overlay planes.

Synopsis (C)

int IWAlOVColors(int red[], int green[], int blue[]);

Synopsis (Fortran)

integer function iwalovcolors(red, green, blue)
integer red(*), green(*), blue(*)

Description

Copies ired to the red component of the overlay color table, igreen to the green component of the overlay color table, and iblue to the blue component of the overlay color table. ired, igreen, and iblue must have at least IWRtNumOVColors() elements.

Return Value

Always returns IW_SUCCESS (1).


IWAlPointerPos

Shifts the position of the mouse pointer to a specified location in an image window.

Synopsis (C)

int IWAlPointerPos(int istream, int winpos[2]);

Synopsis (Fortran)

integer function iwalpointerpos(istream, winpos)
integer istream, winpos(2)

Description

Moves the mouse pointer to the location winpos[0] screen pixels to the right and winpos[1] screen pixels up from the lower left hand corner of the image display area in the image window attached to istream.

Return Value

Returns IW_SUCCESS if successful.

Returns IW_SUCCESS (1) if istream is attached to an image window and the coordinates in winpos fall within the bounds of that image window's image display area; otherwise, returns IW_ERROR (-1).


IWAlPsdGrColor

Changes the color map number of graphics displayed when the window is in pseudocolor mode.

Synopsis (C)

int IWAlPsdGrColor(int istream, int icolor);

Synopsis (Fortran)

integer function iwalpsdgrcolor(istream, icolor)
integer istream, icolor

Description

Valid values of icolor are between 0 and (IW_NUM_COLORS-1). By default, graphics will be displayed with a color map number of IW_RED.

Return Value

Returns IW_SUCCESS if istream is attached to an image window and icolor is valid; otherwise, returns IW_ERROR.


IWAlScl

Changes the intensity scaling values for a particular wavelength.

Synopsis (C)

int IWAlScl(int istream, int iwave, float scale[4]);

Synopsis (Fortran)

integer function iwalscl(istream, iwave, scale)
integer istream, iwave
real scale(4)

Description

IWRtScl sets wave scaling parameters for the wave iwave (valid values of iwave range from zero to the number of wavelengths in the image window minus one) in the image window attached to istream. The scaling parameters are read from scale as follows:

first element
Is the minimum displayed intensity. Intensities below this value are displayed the same as the minimum intensity.
second element
Is the maximum displayed intensity.
third element
Is the exponent (i.e. gamma) of the scaling function. A linear scaling, which has an exponent of one, is a common case. A scaling relationship which varies as the square root of the intensity would have an exponent of 0.5; a scaling relationship which varies as the square of the intensity would have an exponent of two.
fourth element
Controls the display of intensities larger than the maximum displayed intensity. If this element is not one, intensities larger than the maximum intensity are displayed the same as the maximum intensity; otherwise, intensities larger than the maximum intensity are displayed the same as the minimum intensity.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and iwave is greater than or equal to zero and less than IW_MAX_WAVE (5); otherwise, returns IW_ERROR (-1).


IWAlSclBar

Enables or disables display of the distance scale bar.

Synopsis (C)

int IWAlSclBar(int istream, int iflag);

Synopsis (Fortran)

integer function iwalsclbar(istream, iflag)
integer istream, iflag

Description

Calling IWAlSclBar with iflag equal to zero turns off display of the scale bar in the window attached to istream. Calling IWAlSclBar with iflag equal to one or two turns on display of the scale bar; if iflag is two, the image window will also show a label indicating the length of the scale bar.

Return Value

Returns IW_ERROR (-1) if istream is not valid; otherwise, returns IW_SUCCESS (1).


IWAlScratchSize

Sets the maximum number of sections in a scratch window.

Synopsis (C)

int IWAlScratchSize(int istream, int size);

Synopsis (Fortran)

integer function iwalscratchsize(istream, size)
integer istream, size

Description

For the scratch window attached to istream, sets the maximum number of z sections that can be held to size

Return Value

Returns IW_SUCCESS if successful.

Returns IW_ERROR if an error occurs; this can happen if istream is not valid or is not attached to a scratch window.


IWAlSclBarAttr

Changes the properties of the distance scale bar.

Synopsis (C)

int IWAlSclBarAttr(int istream, int icolor, int direction, float length, int thickness, int position[2]);

Synopsis (Fortran)

integer function iwalsclbarattr(istream, icolor, direction, length, thickness, position)
integer istream
integer icolor, direction, thickness, position(2)
real length

Description

Changes the properties of the scale bar in the image window attached to istream. icolor sets the graphics color index used to display the scale bar. direction sets the orientation of the scale bar: if direction is one, the scale bar is vertical; if direction is zero, the scale bar is horizontal. length sets the length of the scale bar. The units of the length are the same as are used to express the pixel spacing for the data displayed in the image window: the usual convention uses microns, position sets the x and y coordinates of the lower left corner of the scale bar; the coordinates are measured in units of screen pixels and are relative to the lower left corner of the image display area. ithick sets the thickness, in screen pixels, of the scale bar.

Return Value

Returns IW_ERROR if istream is not attached to an image window; otherwise, returns IW_SUCCESS.


IWAlSclAlgorithm

Changes the algorithm used to scale images for display.

Synopsis (C)

int IWAlSclAlgorithm(int istream, int iflag);

Synopsis (Fortran)

integer function iwalsclalgorithm(istream, iflag)
integer istream, iflag

Description

Changes the scaling algorithm used by the image window attached to istream. iflag is a code for the new algorithm and may be one of the following:

IW_SCALING_DONTCARE (0)
Uses a lookup table to speed up calculations, but accuracy suffers for floating point and complex data as the exponent gets increasingly far from one.
IW_SCALING_EXACT (0x1000000 hexadecimal)
For floating point or complex data, uses a direct scaling operation that is accurate within the limits of single precision arithmetic. For other data types, the algorithm is the same as is used with IW_SCALING_DONTCARE.

For a fuller description of these algorithms, see IWScaleImage. This call was added in the October 1998 release.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and iflag is one of the allowed values listed above; otherwise, returns IW_ERROR (-1).


IWAlSecMMM

Changes the minimum, maximum, and mean values stored for a section.

Synopsis (C)

int IWAlSecMMM(int istream, int isec, float minimum, float maximum, float mean);

Synopsis (Fortran)

integer function iwalsecmmm(istream, isec, minimum, maximum, mean)
integer istream, isec
real minimum, maximum, mean

Description

Image windows are capable of storing a minimum, maximum, and mean value to be associated with a particular section. For the image window attached to istream, IWAlSecMMM changes the minimum associated with the section, isec, to be minimum, the maximum associated with that section to be maximum, and the mean associated with that section to be mean. Valid values of isec range from 0 to the number of sections in the image window minus one.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and isec is a valid section index for that window; otherwise, returns IW_ERROR (-1).


IWAlSecScl

Changes the intensity scaling values of a particular section.

Synopsis (C)

int IWAlSecScl(int istream, int isec, float *scale);

Synopsis (Fortran)

integer function iwalsecscl(istream, isec, scale)
integer istream, isec
real scale(4)

Description

Same as IWAlScl except that scale is applied to the section, isec, rather than an entire wave.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and isec is a valid section index for that image window; otherwise, returns IW_ERROR (-1).


IWAlSecThreshold

Changes the recommended threshold level for a particular section.

Synopsis (C)

int IWAlSecThreshold(int istream, int isec, float threshold);

Synopsis (Fortran)

integer function iwalsecthreshold(istream, isec, threshold)
integer istream, isec
real threshold

Description

Sets the recommended intensity threshold for the section index, isec, to be threshold. Use IWRtSecThreshold to retrieve the threshold setting and IWClrSecThreshold to clear it. To set the recommended threshold for an entire wave, use IWAlThreshold.

IWAlSecThreshold was added to the IW library in February 2002.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and isec is valid for that window; otherwise, returns IW_ERROR (-1).


IWAlStepAttr

Changes the direction and increment used when stepping through sections in an image window.

Synopsis (C)

int IWAlStepAttr(int istream, int attributes[2]);

Synopsis (Fortran)

integer function iwalstepattr(istream, attributes)
integer istream, attributes(2)

Description

The behavior of IWNextImage, IWPrevImage, IWLastImage, and IWFirstImage depends upon the current step direction. IWAlStepAttr sets the step direction and step size for the image window attached to istream. The value of the first element of iattr controls the step direction; it may be one of the following:

0
Step through the sections as a linear sequence defined by the interleaving format and the dimensions in z, time, and wave.
1
The step direction is along the z dimension.
2
The step direction is along the time dimension.
3
The step direction is along the wave dimension.

The second element of iattr is the step size. Unless configured otherwise by the user, the default is to step one section at a time along the z dimension.

Return Value

Returns IW_SUCCESS (1) if istream is attached to a window and the second element of iattr is one of the allowed values; otherwise, returns IW_ERROR (-1).


IWAlSWFile

Sets the swap file name used by the memory manager.

Synopsis (C)

int IWAlSWFile(int istream, char *file);

Synopsis (Fortran)

integer function iwalswfile(istream, file)
integer istream
character file(*)

Description

If necessary, the IW library memory manager will swap out image data from an image window to a file specific to that image window. By default, the file will be a temporary one created as necessary and deleted when the user closes the image window. Use IWAlSWFile to change the name of the swap file for the image window attached to istream. For well-defined behavior, IWAlSWFile should be called before any image data is written to the image window.

Return value

If istream is attached to an image window and the length of file is within the limits the library can handle, IWAlSWFile returns IW_SUCCESS (1); otherwise, returns IW_ERROR (-1).


IWAlThreshold

Changes the recommended threshold level for a particular wave.

Synopsis (C)

int IWAlThreshold(int istream, int wave, float threshold);

Synopsis (Fortran)

integer function iwalthreshold(istream, wave, threshold)
integer istream, wave
real threshold

Description

Sets the recommended intensity threshold for the wave index, wave, to be threshold. Use IWRtThreshold to retrieve the threshold setting and IWClrThreshold to clear it. To set the recommended threshold for a single section, use IWAlSecThreshold.

IWAlThreshold was added to the IW library in February 2002.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and wave is a valid wave index for that image window; otherwise, returns IW_ERROR (-1).


IWAlWaveMap

Shows or hides a single wavelength in a window.

Synopsis (C)

int IWAlWaveMap(int istream, int iwave, int iflag);

Synopsis (Fortran)

integer function iwalwavemap(istream, iwave, iflag)
integer istream, iwave, iflag

Description

If iflag is not zero, hides the wave with index iwave in the image window attached to istream and then forces the image window to redraw. If istream is not attached to a window or iwave is not already mapped, IWAlWaveMap returns IW_ERROR (-1); otherwise, returns IW_SUCCESS (1).

If iflag is zero, shows the wave with index iwave in the image window attached to istream and then forces the image window to redraw. If istream is not attached to a window, iwave is not a valid wave for the window, or the display color for the wave is IW_BLACK, IWAlWaveMap returns IW_ERROR (-1); otherwise, returns IW_SUCCESS (1).


IWAlWinPos

Changes the screen location and size of a window.

Synopsis (C)

int IWAlWinPos(int istream, int xstart, int ystart, int width, int height);

Synopsis (Fortran)

integer function iwalwinpos(istream, xstart, ystart, width, height)
integer istream
integer xstart, ystart, width, height

Description

Moves the image window attached to istream so that its lower left corner is xstart pixel to the right and ystart pixels above the lower left corner of the screen and changes the image window to be be width screen pixels wide and height screen pixels high.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and width and height are non-negative; otherwise, returns IW_ERROR (-1).


IWAlZoom

Changes zoom factor for a window.

Synopsis (C)

int IWAlZoom(int istream, float zoom);

Synopsis (Fortran)

integer function iwalzoom(istream, zoom)
integer istream
real zoom

Description

Sets the zoom factor to be zoom for the window attached to istream.

Return Value

Returns IW_SUCCESS if successful.

Returns IW_ERROR if istream is not attached to a window or zoom is less than 0.03125 or greater than 32.


IWAlZWTMMM

Changes the minimum, maximum, and mean values stored for a section specified by its z, wave, and time indices.

Synopsis (C)

int IWAlZWTMMM(int istream, int iz, int iw, int it, float dmin, float dmax, float dmean);

Synopsis (Fortran)

integer function iwalzwtmmm(istream, iz, iw, it, dmin, dmax, dmean)
integer istream, iz, iw, it
real dmin, dmax, dmean

Description

Is the same as IWAlSecMMM, but the section is specified by its z index, iz, wave index, iw, and time index, it rather than the section's position in the stack.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and iz, iw, and it are valid indices for that window; otherwise, returns IW_ERROR (-1).


IWClrSecThreshold

Clears the recommended threshold level for a particular section.

Synopsis (C)

int IWClrSecThreshold(int istream, int isec);

Synopsis (Fortran)

integer function iwclrsecthreshold(istream, isec)
integer istream, isec

Description

Clears the recommended threshold level, if any, for the section, sec. Until IWAlSecThreshold is called for the section, IWRtSecThreshold will return IW_ERROR.

IWClrSecThreshold was added to the IW library in February 2002.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and isec is a valid section index for that window; otherwise, returns IW_ERROR (-1).


IWClrThreshold

Clears the recommended threshold level for a particular wave.

Synopsis (C)

int IWClrThreshold(int istream, int wave);

Synopsis (Fortran)

integer function iwclrthreshold(istream, wave)
integer istream, wave

Description

Clears the recommended threshold level, if any, for the wave index, wave. Until IWAlThreshold is called for the wave, IWRtThreshold will return IW_ERROR.

IWClrThreshold was added to the IW library in February 2002.

Return Value

Returns IW_SUCCESS (1) if istream is attached to an image window and wave is a valid wave index for that window; otherwise, returns IW_ERROR (-1).


Window Graphics - "IWGr"


IWGrAddBox, IWGrAddBox2D, IWGrAddBox3D, IWGrAddBox5D

Synopsis (C)

int IWGrAddBox(int istream, float x, float y, float width, float height, int ith, int ipat, int icolor);
int IWGrAddBox2D(int istream, float x, float y, float width, float height, int ith, int ipat, int icolor);
int IWGrAddBox3D(int istream, float x, float y, float z, float width, float height, int ith, int ipat, int icolor);
int IWGrAddBox5D(int istream, float x, float y, float z, int wave, int time, float width, float height, int ith, int ipat, int icolor);

Synopsis (Fortran)

integer function iwgraddbox(istream, x, y, width, height, ith, ipat, icolor)
integer function iwgraddbox2d(istream, x, y, width, height, ith, ipat, icolor)
integer function iwgraddbox3d(istream, x, y, z, width, height, ith, ipat, icolor)
integer function iwgraddbox5d(istream, x, y, z, wave, time, width, height, ith, ipat, icolor)
integer istream, ith, ipat, icolor, wave, time
real x, y, z, width, height

Description

In the image window attached to istream, draws a rectangle parallel to the xy plane. x and y are the coordinates of the bottom left corner of the rectangle, width is the x (horizontal) dimension of the rectangle, and height is the y (vertical) dimension of the rectangle. IWGrAddBox assumes that the location and dimensions are in window coordinates; IWGrAddBox2D, IWGrAddBox3D, and IWGrAddBox5D assume the location and dimensions are in data coordinates. A rectangle added by IWGrAddBox or IWGrAddBox2D is not associated with a particular section and will appear in all sections. A rectangle added by IWGrAddBox3D is associated with a particular z coordinate (z) but will appear across all waves and time points. A rectangle added by IWGrAddBox5D has a z coordinate (z), wave index (wave), and time index (time) associated with it. You can use -1 for z, wave, or time if you do not want a particular coordinate assigned to the rectangle for the z, wave, or time dimension, respectively. When a coordinate is not assigned for a dimension, the rectangle appears across all sections in that dimension.

icolor sets the color index for the color of the added rectangle. Valid values for icolor range from zero to IW_NUM_COLORS-1 (11); out-of-range values for icolor are coerced to zero. ith sets the thickness, in screen pixels, of the lines used to draw the rectangles boundaries. ipat is currently ignored; for compatibility with future versions where ipat will set the style of line used, always set ipat to one.

Return Value

Returns a non-negative value which is the ID of the added graphic if successful; use that ID with the functions that manipulate individual graphics or list of graphics. Returns IW_ERROR (-1) if istream is not attached to an image window.


IWGrAddCir, IWGrAddCir2D, IWGrAddCir3D, IWGrAddCir5D

Synopsis (C)

int IWGrAddCir(int istream, float cx, float cy, float rad, int ith, int icolor);
int IWGrAddCir2D(int istream, float cx, float cy, float rad, int ith, int icolor);
int IWGrAddCir3D(int istream, float cx, float cy, float cz, float rad, int ith, int icolor);
int IWGrAddCir5D(int istream, float cx, float cy, float cz, int wave, int time, float rad, int ith, int icolor);

Synopsis (Fortran)

integer function iwgraddcir(istream, cx, cy, rad,ith, icolor)
integer function iwgraddcir2d(istream, cx, cy, rad, ith, icolor)
integer function iwgraddcir3d(istream, cx, cy, cz, rad, ith, icolor)
integer function iwgraddcir5d(istream, cx, cy, cz, wave, time, rad, ith, icolor)
integer istream, ith, icolor, wave, time
real cx, cy, cz, rad

Description

In the image window attached to istream, draws a circle parallel to the xy plane. cx, cy, and cz are the coordinates for the center of the circle, and rad is the radius. IWGrAddCir assumes that the center coordinates and radius are in window coordinates; IWGrAddCir2D, IWGrAddCir3D, and IWGrAddCir5D assume the center coordinates and radius are in data coordinates. A circle added by IWGrAddCir or IWGrAddCir2D is not associated with a particular section and will appear in all sections. A circle added by IWGrAddCir3D is associated with a particular z coordinate (cz) but will appear across all waves and time points. A circle added by IWGrAddCir5D has a z coordinate (cz), wave index (wave), and time index (time) associated with it. You can use -1 for cz, wave, or time if you do not want a particular coordinate assigned to the circle's center for the z, wave, or time dimension, respectively. When a coordinate is not assigned for a dimension, the circle appears across all sections in that dimension.

icolor sets the color index for the color of the added circle. Valid values for icolor range from zero to IW_NUM_COLORS-1 (11); out-of-range values for icolor are coerced to zero. ith sets the thickness of the circle's boundary. if ith is one, the boundary is one screen pixel thick; if ith is not one, the thickness is in the same units as the radius (screen pixels for IWGrAddCir and data pixels for IWGrAddCir2D, IWGrAddCir3D, and IWGrAddCir5D).

Return Value

Returns a non-negative value which is the ID of the added graphic if successful; use that ID with the functions that manipulate individual graphics or list of graphics. Returns IW_ERROR (-1) if istream is not attached to an image window.


IWGrAddLn, IWGrAddLn2D,IWGrAddLn3D, IWGrAddLn5D

Synopsis (C)

int IWGrAddLn(int istream, float x1, float y1, float x2, float y2, int ith, int ipat, int icolor);
int IWGrAddLn2D(int istream, float x1, float y1, float x2, float y2, int ith, int ipat, int icolor);
int IWGrAddLn3D(int istream, float x1, float y1, float z1, float x2, float y2, float z2, int ith, int ipat, int icolor);
int IWGrAddLn5D(int istream, float x1, float y1, float z1, float x2, float y2, float z2, int wave, int time, int ith, int ipat, int icolor);

Synopsis (Fortran)

integer function iwgraddln(istream, x1, y1, x2, y2, ith, ipat, icolor)
integer function iwgraddln2d(istream, x1, y1, x2, y2, ith, ipat, icolor)
integer function iwgraddln3d(istream, x1, y1, z1, x2, y2, z2, ith, ipat, icolor)
integer function iwgraddln5d(istream, x1, y1, z1, x2, y2, z2, wave, time, ith, ipat, icolor)
integer istream, wave, time, ith, ipat, icolor
real x1, y1, z1, x2, y2, z2

Description

In the image window attached to istream, draws a single line segment between two specified points. x1, y1, and z1 are the coordinates for the first endpoint, and x2, y2, and z2 are the coordinates for the second endpoint. IWGrAddLn assumes that the endpoints' coordinates are in window coordinates; IWGrAddLn2D, IWGrAddLn3D, and IWGrAddLn5D assume the endpoints' coordinates are in data coordinates. A line segment added by IWGrAddLn or IWGrAddLn2D is not associated with a particular section and will appear in all sections. A line segment added by IWGrAddLn3D is not associated with any wave or time point and appears across all waves and time points. You can use -1 for z1 and z2, wave, or time if you do not want a particular coordinate assigned to the point for the z, wave, or time dimension, respectively. When a coordinate is not assigned for a dimension, the point appears across all sections in that dimension.

ith sets the thickness of the line segment in screen pixels. ipat is currently ignored; for compatibility with future versions where ipat will set the style of line used, always set ipat to one. icolor sets the color index for the color of the added line segment. Valid values for icolor range from zero to IW_NUM_COLORS-1 (11); out-of-range values for icolor are coerced to zero.

Limitations

Image windows assume that z1 and z2 are the same, so calls to IWGrAddLn3D or IWGrAddLn5D which use different values for z1 and z2 will not be handled as expected.

Return Value

Returns a non-negative value which is the ID of the added graphic if successful; use that ID with the functions that manipulate individual graphics or list of graphics. Returns IW_ERROR (-1) if istream is not attached to an image window or storage for the coordinates could not be allocated.


IWGrAddLns, IWGrAddLns2D, IWGrAddLns3D, IWGrAddLns5D

Synopsis (C)

int IWGrAddLns(int istream, IW_POINT_2D_PTR plist, int np, int ith, int ipat,int icolor);
int IWGrAddLns2D(int istream, IW_POINT_2D_PTR plist, int np,int ith, int ipat, int icolor);
int IWGrAddLns3D(int istream, IW_POINT_PTR plist, int np, int ith, int ipat, int icolor);
int IWGrAddLns5D(int istream, IW_POINT_PTR plist, int np, int iwave, int itime, int ith, int ipat, int icolor);

Synopsis (Fortran)

integer function iwgraddlns(istream, plist2d, np, ith, ipat, icolor)
integer function iwgraddlns2d(istream, plist2d, np, ith, ipat, icolor)
integer function iwgraddlns3d(istream, plist3d, np, ith, ipat, icolor)
integer function iwgraddlns5d(istream, plist3d, np, wave, time, ith, ipat, icolor)
integer istream, np, ith, ipat, icolor, wave, time
real plist2d(2 * np), plist3d(3 * np)

Description

In the image window attached to istream, draws np-1 connected line segments from np points: the first line segment joins the first two points, the second line segment joins the second and third points, and so on. For IWGrAddLns and IWGrAddLns2D only the x and y coordinates are specified: the points are not associated with any section and will appear in all sections. For C, the 2D coordinates are described by a IW_POINT_2D structure which has two fields: x for the x coordinate and y for the y coordinate. The list of points, plist, for IWGrAddLns and IWGrAddLns2D is then an array of IW_POINT_2D structures. For Fortran, the coordinates are passed in plist2d, a 1D array with 2 * np elements; the x coordinate of the ith point is the 2*i-1 element of plist2d and the y coordinate of the ith point is the 2*i element of plist. For IWGrAddLns3D and IWGrAddLns5D, the x, y, and z coordinates are specified. For C, the 3D coordinates are described by a IW_POINT structure which has three fields: x for the x coordinate, y for the y coordinate, and z for the z coordinate. The list of points, plist, for IWGrAddLns3D and IWGrAddLns5D is then an array of IW_POINT structures. For Fortran, the coordinates are passed in plist3d, a 1D array with 3 * np elements; for the ith point, the x coordinate of the is the 3*i-2 element of plist3d, the y coordinate is the 3*i-1 element of plist3d, and the z coordinate is the 3*i element of plist3d.

IWGrAddLns assumes that the point coordinates are in window coordinates; IWGrAddLns2D, IWGrAddLns3D, and IWGrAddLns5D assume that the point coordinates are in data coordinates. The line segments added by IWGrAddLns3D will appear across all waves and time points. The segments added by IWGrAddLns5D are associated with a particular wave, whose index is wave, and time point, whose index is time. You can use -1 for the z coordinate, wave, or time if you do not want a particular coordinate assigned for the z, wave, or time dimension, respectively. When a coordinate is not assigned for a dimension, the line segments appear across all sections in that dimension.

ith sets the thickness of the line segment in screen pixels. ipat is currently ignored; for compatibility with future versions where ipat will set the style of line used, always set ipat to one. icolor sets the color index for the color of the added line segment. Valid values for icolor range from zero to IW_NUM_COLORS-1 (11); out-of-range values for icolor are coerced to zero.

Limitations

Image windows assume that all the points have the same z coordinate so calls to IWGrAddLns3D or IWGrAddLns5D which have points with different z values will not be handled as expected.

Return Value

Returns a non-negative value which is the ID of the added graphic if successful; use that ID with the functions that manipulate individual graphics or list of graphics. Returns IW_ERROR (-1) if istream is not attached to an image window or the attempt to allocated space for the coordinates failed.


IWGrAddMultLns, IWGrAddMultLns2D, IWGrAddMultLns3D, IWGrAddMultLns5D

Synopsis (C)

int IWGrAddMultLns(int istream, IW_POINT_2D_PTR plist, int np, int ith,int ipat, int icolor);
int IWGrAddMultLns2D(int istream,IW_POINT_2D_PTR plist,int np,int ith,int ipat,int icolor);
int IWGrAddMultLns3D(int istream, IW_POINT_PTR plist, int np, int ith, int ipat, int icolor);
int IWGrAddMultLns5D(int istream,IW_POINT_PTR plist, int np, int iwave, int itime, int ith, int ipat, int icolor);

Synopsis (Fortran)

integer function iwgraddmultlns(istream, plist2d, np, ith, ipat, icolor)
integer function iwgraddmultlns2d(istream, plist2d, np, ith, ipat, icolor)
integer function iwgraddmultlns3d(istream, plist3d, np, ith, ipat, icolor)
integer function iwgraddmultlns5d(istream, plist3d, np, wave, time, ith, ipat, icolor)
integer istream, np, ith, ipat, icolor, wave, time
real plist2d(2 * np), plist3d(3 * np)

Description

In the image window attached to istream, draws np/2 line segments from np points: the first line segment joins the first two points, the second line segment joins the third and fourth points, and so on. Unlike the IWGrAddLns family of functions, the segments are not guaranteed to be connected. For IWGrAddMultLns and IWGrAddMultLns2D only the x and y coordinates are specified: the points are not associated with any section and will appear in all sections. For C, the 2D coordinates are described by a IW_POINT_2D structure which has two fields: x for the x coordinate and y for the y coordinate. The list of points, plist, for IWGrAddMultLns and IWGrAddMultLns2D is then an array of IW_POINT_2D structures. For Fortran, the coordinates are passed in plist2d, a 1D array with 2 * np elements; the x coordinate of the ith point is the 2*i-1 element of plist2d and the y coordinate of the ith point is the 2*i element of plist2d. For IWGrAddMultLns3D and IWGrAddMultLns5D, the x, y, and z coordinates are specified. For C, the 3D coordinates are described by a IW_POINT structure which has three fields: x for the x coordinate, y for the y coordinate, and z for the z coordinate. The list of points, plist, for IWGrAddMultLns3D and IWGrAddMultLns5D is then an array of IW_POINT structures. For Fortran, the coordinates are passed in plist3d, a 1D array with 3 * np elements; for the ith point, the x coordinate of the is the 3*i-2 element of plist3d, the y coordinate is the 3*i-1 element of plist3d, and the z coordinate is the 3*i element of plist3d.

IWGrAddMultLns assumes that the point coordinates are in window coordinates; IWGrAddMultLns2D, IWGrAddMultLns3D, and IWGrAddMultLns5D assume that the point coordinates are in data coordinates. The line segments added by IWGrAddMultLns3D will appear across all waves and time points. The segments added by IWGrAddMultLns5D are associated with a particular wave, whose index is wave, and time point, whose index is time. You can use -1 for the z coordinate, wave, or time if you do not want a particular coordinate assigned for the z, wave, or time dimension, respectively. When a coordinate is not assigned for a dimension, the line segments appear across all sections in that dimension.

ith sets the thickness of the line segment in screen pixels. ipat is currently ignored; for compatibility with future versions where ipat will set the style of line used, always set ipat to one. icolor sets the color index for the color of the added line segment. Valid valu