If you want to visualize raster data with measurement values, such as elevation data, you must map it to a color image. You need a color map that assigns the measurement values to colors.

To create and apply such color maps to your raster through code, you can use the raster styles for Lightspeed views, or the image processing API. This article discusses an alternative approach, though, which is to rely on OGC SLD/SE styling, and define a color map style:

Program: Defining a raster color map style
<?xml version='1.0' encoding='UTF-8'?>
<FeatureTypeStyle xmlns="http://www.opengis.net/se"
                  version="1.1.0">
  <Name>Colormap</Name>
  <Description>
    <Title>Raster colormap</Title>
    <Abstract>Renders elevation rasters with a glacial colormap.</Abstract>
  </Description>
  <Rule>
    <Name>rasters</Name>
    <Description>
      <Title>rasters rule</Title>
      <Abstract>rule to render rasters</Abstract>
    </Description>
    <RasterSymbolizer>
      <Opacity>1.0</Opacity>
      <ColorMap>
        <Interpolate fallbackValue="#FFFFFF">
          <LookupValue>Rasterdata</LookupValue>
          <InterpolationPoint>
            <Data>0.0</Data>
            <Value>#FF80A0A0</Value>
          </InterpolationPoint>
          <InterpolationPoint>
            <Data>1.0</Data>
            <Value>#FFA0DDDD</Value>
          </InterpolationPoint>
          <InterpolationPoint>
            <Data>200.0</Data>
            <Value>#FF80B0B0</Value>
          </InterpolationPoint>
          <InterpolationPoint>
            <Data>600.0</Data>
            <Value>#FF408080</Value>
          </InterpolationPoint>
          <InterpolationPoint>
            <Data>1200.0</Data>
            <Value>#FF206060</Value>
          </InterpolationPoint>
          <InterpolationPoint>
            <Data>2000.0</Data>
            <Value>#FF104040</Value>
          </InterpolationPoint>
        </Interpolate>
      </ColorMap>
      <ContrastEnhancement>
        <GammaValue>1.0</GammaValue>
      </ContrastEnhancement>
    </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 color map 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.