High-quality remote sensing imagery is often multi-spectral, which means that it consists of multiple bands. Each image band captures data at another wavelength of the electromagnetic spectrum. If you want to highlight specific features in the image, for instance, you must select the relevant bands. Then, you map each band to an RGB color channel to display the band combination. To limit the visualization to just one band, you can select that band only, and show it as a grayscale image.

Using the image processing API, you can apply such band selection operations to your raster through code. This article discusses an alternative approach, though, which is to rely on OGC SLD/SE styling and define a band selection style:

Program: Defining a raster band selection style
<?xml version='1.0' encoding='UTF-8'?>
<FeatureTypeStyle xmlns="http://www.opengis.net/se"
                  version="1.1.0">
  <Name>Band selection</Name>
  <Description>
    <Title>Raster band selection</Title>
    <Abstract>Renders the selected bands (4, 3, 2) of the rasters; this shows vegetation in bright red.</Abstract>
  </Description>
  <Rule>
    <Name>rasters</Name>
    <Description>
      <Title>rasters rule</Title>
      <Abstract>rule to render rasters</Abstract>
    </Description>
    <RasterSymbolizer>
      <Opacity>1.0</Opacity>
      <ChannelSelection>
        <RedChannel>
          <SourceChannelName>Band.band4</SourceChannelName>
        </RedChannel>
        <GreenChannel>
          <SourceChannelName>Band.band3</SourceChannelName>
        </GreenChannel>
        <BlueChannel>
          <SourceChannelName>Band.band2</SourceChannelName>
        </BlueChannel>
      </ChannelSelection>
    </RasterSymbolizer>
  </Rule>
</FeatureTypeStyle>

You must save the style in an .sld file with the same file name as the raster data file, and store it next to that raster file in the same folder. As a result, the Lucy and Lucy Map Centric applications automatically pick up the band selection style when you load the raster data.

See Styling data with OGC SLD for more information on how to use and apply OGC SLD/SE styling.