CImage:Powab
The Powab method raises the pixels of the current image to powers specified by the pixels of the operand image. This is useful for masking or sensitivity correction operations in which the operand image is a correction mask.
bResult = CImage:Pow( CImage )
This method has a possibility of an illegal operation if a negative number is raised to a non-integral power. Mira traps this condition and substitutes a replacement value into the output pixel. The replacement value is set for math operations using the SetMathErrVal method.
Suppose an image is displayed in a CImageView named V. The following script fragment loads a "mask" image from the file sPath, then applies it to a displayed image and redisplays the result:
|
-- attach the current displayed image |
|
-- create a CImage for the mask image |
|
-- load the "mask" image |
|
-- perform the operation |
|
-- update the display after the shift |
|
-- free the memory of the mask image |