Shared Samples

Try out source code samples stored in Bitbucket repositories.
Showing results for 
Search instead for 
Do you mean 

Job randomizeColors

by Technical Evangelist on ‎09-08-2015 11:15 AM - edited on ‎03-29-2016 11:32 AM by Anonymous (816 Views)

Example Type

 

JOB

 

Purpose

 

This example illustrates how to change Color table and Transparency of Thematic image.

 

 

Files

 

randomizeColors.c (C source code)

randomizeColors.eml (EML script)

randomizeColors.dsp (Visual C++ Project)(Windows Only)

 

 

Description

 

This is program apply a random color table (read all colors from \root\etc\color.txt) and transparency to a Thematic image.

 

Calling syntax:

 

randomizeColors    -in <input raster>

                -out <output file>

                -o <col> <row>

                -n <randomizeopacity>

                -n <0 | 1 new file or not>

                 -m <"yes">

 

Interface

 demo.jpg

 

Output

 

The color table of output image will be random.

 demo2.jpg

You can also check the raster attribute table to view details of color table and Opacity.

 demo3.jpg

 

Notes

This program only work with Thematic image (like classification image).

 

If you uncheck the "Create new file", program will modify the input file.

 demo4.jpg

 

Source Code

https://bitbucket.org/HGDN/hgdn_erdas_imagine/src/e1ade3b7d148b0f2f1aa6427044dfa4bce6226ee/Job_rando...

 

 

Overview
Contributors