SML Display Functions
V5.30 –– March 1996
The Spatial Manipulation Language (SML) process in TNTmips (Interpret / SML...) includes display functions that can be called from an SML script. You can write an SML script that displays an object, asks for user input, lets the script user select options by pressing customized buttons, and redisplays an object after reprocessing.
The following illustration shows an interactive "boxcar" classification implementation. The script posts buttons on the view window to let the user select new data ranges on three input rasters A, B, and C. When the user clicks the [Process] button, the script processes the input rasters with the current input ranges and re-displays the reference image, showing the new classification results. In this example, TM satellite bands 5, 4, and 3 were processed to mark user-selected features defined by data ranges 100-219, 100-191, and 80-164 respectively. The marked features show in yellow on the display.
SML supports familiar print() and printf() functions to display prompts and program information, while input() waits for user input in the console window. DispSetMessage() lets you place a message in the display window's message line.
The DispAddButtons() function lets you post option buttons at the bottom of a display window. Then DispWaitForButtonPress() tells the script which button your user presses, and the script can branch from there.
View complete SML Script