Description Validation, is it possible to cast to the specified type
-
Return Type
-
A Boolean value.
-
Syntax
-
object.IsCastLegal (ePixelDataType, eInterpretation, eBitsPerChannel, eNumberOfChannels)
The IsCastLegal Method syntax has these parts: |
| object | An expression evaluating to an object of type McImageType. | | ePixelDataType | Required. A mcPixelDataType enumeration, as described in settings. [in]
| | eInterpretation | Required. A mcInterpretation enumeration, as described in settings. [in]
| | eBitsPerChannel | Required. A mcBitsPerChannel enumeration, as described in settings. [in]
| | eNumberOfChannels | Required. A Long value. [in]
| Settings The settings for ePixelDataType are:
 | mcpdtAnyType | 0 |
current band type
|
 | mcpdtInteger | 1 |
pixels hold integral values
|
 | mcpdtFloat | 2 |
numbers are floating point
|
The settings for eInterpretation are:
 | mciAnyInterp | 0 |
current interpretation
|
 | mciMonochrome | 1 |
only one channel
|
 | mciIndexedColor | 2 |
8 bits per pixel, pseudo-colored
|
 | mciGenericMultiBand | 3 |
multichannel, when needed, pixel luminance is averaged across the channels
|
 | mciRGB | 4 |
normal color model, 3 channels arranged as RGBRGBRGB...
|
 | mciBGR | 5 |
Similar to RGB, except the channels are reversed for DIBs as BGRBGRBGR...
|
 | mciHSL | 6 |
Three channels, Hue, Saturation, and Luminance
|
 | mciHSI | 7 |
Three channels, Hue, Saturation, and Intensity
|
 | mciComplex | 8 |
Two channels, real and imaginary arranged as RIRIRI..., only supported with McFloat
|
 | mciPolar | 9 |
Two channels, magnitude and phase arranged as MPMPMP..., only supported with McFloat
|
The settings for eBitsPerChannel are:
 | mcbpcAnyBits | 0 |
don't care
|
 | mcbpc8Bits | 8 |
integer only, values range from 0 to 255
|
 | mcbpc12Bits | 12 |
integer only, needs 16 bits, values range from 0 to 4095
|
 | mcbpc16Bits | 16 |
integer only, values range from 0 to 65535
|
 | mcbpc32Bits | 32 |
can be either integer or float. If integer, values range from 0 to 4Gig.
|
 | mcbpc64Bits | 64 |
float only
|
|