CImage:CreateSynth
The CreateSynth method constructs a new synthetic image containing noise of various type and, optionally, randomly placed stars.
bSuccess = CImage:CreateSynth( CImSynthInfo ) where |
CImSynthInfo is a class object that contains information about the synthetic image.
bSuccess is the returned success code. On success it is true, otherwise false.
This method creates a synthetic image using the peoperties contained in the CImSynthInfo object. The default properties can be changed by setting new values or loading all the CImSynthInfo properties from the system Registry using CImSynthInfo:Open. Additional methods that may be useful are SynthStarCount and SynthGetStar.
The following sdcript creates a synthetic image, displays it, and then uses the CImage:SynthGetStar method to fetch the properties of the first 10 synthetic stars. The output from one line of the script's listing loop might look like the following (here, for the 3rd artificial star):
3: 808.712, 841.744, 1681.18
The following script lists the star's index, x coordinate, y coordinate, and total luminosity.
|
-- create a CImage object |
|
-- create CImSynthInfo with default vlaues |
|
-- 10,000 synthetic stars |
|
-- Create the synthetic image |
|
-- if not created, then exit the script |
|
-- display the synthetic image |
|
|
|
-- list the properties of the first 10 stars |
|
-- fetch the star's data table |
|
-- print the star's Index, X, Y, and Luminosity |
|
-- end of printing loop |