Subsections:
[Show/Hide]- Miscellaneous operations
- Get the software product name
- Get the software and compute engine versions
- Get the software license and functionality level
- Set the verbosity level of popup dialogs
- Define all channel color triplets
- Define a channel color triplet
- Set/Get initial color mode
- Get the Huygens license file path
- Get display gamma
- Set display gamma
- Control update actions to the GUI
- Create an MJPEG AVI movie from a JPEG series
- Create a namespace of constants or returns a named one
- Calculate some useful mathematical operations
- Solve the assignment problem for a given cost (or profit) matrix.
- Plot mathematical functions of x (and x,y in 3D) in Tcl expr syntax.
- Adopt parameters from parent image
- Write image to existing Tk photo object
Miscellaneous operations
Get the software product name
huOpt product
Returns: the running product.
One of the following: HuPro, HuScript, HuEss, HuCore, FreeSP.
Get the software and compute engine versions
huOpt version
?-engine?.........Compute engine version
Returns: the software version number.
huOpt version
=>3.6.3p1
Get the software license and functionality level
huOpt license
?-maxThreads?.........Max threads permitted
?-info?.........General information
Returns: the functionality level, i.e. the server type, the microscope type(s) and extra options like multi-photon and/or time series support.
huOpt license
=>desktop widefield confocal nipkow-disk multi-photon time
Returns: the requested parameter.
Set the verbosity level of popup dialogs
huOpt verb -mode <deadSilent|silent|noQs|normal|query>
?-mode deadSilent | silent | noQs | normal | query (normal)?.........Mode
Returns: the previous verbosity level.
huOpt should be entered verbatim! During the execution of many Huygens functions various popup windows appear. In most cases these will be information windows which need no special interaction from your part. In other cases you may be wish to query it some way. Since the last type of 'blocking' dialogs may stop a task which is meant to run unattended, it is sometimes desirable to alter this behavior.
The huOpt verb command allows you to set three levels of 'verbosity':
- normal All information and dialog windows will be displayed. In the case of a dialog box which expects an action from your part, the software waits for your reply.
- noQs No question, so any dialog box which waits for an action is suppressed. Instead, questions are always answered with 'yes' or 'ok' and written to the task report tab or the shell (HuScript). For multiple-choice questions the first answer is returned.
- silent Display of all types of popup windows is suppressed. Questions are handled as in noQs mode.
- deadSilent Do not even print the messages to the task report tab or shell (HuScript). Questions are handled as in noQs mode.
- query In this mode the verbosity level is unchanged; the current value is returned.
Define all channel color triplets
huOpt chanColAll text_containing_color_triplets
?-colstr string.........String holding channel color triplets
Defines all channel color together in RGB triplets in string form. Each triplet has format string C<n> -<r> -<g> -<b> and is separated by spaces from the next.
Default string:
{C0-255-0-0 C1-0-255-0 C2-0-0-255 C3-128-128-0 C4-128-0-128 C5-0-128-128 C6-170-85-0 C7-0-170-85 C8-85-0-170 C9-85-170-0 C10-0-85-170 C11-170-0-85 C12-128-64-64 C13-64-128-64 C14-64-64-128 C15-196-32-32 C16-32-196-32 C17-32-32-196 C18-160-64-32 C19-32-160-64 C20-64-32-160 C21-85-85-85}
Returns: void.
Define a channel color triplet
huOpt chanCol
?-ch value (0)?.........Channel
?-get?.........Get value
?-rgb vector (1.0 0 0 0)?.........RGB triplet vector
Returns: RGB triplet if the get option is set.
Example: set the color of channel 0 to pink and return the RGB-color triplet.
huOpt chanCol -ch 0 -get -rgb {255 180 180}
=>255 180 180
Set/Get initial color mode
huOpt initColMode
?-mode falseCol | trueCol | grey (falseCol)?.........Mode
?-get?.........Get value
Returns: new setting if the -get option is enabled.
Get the Huygens license file path
huOpt getLicPath
Returns the path of your Huygens license file.
Get display gamma
huOpt getGamma
Returns: gamma factor.
Set display gamma
huOpt setGamma <value>
Returns: gamma factor.
High gamma values (around 2) will emphasize the background at the cost of contrast n the bright image parts. Gamma values below 1 do the reverse.
Control update actions to the GUI
huOpt guiUpdating <off | noRefresh | noBusy | noProgWdw | full | asis>
Returns: state after call.
Controls update of the different dialogue boxes during processing to the GUI.
Example: to disable the busy popup:
huOpt guiUpdating noBusy
Default: all dialogues are displayed (full).
Create an MJPEG AVI movie from a JPEG series
huUtil movie <pathname> <filename>
?-fps value (12.0)?.........Frames per second
Returns: the file name of the created movie.
This function replaces the now deprecated huOpt movie, which is likely to be removed in a future version.
Create a namespace of constants or returns a named one
huOpt const
?-name string?.........Name of constant to be returned
Returns: void, or the constant value when a name is specified.
This function was implemented in order to have common constant definitions in the compute engine and the Tcl layer.
When no specific constant is required with the -name option, the function dumps all the internally defined constants into the Tcl interpreter, under the namespace ::Constants and in the global array G_Constants. They can then be accessed in Tcl with $::Constants::M_PI or $G_Constants(M_PI), for example. To obtain a list of all the defined constants you can do array names G_Constants. These values can later be changed at Tcl level, and restored with a new execution of huOpt const. The original values can always be obtained individualy using the -name option that returns a value, like in the following example:
huOpt const -name M_PI
=>3.141592653590
Calculate some useful mathematical operations
huUtil math <operationIndex>
NOTE: This function, like huOpt math, is deprecated for scripting use.
Solve the assignment problem for a given cost (or profit) matrix.
huUtil assign <cost matrix>
?-profit?.........Profits instead of costs
NOTE: This function, like huOpt assign, is deprecated for scripting use.
Plot mathematical functions of x (and x,y in 3D) in Tcl expr syntax.
huUtil plot <functions>
?-from string.........From
?-to string.........To
?-steps string.........Steps
Returns: the variable that holds the plot data.
This function replaces the now deprecated huOpt plot, which is likely to be removed in a future version.
Example:
huUtil plot {{exp(-pow(x,2)/8)} {exp(-pow(x-2,2)/2)}} -from -8 -to 8
Adopt parameters from parent image
parent adopt -> <target>
Returns: void.
This function lets you adopt the microscopic parameters of the parent by the target.These parameters include geometry (sample intervals) optical parameters like wavelength, numerical aperture and so on.
See also: setp.
Write image to existing Tk photo object
img toTkPhoto <tk_photo_name>
?-desto IndexVector (0 0 0 0 0)?.........Destination offset
?-span IndexVector (0 0 0 0 0)?.........Span
?-alpha?.........Alpha
?-overlay?.........Overlay
?-direct?.........Direct mode
?-query?.........Query display
This tool is for advanced users who wish to create a photo image in a (TK) wish shell. If -alpha is set and the image has at least 4 channels, channel 4 is regarded as the alpha channel.
The -overlay option will cause toTKPhoto to blend a four channel image into an existing Tk photo widget. The flag is only active if the -alpha flag is set.
Images in the Huygens Pro can be read into a Tk photo object. You create the tkPhoto object with:
set myPhoto [image create photo "foo" ]
and then:
myImage toTkPhoto $myPhoto
`myImage' should be a 2D Huygens Pro image, preferably the output of the chan2rgba color and contrast mapper.
You can add the photo to a Tk Canvas with for example
$myCanvas create image 0 0 -image $myPhoto