get_image_pointer1_rectget_image_pointer1_rectGetImagePointer1RectGetImagePointer1Rectget_image_pointer1_rect (算子名称)
名称
get_image_pointer1_rectget_image_pointer1_rectGetImagePointer1RectGetImagePointer1Rectget_image_pointer1_rect — Access to the image data pointer and the image data inside
the smallest rectangle of the domain of the input image.
参数签名
Herror get_image_pointer1_rect(const Hobject Image, Hlong* PixelPointer, Hlong* Width, Hlong* Height, Hlong* VerticalPitch, Hlong* HorizontalBitPitch, Hlong* BitsPerPixel)
Herror T_get_image_pointer1_rect(const Hobject Image, Htuple* PixelPointer, Htuple* Width, Htuple* Height, Htuple* VerticalPitch, Htuple* HorizontalBitPitch, Htuple* BitsPerPixel)
void GetImagePointer1Rect(const HObject& Image, HTuple* PixelPointer, HTuple* Width, HTuple* Height, HTuple* VerticalPitch, HTuple* HorizontalBitPitch, HTuple* BitsPerPixel)
void* HImage::GetImagePointer1Rect(Hlong* Width, Hlong* Height, Hlong* VerticalPitch, Hlong* HorizontalBitPitch, Hlong* BitsPerPixel) const
static void HOperatorSet.GetImagePointer1Rect(HObject image, out HTuple pixelPointer, out HTuple width, out HTuple height, out HTuple verticalPitch, out HTuple horizontalBitPitch, out HTuple bitsPerPixel)
IntPtr HImage.GetImagePointer1Rect(out int width, out int height, out int verticalPitch, out int horizontalBitPitch, out int bitsPerPixel)
def get_image_pointer1_rect(image: HObject) -> Tuple[int, int, int, int, int, int]
描述
该算子 get_image_pointer1_rectget_image_pointer1_rectGetImagePointer1RectGetImagePointer1RectGetImagePointer1Rectget_image_pointer1_rect returns the pointer
PixelPointerPixelPointerPixelPointerPixelPointerpixelPointerpixel_pointer which points to the beginning of the image
data inside the smallest rectangle of the domain of ImageImageImageImageimageimage.
VerticalPitchVerticalPitchVerticalPitchVerticalPitchverticalPitchvertical_pitch corresponds to the width of the input image
ImageImageImageImageimageimage multiplied with the number of bytes per pixel
(HorizontalBitPitchHorizontalBitPitchHorizontalBitPitchHorizontalBitPitchhorizontalBitPitchhorizontal_bit_pitch / 8). WidthWidthWidthWidthwidthwidth and
HeightHeightHeightHeightheightheight correspond to the size of the smallest rectangle of
the input region. HorizontalBitPitchHorizontalBitPitchHorizontalBitPitchHorizontalBitPitchhorizontalBitPitchhorizontal_bit_pitch is the horizontal
distance (in bits) between two neighboring pixels.
BitsPerPixelBitsPerPixelBitsPerPixelBitsPerPixelbitsPerPixelbits_per_pixel is the number of used bits per pixel.
get_image_pointer1_rectget_image_pointer1_rectGetImagePointer1RectGetImagePointer1RectGetImagePointer1Rectget_image_pointer1_rect is symmetrical to
gen_image1_rectgen_image1_rectGenImage1RectGenImage1RectGenImage1Rectgen_image1_rect.
注意
该算子 get_image_pointer1_rectget_image_pointer1_rectGetImagePointer1RectGetImagePointer1RectGetImagePointer1Rectget_image_pointer1_rect should only be used for entry
into newly created images, since otherwise the gray values of other images
might be overwritten (see relational structure).
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
参数表
ImageImageImageImageimageimage (input_object) singlechannelimage → objectHImageHObjectHImageHobject (byte / uint2 / int4)
Input image (Himage).
PixelPointerPixelPointerPixelPointerPixelPointerpixelPointerpixel_pointer (output_control) pointer → HTupleintHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)
Pointer to the image data.
WidthWidthWidthWidthwidthwidth (output_control) extent.x → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Width of the output image.
HeightHeightHeightHeightheightheight (output_control) extent.y → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Height of the output image.
VerticalPitchVerticalPitchVerticalPitchVerticalPitchverticalPitchvertical_pitch (output_control) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Width(input image)*(HorizontalBitPitch/8).
HorizontalBitPitchHorizontalBitPitchHorizontalBitPitchHorizontalBitPitchhorizontalBitPitchhorizontal_bit_pitch (output_control) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Distance between two neighboring pixels in bits .
BitsPerPixelBitsPerPixelBitsPerPixelBitsPerPixelbitsPerPixelbits_per_pixel (output_control) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of used bits per pixel.
例程 (C)
Hobject image,reg,imagereduced;
char typ[128];
Hlong width,height,vert_pitch,hori_bit_pitch,bits_per_pix, winID;
unsigned char *ptr;
open_window(0,0,512,512,"black",winID);
read_image(&image,"monkey");
draw_region(®,winID);
reduce_domain(image,reg,&imagereduced);
get_image_pointer1_rect(imagereduced,(Hlong*)&ptr,&width,&height,
&vert_pitch,&hori_bit_pitch,&bits_per_pix);
结果
该算子 get_image_pointer1_rectget_image_pointer1_rectGetImagePointer1RectGetImagePointer1RectGetImagePointer1Rectget_image_pointer1_rect 返回值 2 (
H_MSG_TRUE)
if
exactly one image was passed.
The behavior in case of empty input (no input images available) is set via
该算子 set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>).
If necessary an exception is raised.
可能的前置算子
read_imageread_imageReadImageReadImageReadImageread_image,
gen_image1_rectgen_image1_rectGenImage1RectGenImage1RectGenImage1Rectgen_image1_rect
可替代算子
set_grayvalset_grayvalSetGrayvalSetGrayvalSetGrayvalset_grayval,
get_grayvalget_grayvalGetGrayvalGetGrayvalGetGrayvalget_grayval,
get_image_pointer3get_image_pointer3GetImagePointer3GetImagePointer3GetImagePointer3get_image_pointer3,
get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1GetImagePointer1get_image_pointer1
参考其它
paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region,
paint_graypaint_grayPaintGrayPaintGrayPaintGraypaint_gray,
gen_image1_rectgen_image1_rectGenImage1RectGenImage1RectGenImage1Rectgen_image1_rect
模块
Foundation