Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_create_child(3) — Solaris 2.4 x86 SDK

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_create(3)

xil_create_copy(3)

xil_create_from_device(3)

xil_create_from_type(3)

xil_create_from_window(3)

xil_destroy(3)

xil_set_roi(3)

xil_get_roi(3)

xil_get_parent(3)

xil_create_child(3)

NAME

xil_create_child − create a child image

SYNOPSIS

#include <xil/xil.h>

XilImage xil_create_child ( XilImage src,

unsigned int xstart,
unsigned int ystart,
unsigned int width,
unsigned int height,
unsigned int startband,
unsigned int numbands);

DESCRIPTION

This routine creates a new (child) reference to the existing data.  Modifications to the child image affect the parent data.  xstart is the horizontal offset in pixels from the upper-left corner of the source image to the upper-left corner of the subimage.  ystart is the vertical offset in pixels from the upper-left corner of the source image to the upper-left corner of the subimage.  width is the width of the subimage in pixels.  height is the height of the subimage in pixels.  startband is the offset in bands, starting from the first band, to the first band in the subimage.  numbands is the number of bands in the subimage. 

The color space of the child image is set to that of the parent image if the number of bands in the child is the same as that of the parent.  Otherwise, the color space is set to NULL.  The origin of the child image is initialized to (0.0, 0.0). 

Note that this function does not create a copy of the data, only a reference to it. 

ROI Behavior

The default ROI is NULL.  If an ROI is NULL, operations are performed on the entire (child) image. The parent image’s ROI and origin are ignored by the child. 

ERRORS

For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide. 

EXAMPLES

Create a 512 x 512 5-band, 16-bit image. Then create a 100 x 100 child image that begins at offset (200, 250) comprising the middle 3 bands:

XilImage image, child_image;
image = xil_create(512, 512, 5, XIL_SHORT);
child_image = xil_create_child (image, 200, 250, 100, 100, 1, 3);

NOTES

If overlapping but not coincident sibling images (children of the same parent) are specified as the source and destination for an operation, the operation is performed.  However, the library generates a warning message, and the results of such an operation are undefined. For an exception to this behavior, see xil_copy(3). 

SEE ALSO

xil_create(3), xil_create_copy(3), xil_create_from_device(3), xil_create_from_type(3), xil_create_from_window(3), xil_destroy(3), xil_set_roi(3), xil_get_roi(3), xil_get_parent(3). 

SunOS   —  Last change: 08 February 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026