Rogue Wave JViews TGO Sample: Image Color Tuner


Description

This sample is a utility to find the best image processing parameters to use a given image as the base of a Rogue Wave JViews TGO predefined business object.

How to Use the Sample

How to Run the Sample as an Application

This sample can be run as an application. The installation directory contains an executable JAR file, imagecolortuner.jar, that allows you to execute the sample with a double click from a file browser. Note that if you are using Internet Explorer, you can open the installation directory and execute the JAR file from the browser. This technique may not work in other Web browsers.

Alternatively, you can run the sample application from the command line. First check that the Ant utility is properly configured. If not, see the instructions on how to configure Ant for Rogue Wave JViews.

Then, go to the installation directory of the sample and type:

ant run

Topics Covered

Detailed Description

This sample shows how to you can find the best image processing parameters to use a given image as the base of a Rogue Wave JViews TGO predefined business object.

The class ilog.tgo.graphic.renderer.IltNEImageBaseRendererFactory is used to create new network element types based on a single image.

Rogue Wave JViews TGO processes images to produce various representations for a network element depending on its associated state and alarm.

If the base style is Carrying Traffic no alarms, the representation is the original image. For example:

In all other cases, the representation is automatically computed by JViews TGO, as follows:

The purpose of this sample is to help you find the best values for the thresholds and the gray level.

For the ilog.tgo.graphic.renderer.IltNEImageBaseRendererFactory to properly process the supported image types (GIF, PNG and JPG), the only constraint on the image itself is that the number of colors, C, be as follows: 2 <= C <= 256

Note: Transparency is preserved by the ilog.tgo.graphic.renderer.IltNEImageBaseRendererFactory and, as such, is not considered a color. Consequently, it does not color the transparent pixels of the image. For example, an image that contains the color black as the foreground, and a transparency as the background, will not have the regular coloring scheme applied as it fails to meet the requirement above.

Installation Directory

The Image Color Tuner sample is installed here.

Classes Involved

Source Files

Copyright © Rogue Wave Software, Inc. 1997, 2015. All rights reserved. Legal terms.