Function holoscan::viz::ImageComponentMapping
- Defined in File holoviz.hpp 
- 
void holoscan::viz::ImageComponentMapping(ComponentSwizzle r, ComponentSwizzle g, ComponentSwizzle b, ComponentSwizzle a)
- Specifies how the color components of an image are mapped to the color components of the output. Output components can be set to the R, G, B or A component of the input or fixed to zero or one or just identical to the input. - Default: all output components are identical to the input components (ComponentSwizzle::IDENTITY). - This can be used display an image in color formats which are not natively supported by Holoviz. For example to display a BGRA image: - ImageComponentMapping(ComponentSwizzle::B, ComponentSwizzle::G, ComponentSwizzle::R, ComponentSwizzle::A); ImageHost(width, height, ImageFormat::R8G8B8A8_UNORM, bgra_data); - or to display a single component image in gray scale: - ImageComponentMapping(ComponentSwizzle::R, ComponentSwizzle::R, ComponentSwizzle::R, ComponentSwizzle::ONE); ImageHost(width, height, ImageFormat::R8_UNORM, single_component_data); - Parameters
- r, g, b, a – sets how the component values are placed in each component of the output