The Style pane manages the display of an image by specifying how data channels are assigned to drive Red R, Green G, Blue B, and Alpha (transparency) A display outputs. Style controls allow us to choose which of the values in those data channels should be used and how the range of values in the data should be converted and used for display within the 0 to 255 range utilized to drive R, G, B and A display outputs.
Style properties are properties of an image, not of the data within the table. Changing the style used for display only changes how data is displayed. It does not change the data. We can change settings in the Style pane as much as we like, and the data within the image's table will remain unchanged. If we Copy an image and Paste it to create a second image that uses exactly the same data in the same table, we can style the two images differently to create different displays from exactly the same data.
This topic covers controls in the Image tab for the Style pane. Controls in the Options tab of the Style pane manage hill shading and low-level resampling / rendering of images.
Images come in many formats with varying use of channels. What they all have in common on Windows computers is that they all end up driving red, green and blue pixel elements in the computer screen. One way or another, the data channels in the image get assigned to driving RGB outputs in the monitor.
There are two ways that numbers within the image are used to drive RGB outputs:
Use RGBA Channels - Numbers from one or more channels are explicitly assigned to powering R, G, B, and A outputs, with the numbers being scaled, interpolated or otherwise transformed on the fly into levels for each output.
Single Channel / Palette - Numbers from a single channel are used as an index into a palette of RGB colors. The single number picks out an RGB triplet of numbers to be used for that pixel's RGB elements.
Manifold allows using either way to specify how Manifold should make use of numbers within images. In the Source box we can choose (use RGBA channels) or choose a single, specific Channel. See the Style: Channels and Outputs Tutorial topic.
Unless an image specifies otherwise, the default for Manifold is (use RGBA channels), with channels assigned to driving R,G, B, outputs. The A, or Alpha, output for transparency is also included, in case we will be working with RGBA images. If the image has no fourth channel then a fixed Value of 0 is used for A, meaning no transparency.
Source |
Choose how channels drive outputs:
Controls will be configured for the choice made in the Source box. The above illustration and this table show controls for the (use RGBA channels) choice. |
Arranger |
Launch a one click menu to assign how channels drive R,G,B, and A outputs. Typical choices are:
If images use the A or Alpha channel or if they have more data channels there will be more options in the button's pull down menu.
See the Example: Using the Assign Channels Button topic. |
RGBA Outputs |
A list of Red, R, Green, G, Blue, B and Alpha, A (transparency) display outputs with the channel that is used to drive each output.
Double-clicking on an output's channel or value cell opens a menu that allows choosing either a Channel n or Value. Choosing Value allows specifying a fixed value for that output to be used for each pixel.
Setting one or more channels to an explicit, fixed value is equivalent to "turning a channel off" in Manifold 8 and other software packages, except that we have control over what value the system is going to use to fill the channel. If we specify a value of 0, that turns the channel completely "off".
|
Ranges |
For Channel rows, two numbers for the lower bound and the upper bound of the range of values to be mapped into the output range. For Value rows, one number for the specific value to be used.
Double-click into a cell to change the value. We can change the range numbers to a range different than found in the data to alter how data in channels is utilized. For example, if the data has all values between 0 and 250 with only one pixel having a value of 9999 we could set a range of 0 to 250.
Ctrl-click a channel row to select it or to de-select it. Changing a value in a selected channel row, such as changing a range cell or choosing a channel, will change that value in all selected channel rows.
Right-click onto a range cell in a selected channel row for a menu of Autocontrast or Full Range, to use the full range of values found in that channel.
Autocontrast might use a range wider or narrower than the values found in the data in order to stretch the data further or to displace it lower or higher. When Autocontrast puts negative values into the minimum range box, it is using a number outside the range found in the data to spread out data values downward. See the Style: Autocontrast topic.
Automatic inversion: Setting the lower bound to greater value than the upper bound causes automatic inversion of how the data is interpreted, for example, causing higher numbers in the data to mean a less-bright output. |
Update Style |
Apply changes that have been made. |
Supplemental Menus |
|
Autocontrast |
Right-click on a range cell of a selected channel row. Autocontrast computes the range of values found in the data channel given the number of standard deviations chosen in the Autocontrast sub-menu, and loads the lower and upper bounds of that range into the range boxes. |
Full Range |
Right-click on a range cell of a selected channel row. Full Range fills the adjacent range boxes with the full range, from the smallest value to the largest value, of values actually found in that data channel. |
Options Tab |
|
Use shading |
Shading controls in the Options tab do not function for the (use RGBA channels) choice of Source. The Options tab will provide the warning Shading requires style to be based on a single channel. We can check the Use Shading box, but shading will take effect only when we switch the source to a single channel. |
Open the image and choose the Style pane.
Double-click into the G row's Channel 1 cell and in the menu choose Value.
The G row now uses the value 0. Double-click into the B row's Channel 0 cell and in the menu choose Value. The B row now uses the value 0. Press the Update Style button.
With G, Green, and B, Blue, outputs assigned a fixed Value of 0, only the R, Red, output is powered by the numbers in Channel 2. See also the Images and Channels topic for additional examples.
Channels almost always store data so that a larger number is intended to create a brighter pixel or greater effect. Sometimes, however, the meaning of numbers is inverted so that a brighter number means a darker pixel or lesser effect. That may happen in channels for Alpha "transparency" data, where the numbers represent opacity and not transparency: a larger number means greater opacity and thus less transparency.
Manifold therefore automatically will invert channel meaning, so that a bigger number means less effect, whenever the lower bound is greater than the upper bound in a channel's range.
We can invert channel meaning by changing all the lower bounds of 0 to 255 and all the upper bounds from 255 to 0.
The quickest way to do that is to select all channels. We can do that by clicking any of them to move the focus onto the channel list and then pressing Ctrl-A, the standard Windows shortcut to select all, or by Ctrl-clicking onto each channel's range row to select each channel.
When all are selected, changing a range value in any of them will change that range value in all of them. We can then double-click into a 0 lower bound and change it to 255, and then double-click into a 255 upper bound and change it to 0 We can then press Update Style to apply the effect.
The result is a "negative" image: higher channel values result in darker pixels, and lower channel values result in brighter pixels.
Choosing a single channel, Channel n, in the Source box drives RGB pixel element outputs by using the numbers in that channel as a lookup, or index, into a table of palette colors, each of which is a triplet of numbers, that is, an RGB color. The controls in the Style pane will switch to controls which, first, allow us to specify the number of palette intervals and how those intervals are determined, and second, how the numbers in the source channel should be used to choose a color from the palette.
Image Tab |
|
Source |
Choose how channels drive outputs:
Controls will be configured for the choice made in the Source box. The above illustration and this table show controls when a single channel, Channel n, is the source. |
Method |
The method used to classify numbers found within the Source data channel into different intervals. |
Tally |
Press to compute bounds, and therefore intervals, based upon the specified Method and number of Breaks. |
Breaks |
The number of intervals into which numbers within the channel should be tallied. |
Palette |
Press to apply a palette to the color sample boxes in the intervals list. |
Delete |
Enabled when an interval row in the intervals list has been selected. Press to delete the selected interval. |
Refresh |
Enabled when statistics for intervals have not been computed. Press to compute interval statistics. |
Intervals |
Displays the intervals used to group numbers from the Source channel into intervals to which specific colors can be assigned. |
Bounds |
Specifies the numeric bound for the beginning of each interval. Double-click to edit. |
Statistics |
The percentage of pixels within each interval. Press the Refresh button if these do not appear and statistics are desired. |
Samples |
The color to be used for values within that interval. Double-click a color sample to edit the color. When more than one interval is selected, changing the color sample in any of the intervals will assign the specified color to all selected intervals. |
* |
Asterisk character in intervals list. Double-click into the bounds region of that row to add another bound. Adding a bound adds an interval. |
Fill |
Fill rules: How colors specified for intervals should be assigned, that is, filled into, specific channel values that occur within those intervals. See the examples for Fill rules below. |
Update Style |
Apply any changes in the pane to the image. |
equal intervals |
Calculate bounds so each interval spans approximately the same part of the total range of values that occur in the field.
For example, given a Range of 0 to 100 with Breaks equal to 6 the five intervals thus created would be 0 to 20, to 40, to 60 to 80 and finally to 100. Each range would interval would be about the same size, a difference of 20 in range. |
equal count |
Calculate bounds so each interval contains about the same number of occurrences of values.
For example, if many values of the channel were evenly scattered between 0 and 25 but only one record had a value of 100, creating five intervals with equal count could create intervals from 0 to 5, to 10, to 15 , to 20 and then a final interval to 100. The final interval would be a range of 80 values but it would still contain a count of occurrences of values equal to the other four intervals which each covered a range of only five occurrences of values. |
exponential intervals |
Assign interval values so that each interval contains an exponentially increasing number of occurrences of values. |
natural breaks |
Find groupings of values and assign bounds so groups of values tend to fall into the specified number of breaks. |
standard intervals |
Assign values of bounds so that each interval represents one standard deviation. |
unique values |
Given the number of breaks up to a maximum of 100 breaks, find the most frequently occurring unique values within that number and assign an interval to each such value. For example, if we have 5 breaks the five most frequently occurring values will appear as intervals. |
Consider an image of terrain elevation using the following intervals, computed using the equal intervals method:
Intervals in the list are defined by the lowest value found in the channel at the top of the list, the highest value found in the channel at the bottom of the list with intervals in between such that each interval's lowest bound is the value given for that interval. Each interval starts with the lower bound given and then continues up through increasing values of the field in the channel until we hit the next defining value, which is the lowest bound for the next interval.
In the illustration above the lowest value found in the channel is 145. That interval, assigned a light green color, continues upward from the lowest value until we hit 275, which is the lower value bound for the next interval, assigned a light brown color. That interval continues until we hit 405, the lower bound for the interval colored brown. That interval continues until we reach 535, the lower bound for the next to last row, which is the last interval, that has been assigned a light gray brown color. The last interval starts at that lower bound of 535 and continues upward to 667 which is the largest value in the channel. Only that largest value will be colored white, the last sample By default, all values less than the very largest, even just one less at 666, if such a value existed in the channel, would be colored using the light gray brown color assigned to the last interval that starts at 535.
Colors for each interval can be whatever color we want, including invisible color as seen below. See the Style: Invisible Pixels topic.
If we assign colors to intervals that cover the full range of values in the image, all pixels in the image will be colored using one of the interval colors.
Fill Rules specify how values found in the channel between those values which specify the bounds of intervals such as the numbers 145, 275, 405, 535 and 667 seen above. Fill rules specify how a value such as 300, which falls between 275 and 405 should be colored. The default setting is to use closest lower value so it would be colored light brown. If we changed that to use closest higher value it would be colored brown. For examples of using closest lower value see the Style: Invisible Pixels and Style: Contouring using Colors topics.
closest lower value |
The default. Assign the format specified for the lower bound of the interval. The previous fill rule used will persist, so it could be by default some other fill rule is loaded. |
closest higher value |
Assign the format specified for the upper bound of the interval. |
lowest value |
Assign the format specified for the very lowest value found in the channel. |
highest value |
Assign the format specified for the very highest value found in the channel. |
interpolate |
Assign a format that is interpolated between the formats used for the lower bound and the upper bound of the interval, proportionately interpolating based on the value in the channel. |
The closest lower value and closest higher value rules are handy for creating raster-based contours:
Using default interpolate as a fill method shows no contours, since all pixel colors within intervals are smoothly interpolated from the lower color to the higher color. The intervals are not even, with the second bound being set to 250 instead of 200, to show a more interesting effect. Double-click into a bound to change it.
The images above and below have been shaded using hill shading. in the Style pane's Options tab. See the Style: Hill Shading topic.
Switching to closest lower value as a fill method results in hard edges, like contours, where intervals change.
Making all intervals transparent color except a single interval of interest will display that interval like a contour area. See the Style: Contouring using Colors topic.
In the illustration above the top image layer has been set to 50% opacity using the Layers pane, so what is underneath can be seen. We have also turned on the Bing streets layer to provide a background, for geographic context.
If we like we can have more than one image showing the same data using different styles. To do so, we Copy the image in the Project pane and then Paste it to create another image that is a copy of the image. We can then open that copy and choose Style to change the style.
When we copy and paste the image we are only making a copy of the image component that specifies how the data in the tiles in the source table should be displayed. We are not making a copy of the table in which the data (in the form of tiles) is stored. We can make dozens of copies of an image to use different display styles and that will not increase the size of the project.
Tech Tip: Style properties apply to a specific, individual image or drawing and will apply in all windows where that image or drawing appears, including map windows where the image or drawing appears as a layer. Style is about visualization, so it applies only to the image or drawing and does not extend into the tiles or geoms within the table from which an image or drawing is created. If we create two different images or drawings from the same column in a table we can style those two different components differently.
See the Images and Channels topic to learn about channels, and see the Style: Channels and Outputs Tutorial topic. Each pixel in a computer monitor is made up of three tiny dots: a red dot, a blue dot and a green dot. To display an image the brightness of each dot is varied in 256 steps from a brightness level of 0, meaning the dot is not turned on at all, to a brightness level of 255, meaning the dot is emitting its red, blue or green light as brightly as it can. In Manifold we call each set of red, green or blue dots the display output. The intensity value used to drive each R, G or B dot is the output value. Henceforth we will interchangeably refer to Red, Green and Blue as R, G and B.
Images display data stored in tiles in a table, where each tile consists of pixels that in the case of color, RGB images, have three numbers per pixel. Each of the three numbers in that triplet is a data channel, with the first number in the triplet being the value for Channel 0, the second number in the triplet being the value for Channel 1 and the third number in the triplet being the value for Channel 2. The usual convention in computing is to use "zero based" numbering for channel names, that is, programming-style numbering beginning at 0 so if we have three channels they are called Channel 0, Channel 1 and Channel 2.
Manifold constructs an image by taking the triplet of numbers for each pixel and then feeding the number for each channel to its assigned R, G or B output. By convention most computer images use the first number in the triplet, Channel 0, to drive the B output, the second number in the triplet, Channel 1 to drive the G output and the third number in the triplet, Channel 2, to drive the R output. Even though the near-universal casual name for such images is "RGB" images, the numbers which drive each pixel are actually in BGR order. Programmers will sometimes refer to such images as "BGR" images.
When (use RGBA channels) is the choice for the channel source, the Style pane controls which channels in the data are assigned to drive the R, G and B outputs. When an image is opened the channel assignments usually make sense, since Manifold will automatically assign channels to R, G and B outputs based on storage conventions for well-known image formats. RGB images stored in well-known formats such as JPG will typically have three channels with Channel 0 assigned to B, Channel 1 assigned to G, and Channel 2 assigned to R. Images in formats such as PNG might also have a fourth, Channel 3, that gives an Alpha or A value used for per-pixel transparency.
Manifold will also automatically arrange channels as required when importing images from well-known formats that are not RGB or RGBA images. For example, monochrome images may have just one channel, Channel 0, which will be used for R, G and B. Palette images will also usually have just one channel, Channel 0, which is used to look up fixed colors from intervals which make up the palette.
The R, G and B dots on most displays can have only 256 steps of brightness from 0 to 255. Three-channel images using 8 bit integers within data channels for R, G and B outputs will also have integer values in the channels that range from 0 to 255, so by default when displaying such images Manifold will take whatever value is in the channel and use that value for the brightness value of the corresponding R, G or B dot.
When images have channels with numbers that are greater than 8 bits per pixel and thus might contain values beyond the range from 0 to 255, by default the values in the data channel are interpolated into a range of 0 to 255 using a linear ramp.
One time pause to compute statistics - When working with an image for the very first time, when we open up the style controls the system will pause to computed statistics on pixel values found in the image. That often happens so fast we won't notice the pause, but very large images may require sufficient time to compute statistics that we will be able to see the computation progress dialog in action. For extremely large images we can cancel the process and the system will use whatever statistics have been computed. Statistics need to be computed only once for an image in a Manifold session and then they are saved within the images data structures. If images are very large or located on a remote server that is accessed through a slow network link the computation process could require a few minutes.
Use Style to See Channel Values - We can use the Style pane to look at the ranges of data in a channel:
Right-clicking a range cell in a selected channel and then choosing Full Range will fill the range with values found in the data channel, from lowest to highest.
Automatic Style - New images created by transforms use an automatic style computed from pyramid statistics, with the lowest available pixel values being set to black, the highest to white and the rest to a shade between black and white. The automatic style applies to all images which have a spatial index and which do not have an explicit style set, which also is helpful for images created by user queries and scripts. Automatic style for images with UINT8 channel values is special-cased to always map 0 to black and 255 to white, for compatibility reasons and because this is the desired behavior in the majority of cases.
Opacity or Transparency? - Alpha channels may be interpreted as setting either opacity, or transparency. When an alpha channel sets opacity, a high value in the channel means greater opacity, with a value of 255 meaning completely opaque and a value of 0 meaning totally transparent. When an alpha channel sets transparency, a high value means more transparency. Some formats, such as TIF images, specify alpha as opacity, so that is how Manifold imports alpha channel data for TIF, interpreting 255 as full opacity. Other packages and formats use transparency for alpha, and sometimes alpha data in TIF is stored using transparency. The default setting for internal use by Manifold is to interpret alpha as transparency, as is shown above in this topic.
If alpha data is ever imported and is flipped from how it should be, using transparency instead of opacity or vice versa, and the reverse is required, that is easy to arrange using Manifold's automatic inversion capability, as discussed in the section titled Example: Automatic Inversion in the Style: Images topic.
Why does Style not autoselect a Channel n source for Grayscale images? - Manifold presents all display channels for manipulation even when they are all driven, by default, by the same data channel. That is done to allow us in advanced uses to alter how each individual display channel interprets the displayed data.
Consider the view of Florida used in the Example: Autocontrast and Hill Shading Images using Style topic. The image uses a single channel, the terrain elevation for Florida in that region, to drive all three R, G and B outputs.
In the Style pane for the image we can manipulate each output individually.
For example, as seen above we can double-click onto the higher range value for the G output row. That row uses Channel 0 the same as the R and the B outputs, using the values from 0 to 255 as a range.
We change the 255 value in the range box to 100, and then press Update Style.
The range we have chosen of 0 to 100 will be interpolated, using a linear ramp, into the output range of 0 to 255. The net effect will be to make the Green intensities brighter since a smaller range of values will be stretched into bigger values such that a data channel value of 100 will now drive the Green output at the full intensity of 255, more than twice as bright. A mid-range value in Channel 0 which will still drive the R and B outputs to mid-range intensity, will now drive the G output to full brightness.
We can see the effect when we press Update Style. The display now appears in a brighter, green color. Each pixel is no longer gray but now uses shades of green as the proportionately greater value in the Green output compared to the Red and Blue values shifts the displayed color for each pixel from a shade of gray to a shade of green.
If Manifold forced the use of a single channel into all three outputs, manipulation like the above would not be possible. Any change we applied to how the single data channel was used would apply to all three outputs. The result would always be a grayscale image with the same numbers driving all three outputs.
"RGB" or "BGR"? - The universal slang for RGB images is, of course, "RGB images." That slang refers to the use of Red, Green and Blue display outputs and does not arise from the literal order of data in the triplets of numbers that specify red data, green data and blue data. Most users working with RGB images in graphics arts editing do not know and do not care what order channels come in, but when we are extracting data or mixing channels for multichannel remote-sensed images we must care about such technical details.
Almost always the order of data in a triplet of image data numbers for a pixel is that blue comes first, green second and red third. From a data perspective, the channel ordering is almost always BGR but such images nonetheless are referred to as "RGB" images.
Statistics and big images - The Style pane automatically computes statistics for images to correctly handle channels. When working with a big image, the Style pane computes statistics from intermediate levels. This provides good usability for the Style pane with big images while retaining good accuracy for computations, such as arranging intervals. When working with intervals in a single-channel, palette arrangement, the intervals pane will not compute percentile statistics, since these are often not of interest. Press the Refresh button to command a quick computation of percentile statistics if those are desired.
Download the full size ginevra image from the Product Downloads page.
Style: Channels and Outputs Tutorial
Style: Contouring using Colors
Example: Create Two Images From One Table - More than one image can show data from the same table, including from the same tile field.
Example: Change the Contrast of an Image - In this example we use the Style pane to change the contrast of an image.
Example: Using the Assign Channels Button - The Assign Channels button in the Style pane for images allows us to assign channels to the standard three Red, Green, and Blue display outputs using frequently-desired arrangements. The button provides a short cut way to assign all channels at once instead of doing each channel individually.
Example: Assign Channels - How to use the Style pane for images to assign channels to display outputs such as R, G, B or A. This topic shows examples of channel combinations and the visual results.
Example: Display an NAIP Four Band Image as Color Infrared (CIR) - How to use the Style pane for images to re-assign channels in a four band NAIP image to produce a Color Infrared (CIR) image display.
Example: Set Image Transparency using Alpha - The A row in the Style pane allows us to specify what transparency we want to apply to the image, either by applying the same value for A for all pixels or by using one of the other channels to also control the A value.
Example: Autocontrast and Hill Shading Images using Style - This example shows how the Style pane can hill shade an image using the values of pixels as heights and generating shadows as if the Sun were located at the specified azimuth and altitude. This capability is used most frequently with raster images to give an impression of three dimensionality in cases where the values of pixels represent terrain elevations.
Example: Style Applied to an Image Server Image - Because the Style pane simply changes the way an image is displayed and not the data, it can operate on read-only data served by various web servers such as WMS REST servers. In this example we look at every detail of creating a data source using an image server and then manipulating the appearance of the display with Style. We will connect to a WMS server that provides LiDAR data in various forms, including as terrain elevation.
Example: Import CTG Grid Cell File and Style - A companion topic to the Example: Import GIRAS vector LULC File and Style topic. We import a CTG LULC Grid Cell file containing raster data showing land use and land cover and then we use Style to provide a more understandable display.
Example: Import DDF SDTS DEM Raster File - We import a raster data terrain elevation surface from USGS SDTS format using DDF files.
Example: Import GIRAS vector LULC File and Style - A companion topic to the Example: Import CTG Grid Cell File and Style topic. We import a USGS land use file in GIRAS vector format and then we use Style to provide a more understandable display.