Sets an array of pixels to a value.
Case 1: Setting one-channel data to a value
IppStatus ippiSet_<mod>(Ipp<datatype> value, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:
8u_C1R | 16u_C1R | 16s_C1R | 32s_C1R | 32f_C1R |
Case 2: Setting each color channel to a specified value
IppStatus ippiSet_<mod>(const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:
8u_C3R | 16u_C3R | 16s_C3R | 32s_C3R | 32f_C3R |
8u_AC4R | 16u_AC4R | 16s_AC4R | 32s_AC4R | 32f_AC4R |
Case 3: Setting color channels and alpha channel to specified values
IppStatus ippiSet_<mod>(const Ipp<datatype>value[4], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:
8u_C4R | 16u_C4R | 16s_C4R | 32s_C4R | 32f_C4R |
Case 4: Setting masked one-channel data to a value
IppStatus ippiSet_<mod>(Ipp<datatype> value, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, const Ipp8u* pMask, int maskStep);
Supported values for mod:
8u_C1MR | 16u_C1MR | 16s_C1MR | 32s_C1MR | 32f_C1MR |
Case 5: Setting color channels of masked multi-channel data to specified values
IppStatus ippiSet_<mod>(const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, const Ipp8u* pMask, int maskStep);
Supported values for mod:
8u_C3MR | 16u_C3MR | 16s_C3MR | 32s_C3MR | 32f_C3MR |
8u_AC4MR | 16u_AC4MR | 16s_AC4MR | 32s_AC4MR | 32f_AC4MR |
Case 6: Setting all channels of masked multi-channel data to specified values
IppStatus ippiSet_<mod>(const Ipp<datatype>value[4], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, const Ipp8u* pMask, int maskStep);
Supported values for mod:
8u_C4MR | 16u_C4MR | 16s_C4MR | 32s_C4MR | 32f_C4MR |
Case 7: Setting selected channel of multi-channel data to a value
IppStatus ippiSet_<mod>(Ipp<datatype> value, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:
8u_C3CR | 16u_C3CR | 16s_C3CR | 32s_C3CR | 32f_C3CR |
8u_C4CR | 16u_C4CR | 16s_C4CR | 32s_C4CR | 32f_C4CR |
value |
Constant value assigned to each pixel in the destination image ROI. |
pDst |
Pointer to the destination image ROI. |
dstStep |
Distance in bytes between starts of consecutive lines in the destination image. |
roiSize |
Size of the image ROI in pixels. |
pMask |
Pointer to the mask image buffer. |
maskStep |
Distance in bytes between starts of consecutive lines in the mask image buffer. |
The function ippiSet is declared in the ippi.h file. It operates with ROI (see Regions of Interest in Intel IPP).
This function sets pixels in the destination image ROI pDst to a constant value. Either all pixels in a rectangular ROI, or only those selected by the specified mask pMask, can be set to a value. In case of masked operation, the function sets pixel values in the destination buffer only if the spatially corresponding mask array value is non-zero. When a channel of interest is selected, that is only one channel of a multi-channel image must be set (see Case 7), the pDst pointer points to the start of ROI buffer in the required channel. If alpha channel is present in the source image data, the alpha components may be either skipped, or set to a value, depending on the chosen ippiSet function flavor.
Example “Using ippiSet” shows how to use the function ippiSet_8u_C1R.
ippStsNoErr |
Indicates no error. Any other value indicates an error or a warning. |
ippStsNullPtrErr |
Indicates an error when any of the specified pointers is NULL. |
ippStsSizeErr |
Indicates an error condition if roiSize has a field with zero or negative value. |
ippStsStepErr |
Indicates an error condition if dstStepor maskStep has a zero or negative value. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.