gen_image_protoGenImageProtoGenImageProtogen_image_protogen_image_proto
Short description
gen_image_protoGenImageProtoGenImageProtogen_image_protogen_image_proto — Create an image with a specified constant gray value.
Signature
gen_image_proto( image Image, out image ImageCleared, number Grayval )void GenImageProto( const HObject& Image, HObject* ImageCleared, const HTuple& Grayval )static void HOperatorSet.GenImageProto( HObject image, out HObject imageCleared, HTuple grayval )def gen_image_proto( image: HObject, grayval: Union[int, float] ) -> HObject
Herror gen_image_proto( const Hobject Image, Hobject* ImageCleared, double Grayval )
Herror T_gen_image_proto( const Hobject Image, Hobject* ImageCleared, const Htuple Grayval )
HImage HImage::GenImageProto( const HTuple& Grayval ) const
HImage HImage::GenImageProto( double Grayval ) const
HImage HImage.GenImageProto( HTuple grayval )
HImage HImage.GenImageProto( double grayval )
Description
gen_image_protoGenImageProto creates an output image
ImageClearedimageClearedimage_cleared with the constant gray value Grayvalgrayvalgrayval.
If the input image is of type direction, gray values in result
image that are not in the value range that is valid for direction
images are set to the value 255 to mark them as invalid.
ImageClearedimageClearedimage_cleared has the same dimensions and pixel type as the
input image Imageimageimage.
Execution information
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Processed without parallelization.
Parameters
Imageimageimage (input_object) singlechannelimage → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)
Input image.
ImageClearedimageClearedimage_cleared (output_object) image → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)Hobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)
Image with constant gray value.
Grayvalgrayvalgrayval (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)
Gray value to be used for the output image.
Default: 00
Suggested values: 0, 1, 2, 5, 10, 16, 32, 64, 128, 253, 254, 2550, 1, 2, 5, 10, 16, 32, 64, 128, 253, 254, 255
Result
gen_image_protoGenImageProto returns 2 (H_MSG_TRUE) if all parameters are correct.
If necessary, an exception is raised.
Combinations with other operators
Combinations
Alternatives
set_grayvalSetGrayval, paint_grayPaintGray, gen_image_constGenImageConst, copy_imageCopyImage
See also
get_image_pointer1GetImagePointer1
Module
Foundation