XieTranslate(3X) — Subroutines
Digital
NAME
XieTranslate − This routine creates a copy of an existing source image and replaces part of the copied image with a part of a second source image.
C Format
dst_photo_id = XieTranslate(src_id, src_idc_id, dst_id, dst_idc_id)
C Argument Information
XiePhoto dst_photo_id;
XiePhoto src_id;
XieResource src_idc_id;
XiePhoto dst_id;
XieResource dst_idc_id;
RETURN VALUES
If the source image specified in the src_id argument is an unbound photomap, the routine returns the identifier of the destination image in the dst_photo_id argument. Otherwise, the routine returns the identifier of the photoflo to which the processing element is appended. You can free the returned identifier using the XieFreeResource routine.
PARAMETERS
src_idThe src_id argument specifies the source image from which the routine extracts a region to translate to the destination image. If this image is an unbound photomap, the operation is performed immediately. Otherwise, a processing element is appended to the photoflo with execution pending a call to the XieExecuteFlo routine. The photoflo is specified explicitly if the image is a photoflo, or implicitly if the image is a phototap or a photomap bound to the photoflo.
src_idc_idThe src_idc_id argument specifies the identifier of the IDC of type CPP or ROI that defines the region the routine extracts from the source image specified in src_id and translates to the destination image. If you specify a value of 0, the routine extracts and translates the entire image from src_id.
dst_idThe dst_id argument specifies the identifier of the source image the routine copies, in its entirety, to the destination image. If the identifier specified in src_id is a photoflo, dst_id must be bound to the photoflo using the XieBindMapToFlo routine.
dst_idc_idThe dst_idc_id argument specifies the identifier of the IDC of type CPP or ROI that defines the region in the destination image the routine replaces with the region extracted from src_id. If you specify a value of 0, the routine uses the entire image of dst_id as the target of the translation.
DESCRIPTION
This routine creates a copy of an existing source image and replaces part of the copied image with a part of a second source image. Both source images must have the same number of components and both must be either constrained or unconstrained.
If the the 2 IDCs do not define a region of the same size, the region the routine actually translates is sized to the minimum of the 2 widths and heights.
If the operation is performed immediately and you selected computation events using the XieSelectEvents routine, the routine adds anXieK_ComputationEvent to the X11 event queue when the routine is completed.
XIE Events and Error Messages
Protocol Messages: X_ieTranslate
XIE event returned: XieK_ComputationEvent if immediate execution and computation events are selected
XieLib errors: None
XieServer errors: BadIDChoice -- Invalid identifier
BadAlloc -- Insufficient server resources
BadAccess -- 1 source image is a photoflo and the other is not bound to it
BadMatch -- The source images do not have the same number of components or the 2 images do not have the same constraint model
BadValue -- IDC does not intersect the source image