The following flags indicate the channel that will be used:
Value |
Meaning |
All channels. |
|
Red channel only. |
|
Green channel only. |
|
Blue channel only. |
The following flags indicate how to treat the color value:
Value |
Meaning |
No change. |
|
Invert the color, resulting in its complement. |
|
Change all bits to 0. |
|
Change all bits to 1. |
The following flags indicate the mathematical operation to use. The operations are performed between each component (R, G and B) and Factor:
Value |
Meaning |
Combine each pixel component value and nFactor using a bitwise AND (&). |
|
(pixel = pixel & Factor) |
|
Combine each pixel component value and nFactor using a bitwise OR ( ¦ ). |
|
(pixel = pixel | Factor) |
|
Combine each pixel component value and nFactor using a bitwise XOR (^). |
|
(pixel = pixel ^ Factor) |
|
Add pixel component value to the nFactor clamping the result to the maximum allowed pixel value. |
|
(pixel = min(pixel + Factor, MaximumPixelValue) ) |
|
Subtract each pixel component value from the nFactor, clamping the result to the allowed pixel range. |
|
(pixel = min(max(Factor - pixel, MinimumPixelValue), MaximumPixelValue) ) |
|
Subtract nFactor from each pixel component value, clamping the result to the allowed pixel range |
|
(pixel = min(max(pixel - Factor), MinimumPixelValue, MaximumPixelValue) ) |
|
Calculate the absolute difference between Factor and each pixel component value. |
|
(pixel = abs(pixel - Factor)) |
|
Multiply each pixel component value by Factor/100. |
|
(pixel = pixel * Factor / 100) |
|
Divide each pixel component value by Factor/100. An error will be returned if Factor = 0. |
|
(pixel = pixel * 100 / Factor) |
|
Divide nFactor by each pixel values. If the pixel values are 0, the result set to maximum allowed pixel value. (pixel = pixel ? min(Factor / pixel, MaximumPixelValue) : MaximumPixelValue) |
|
Use the average of the each pixel component value and Factor. (pixel = (pixel+Factor) / 2). |
|
Use the lesser of the pixel component values and Factor: |
|
(pixel = min(pixel, Factor) ) |
|
Use the greater of the pixel component values and Factor: |
|
(pixel = max(pixel, Factor) ) |
The way MinimumPixelValue and MaximumPixelValue are calculated depends on the bits per pixel and whether the image is signed or unsigned:
if the image is unsigned (most common):
MaximumPixelValue will be : 255 (8-bit), 4095 (12-bit) or 65535 (16-bit)
MinimumPixelValue = 0
if the image is signed (rare case):
MaximumPixelValue will be : 127 (8-bit), 2047 (12-bit) or 32767 (16-bit)
MinimumPixelValue will be -128 (8-bit), -2048 (12-bit) or -32768 (16-bit)
The following flags indicate how to treat the output value:
Value |
Meaning |
No change. |
|
Invert the color, resulting in its complement. |
|
Change all bits to 0. |
|
Change all bits to 1. |
If the Flags property is OperationAnd, OperationOr, OperationXor, OperationAdd, OperationMinumum, OperationMultiply, OperationMaximum, OperationDivisionByValue , or OperationSubtractValue, the valid range of Factor is:
From MinimumPixelValue to MaximumPixelValue.
For Flags equal to OperationSubtractFator, OperationDifference, OperationAverage, the valid range of Factor is: From 2 * MinimumPixelValue to 2 * MaximumPixelValue.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET