The PROFILE function extracts a profile from an image and returns the values of the image along the profile line marked by the user.

This routine is written in the IDL language. Its source code can be found in the file profile.pro in the lib subdirectory of the IDL distribution.

Using PROFILE

To mark a profile line after calling PROFILE, click in the image with the left mouse button to mark the beginning and ending points. The pixel coordinates of the selected points are displayed in the IDL command log.

Examples


This example displays an image, selects a profile, and plots that profile in a new window:

; Create an image:
A = BYTSCL(DIST(256))
; Display the image:
TV, A
; Extract a profile from the image:
R = PROFILE(A)

Mark two points on the image with the mouse.

; Create a new plotting window:
WINDOW, /FREE
; Plot the profile:
PLOT, R

Note: The PROFILES procedure is an interactive version of this routine.

Syntax


Result = PROFILE( Image [, XX, YY] [, /NOMARK] [, XSTART=value] [, YSTART=value] )

Return Value


Returns a floating-point vector containing the values along the profile line.

Arguments


Image

The data array representing the image. This array can be of any type except complex.

XX

A named variable that will contain the X coordinates of the points along the selected profile.

YY

A named variable that will contain the Y coordinates of the points along the selected profile.

Keywords


NOMARK

Set this keyword to inhibit marking the image with the profile line.

XSTART

The starting X location of the lower-left corner of Image. If this keyword is not specified, 0 is assumed.

YSTART

The starting Y location of the lower-left corner of Image. If this keyword is not specified, 0 is assumed.

Version History


Original

Introduced

See Also


PROFILES Procedure