Imatest saves settings for several purposes— to view the most recently-accessed folders for opening files, to determine how calculations are performed, to specify what regions of interest (ROIs) are used, to control how results are displayed, and more.

Saved settings are also used

In normal operation new settings are stored whenever Imatest modules are run. But there are a number of cases where it is important to use consistent settings (unaffected by recent runs), for example, when a technician opens Imatest to perform a set task. This page describes how to save and load settings and how to create an Imatest icon that always opens Imatest with the same settings.

Occasionally the saved settings (lines in imatest.ini and the other ini files) become corrupted, and an Imatest module or even Imatest itself may not run. In such cases it may be necessary to remove a line or an entire section— or even reset the imatest.ini file (rarely the best solution because it loses all saved settings). Error handling procedures are described in the Troubleshooting page and in two helpful buttons in the Imatest main window.

Manage settings  opens a window that explains some of the key functions for setting and examining the contents of imatest.ini,  where settings are stored. It also displays the full path name to imatest.ini and shows how to fix bugs that can arise when imatest.ini is corrupted. Function buttons include Save settings…, Load settings…, View/Edit settings (ini file), Copy settings (ini file), Import / Merge settings, Edit / Reset Modules, and Reset Defaults (all).

Error reporting  opens a window that shows what to do if you encounter an error. It includes link to the Change Log and Troubleshooting pages, buttons for Copying the current or last session to the clipboard for pasting into emails, and instructions on fixing imatest.ini when it gets corrupted.

imatest.ini

Imatest settings are saved in files named imatest.ini and also rescharts.ini and multicharts.ini for the Rescharts and Multicharts modules. Ini files are updated when settings are changed in input dialog boxes, in the Settings menu or the Imatest main window, or when the ini file is edited (see below).

You don’t need to know the exact location of imatest.ini because Imatest has a full set of utilities for editing, saving, and loading it. The location uses the system environment variable $APPDATA$, which is C:\Users\user_name\AppData\Roaming In Windows Vista (English). The full English-language Vista path name for imatest.ini is  C:\Users\user_name\AppData\Roaming\Imatest\imatest.ini. The name may be different in other operating systems and languages.

Ini files are text files structured so that section titles are enclosed within brackets ( [ ... ] ) and lines have the form
      name = value,
e.g., nwid_save = 2601. Value may be a  number or a character string. The meaning is sometimes obvious. 
[section]
name1 = value1
name2 = value2
         …
[next_section]

Here is an example.

dispwelcome = 1 means display the Welcome screen when Imatest is started.

edfile is the image editor location, used to show saved screen displays in interactive modules (Rescharts, etc.)

 

 

[imatest]
dispwelcome = 1
evalvl = 1
exiftool = 2
expandplt = Min
fontsize = 10
readexif = 1
shrink_largef = 1
acquire = 0
edfile = C:\Program Files (x86)\IrfanView\i_view32.exe
[sfr]
filecomb = 0
folder = C:\Imatest\Data\SFR\
save_dir = C:\Imatest\Data\SFR\Results\

INI file utilities

INI utilities dropdown
ini file utilities

Ini file utilities are opened by clicking on the Settings dropdown window in the Imatest main window. Most can be accessed by pressing the Manage settings button.

Save settings…  saves imatest.ini in a named file. This is especially useful for cases where you will need to return to the current settings in the future.

Load settings…  loads the contents of a named ini file into imatest.ini.

View settings (ini file)  opens the ini file in a text editor (usually Notepad). Settings can be searched, edited, and saved.

Copy settings (ini file)  copies the contents of the ini file into the clipboard, from which can be pasted (control-C) into emails for error reports.

Reset defaults (all)  deletes and recreates imatest.ini. All saved settings are lost. This is the last resort in the case of errors: it’s usually better to delect the contents of the section corresponding to the module that won’t run, using the editor described below.

Edit/reset module(s) or INI File editor  opens the INI file editor shown below. It offers a number of conveniences compared to Notepad, like easily locating sections and editing lines within sections. We often use it for our development work.

INI File EditorIni file editor/debugger

You can select a section to view or delete from the Section dropdown menu. To edit a line, select it in the large window, make the change in the edit window just above the large window, then press Enter. To delete the entire selection, press the Delete section contents button. When you are ready to save the changes press the Save button, which is grayed out until changes are made. If you with to cancel your changes, press either Reload ini file or Close.

Using custom icons and shortcuts

Imatest icon properties window

(Note: Starting with Imatest 3.9, consistent settings can be obtained much more conveniently with the Imatest Functional Interface.)

Custom icons and shortcuts can be valuable where Imatest must be run using consistent (saved) settings— often by technicians or personnel with limited training in Imatest operations or on computers where several operators test different systems. Since imatest.ini is updated whenever Imatest is run, you can never be sure what the settings are at the start of a new run unless you take the proper steps.

This technique imports data from saved ini files, overwriting only those variables that are included in the ini file, which should be edited to remove all variables that don’t need to be set. For example, folder names, which are ever-changing, probably should be removed from the ini file.

To set up a custom icon,

  • Run Imatest under the conditions you you plan to use later. Be sure the correct settings are saved. If you plan to use SFRplus, make sure the settings in the Rescharts SFRplus More settings window (many of which affect automatic SFRplus runs) are correct.
  • In the Imatest main window, click Settings, Save Settings…, then save the settings (the current contents of imatest.ini) in a named file.
  • Make a copy of the icon or shortcut (in Windows Explorer) used to start Imatest and place the in an appropriate location (the desktop or a folder).
  • Rename the new icon or shortcut, as required.
  • RIght-click on the new icon. The window shown on the right opens. Targetcontains the instructions for starting Imatest, for example,

    “C:\Program Files (x86)\Imatest\Imatest\run_imatest.bat”

    (C:\Program Files (x86) is the default folder for running 32-bit programs in 64-bit Vista system.)

  • Add the full path name for the saved ini file to the Target entry. For example,

    “C:\Program Files (x86)\Imatest\Imatest\run_imatest.bat” “c:\imatest\data\misc\loadtest.ini”

  • Click OK to save the new setting.

 

Locking settings  (Not yet fully implemented in Imatest 3.9)

There may be situations where it is desirable to lock settings— to disable the user’s ability to change settings that may affect results when running with custom icons or shortcuts. (You’d rarely want to do this with normal Imatest runs). The procedure for doing so is not airtight— but it’s good enough to prevent accidental changes in settings.

Note: This feature has been introduced in Imatest 3.7. It may take some time until it’s fully implemented. Please know if you’d like us to change settings that are or are not locked.

To lock settings, place the following line in the [imatest] section of the saved ini file. (You’ll need to do this using a text deitor: there is no direct Imatest command that does this.)

fix_settings = 1

Removing this line or setting fix_settings = 0 restores normal operation.

When Imatest starts using an ini file with this setting, a number of settings will be disabled. For normal operation, Imatest will need to be restarted using an ini file where fix_settings is omitted or set to 0.

Print Friendly