Access the pointer of a channel.
The operator get_image_pointer__ returns a C pointer to the first channel of the image Image. Additionally the image type (Type = 'byte', 'integer', 'float' etc.) and the image size (width and height) are returned. Consequently a direct access to the image data in the HORUS data bank from the HORUS host language via the pointer is possible. An image is stored in HORUS as a vector of image lines. The operator get_image_pointer__ is only of interest for HORUS/C.
The operator get_image_pointer__ should only be used for entry into newly created images, since otherwise the gray values of other images might be overwritten (see relational structure).
Image (input_object) |
image -> object |
Input image. |
Pointer (output_control) |
pointer -> integer |
Pointer to the image data in the HORUS data bank. |
Type (output_control) |
string -> string |
Type of image. | |
List of values: 'int1', 'int2', 'int4', 'byte', 'real', 'direction', 'cyclic', 'complex', 'dvf', 'lut' |
Width (output_control) |
extent.x -> integer |
Width of image. |
Height (output_control) |
extent.y -> integer |
Height of image. |
ObjType Bild; char typ[128]; long width,height; unsigned char *ptr; read_image(&Bild,"fabrik"); get_image_pointer__(Bild,(long*)&ptr,typ,&width,&height);
The operator get_image_pointer__ returns the value TRUE if exactly one image was passed. The behavior in case of empty input (no input images available) is set via the operator set_system(::'no_object_result',<Result>:). If necessary an exception is raised.
set_greyval__, get_greyval__, get_image_pointer3