Other

_IJ_ProcessCurrentImage, _IJ_Settings, _ManageSharedMacros, _RecordMacro, _RunMacro, _RunMacroOnEvents, _RunMacroOnFileList, _RunMacroOnFilesInFolder, _RunMacroOnND, _RunMacroOnOpenedDocuments, _StartSearchMenu, AbortMacro, AssignMacro, BackupMacroPanel, BrowseMacro, Command, CommandHistory, ECMAScript, EditMacro, ExecuteAddon, GA3_ImportResults, GA3_ImportResultsEx, GA3_RecipeFromUndoSteps, GA3_RunAnalysis, GA3_RunAnalysisEx, GA3_SettingsClose, GA3_SettingsOpen, GA3_SettingsSave, GA3_SettingsSetParamNumber, GA3_SettingsSetParamText, Get_RunningMacroDir, GetHistory, History, IJ_Execute, IJ_FileOpen, IJ_FileSaveCurrent, IJ_SaveSettings, LoadMacro, MacroPreferences, NewMacro, OpenMacro, Paste_Command, PauseMacro, QML_ClearComponentCache, RecordMacro, RepeatLast, RestoreMacroPanel, RunCurrentMacro, RunMacro, RunMacroOnEvent, RunMacroOnFileList, RunMacroOnFilesInFolder, RunMacroOnND, RunMacroOnOpenedDocuments, SaveAsMacro, SaveCurrrentMacroAsShared, SaveMacroAsShared

AbortMacro

This function runs the Macro > Abort Macro command.

Description 

 AbortMacro();

This function interrupts running macro.

AssignMacro

Description 

 AssignMacro(
   char *MacroFileName,
   int  HotKey,
   int  StartUp
);

This function gives preferences to macro.

Parameters

char *MacroFileName

Name of the macro file including file path. E.g. C:\macros\mymacro.mac

int HotKey

< CTRL+F1-F9 > short cut key is used for executing macro. Values ranging from 1 to 5.

int StartUp

A macro with StartUp flag is executed at the application launch.

See Also 
RunMacro

BackupMacroPanel

Description 

 BackupMacroPanel(
   char *Filename
);

Backs up the macro panel into a .xml file.

Parameters

char *Filename

Full path to the XML file. E.g. C:\backup\backup1.xml

BrowseMacro

This function runs the Macro > Browse command.

Description 

 BrowseMacro();

This function displays the Browse Macro dialog box.

Command

This function runs the Macro > Command command.

Description 

 Command();

This function displays the Execute Command dialog box.

See Also 
History

CommandHistory

This function runs the Macro > Command History command.

Description 

 CommandHistory();

This function opens Command History control window.

ECMAScript

Description 

 ECMAScript(
   char *script
);

This function allows to enter macros using the ECMAScript (JavaScript).

Parameters

char *script

ECMAScript (JavaScript) text code.

EditMacro

This function runs the Macro > Edit command.

Description 

 EditMacro();

This function displays Edit macro dialog box with the current macro.

See Also 
AssignMacro

ExecuteAddon

Description 

 ExecuteAddon(
   char *Addon
);

This function is for internal purposes only.

Parameters

char *Addon

For internal purposes only.

GA3_ImportResults

Description 

 GA3_ImportResults(
   char *GA3Name,
   char *GA3FileName,
   char *Hdf5ResultFilename,
   char *Hdf5ResultLocation
);

Imports the GA3 run into Analysis results list under an existing General Analysis 3 recipe. If there is no such recipe it creates an empty artificial one.

Parameters

char *GA3Name

Name of the General Analysis 3.

char *GA3FileName

Name of the file on which the General Analysis 3 is performed.

NULL

Current file is used

char *Hdf5ResultFilename

Name of the HDF5 result file.

char *Hdf5ResultLocation

Location of the HDF5 result file.

GA3_ImportResultsEx

Description 

 GA3_ImportResultsEx(
   char *GA3RecipeFilename,
   char *GA3FileName,
   char *Hdf5ResultFilename,
   char *Hdf5ResultLocation
);

Imports the General Analysis 3 recipe and a run into the Analysis results list.

Parameters

char *GA3RecipeFilename

Name of the General Analysis 3 recipe file.

char *GA3FileName

Name of the file on which the General Analysis 3 is performed.

NULL

Current file is used

char *Hdf5ResultFilename

Name of the HDF5 result file.

char *Hdf5ResultLocation

Location of the HDF5 result file.

GA3_RecipeFromUndoSteps

Description 

 GA3_RecipeFromUndoSteps();

Creates an analysis recipe from the current document undo steps.

GA3_RunAnalysis

Description 

 GA3_RunAnalysis(
   char *GA3Name,
   char *GA3FileName
);

Executes the General Analysis 3.

Parameters

char *GA3Name

Name of the General Analysis 3.

char *GA3FileName

Name of the file on which the General Analysis 3 is performed.

NULL

Current file is used

GA3_RunAnalysisEx

Description 

 GA3_RunAnalysisEx(
   char *GA3Name,
   char *GA3FileName,
   int  IgnoreErrorMessage
);

Executes the General Analysis 3 and turns the error messages on/off.

Parameters

char *GA3Name

Name of the General Analysis 3.

char *GA3FileName

Name of the file on which the General Analysis 3 is performed.

NULL

Current file is used

int IgnoreErrorMessage

Enables/disables analysis error messages.

0

Error message is shown when an analysis fail occurs.

1

No error messages are shown when an analysis fail occurs.

GA3_SettingsClose

Description 

 GA3_SettingsClose(
   int  GA3H
);

Closes the General Analysis 3 specified by handle h.

Parameters

int GA3H

Handle h of the General Analysis 3.

This function is part of macro functions changing the parameters of General Analysis 3.
Following example shows its typical application:
int h = 0;
char error[260];
h = GA3_SettingsOpen(type, name, error);
if (h)
{
   GA3_SettingsSetParamText(h, paramname, strValue);
   GA3_SettingsSetParamNumber(h, paramname, dblValue);
   GA3_SettingsSave(h, name);
   GA3_SettingsClose(h);
}

See Also 
GA3_SettingsSave, GA3_SettingsSetParamNumber, GA3_SettingsSetParamText, GA3_SettingsOpen

GA3_SettingsOpen

Description 

 GA3_SettingsOpen(
   int  GA3Type,
   char *GA3Name,
   char *GA3Error
);

This function returns handle h to General Analysis 3 specified by its name. It also gives error messages.

Parameters

int GA3Type

This parameter is for future use cases. Not functional at the moment.

char *GA3Name

Name of the General Analysis 3.

char *GA3Error

General Analysis 3 error message.

This function is part of macro functions changing the parameters of General Analysis 3.
Following example shows its typical application:
int h = 0;
char error[260];
h = GA3_SettingsOpen(type, name, error);
if (h)
{
   GA3_SettingsSetParamText(h, paramname, strValue);
   GA3_SettingsSetParamNumber(h, paramname, dblValue);
   GA3_SettingsSave(h, name);
   GA3_SettingsClose(h);
}

See Also 
GA3_SettingsClose, GA3_SettingsSave, GA3_SettingsSetParamNumber, GA3_SettingsSetParamText

GA3_SettingsSave

Description 

 GA3_SettingsSave(
   int  GA3H,
   char *GA3Name
);

Saves changed General Analysis 3 (specified by handle h) in the given saving name. If parameter saving name is empty, the analysis is overwritten.

Parameters

int GA3H

Handle h of the General Analysis 3.

char *GA3Name

Name of the General Analysis 3.

This function is part of macro functions changing the parameters of General Analysis 3.
Following example shows its typical application:
int h = 0;
char error[260];
h = GA3_SettingsOpen(type, name, error);
if (h)
{
   GA3_SettingsSetParamText(h, paramname, strValue);
   GA3_SettingsSetParamNumber(h, paramname, dblValue);
   GA3_SettingsSave(h, name);
   GA3_SettingsClose(h);
}

See Also 
GA3_SettingsClose, GA3_SettingsSetParamNumber, GA3_SettingsSetParamText, GA3_SettingsOpen

GA3_SettingsSetParamNumber

Description 

 GA3_SettingsSetParamNumber(
   int  GA3H,
   char *GA3Name,
   double  GA3DblValue
);

Macro function which changes the number parameter (double or int) of the given name (contained in General Analysis 3 specified by handle h) to dblValue. In case of parameter stringlist it changes the index of the current member. In case of parameter range it sets its low limit.

Parameters

int GA3H

Handle h of the General Analysis 3.

char *GA3Name

Name of the General Analysis 3.

double GA3DblValue

Double value assigned to the parameter.

This function is part of macro functions changing the parameters of General Analysis 3.
Following example shows its typical application:
int h = 0;
char error[260];
h = GA3_SettingsOpen(type, name, error);
if (h)
{
   GA3_SettingsSetParamText(h, paramname, strValue);
   GA3_SettingsSetParamNumber(h, paramname, dblValue);
   GA3_SettingsSave(h, name);
   GA3_SettingsClose(h);
}

See Also 
GA3_SettingsClose, GA3_SettingsSave, GA3_SettingsSetParamText, GA3_SettingsOpen

GA3_SettingsSetParamText

Description 

 GA3_SettingsSetParamText(
   int  GA3H,
   char *GA3Name,
   char *GA3StrValue
);

Changes the text parameter of the given name (contained in General Analysis 3 specified by handle h) to the string value. In case of parameter stringlist it changes text of the current stringlist member.

Parameters

int GA3H

Handle h of the General Analysis 3.

char *GA3Name

Name of the General Analysis 3.

char *GA3StrValue

String value assigned to the parameter.

This function is part of macro functions changing the parameters of General Analysis 3.
Following example shows its typical application:
int h = 0;
char error[260];
h = GA3_SettingsOpen(type, name, error);
if (h)
{
   GA3_SettingsSetParamText(h, paramname, strValue);
   GA3_SettingsSetParamNumber(h, paramname, dblValue);
   GA3_SettingsSave(h, name);
   GA3_SettingsClose(h);
}

See Also 
GA3_SettingsClose, GA3_SettingsSave, GA3_SettingsSetParamNumber, GA3_SettingsOpen

GetHistory

Description 

 GetHistory(
   char *Buffer,
   int  Count
);

Returns the command history.

Parameters

char *Buffer

Address of the buffer.

int Count

Number of iterations.

Get_RunningMacroDir

Description 

 Get_RunningMacroDir(
   char *Name
);

This function gets the running macro directory.

Parameters

char *Name

The path to the directory.

Note

If there are more running macros than the last called macro directory is returned. This function is designed specially for setup macros.

See Also 
RunMacro

History

Description 

 History();

This function displays the Command History dialog box.

See Also 
Command, GetHistory

IJ_Execute

Description 

 IJ_Execute(
   char *ImageJMacro
);

Executes the ImageJ macro. Parameters for the macro run and path to the exe file are taken from the Settings dialog (Process Current Image window).

Parameters

char *ImageJMacro

ImageJ macro.

IJ_FileOpen

Description 

 IJ_FileOpen(
   char *ImageJOutputFilename
);

Opens the file specified by the folder (set as Output in the Settings dialog - Process Current Image window) and filename (defined by the ImageJOutputFilename parameter).

Parameters

char *ImageJOutputFilename

ImageJ processing output file name.

IJ_FileSaveCurrent

Description 

 IJ_FileSaveCurrent(
   char *ImageJIntputFilename
);

On the current image opened in NIS-Elements calls Save As into a folder (set as Intput in the Settings dialog - Process Current Image window) and filename (defined by the ImageJIntputFilename parameter).

Parameters

char *ImageJIntputFilename

ImageJ processing input file name.

IJ_SaveSettings

Description 

 IJ_SaveSettings(
   char *ImageJExecutable,
   char *ImageJParameters,
   char *ImageJInput,
   char *ImageJOutput
);

Saves the ImageJ parameter values.

Parameters

char *ImageJExecutable

Path to the ImageJ executable file.

char *ImageJParameters

Parameters before executing the macro.

char *ImageJInput

Folder for ImageJ input files.

char *ImageJOutput

Flder for ImageJ output files.

LoadMacro

This function runs the Macro > Untitled command.

Description 

 LoadMacro(
   char *ActiveMacro
);

This function loads specified macro file.

Parameters

char *ActiveMacro

Name of the macro file including its path.

See Also 
OpenMacro, RunMacro, RecordMacro

MacroPreferences

This function runs the Macro > Options command.

Description 

 MacroPreferences();

This function displays the Macro Preferences dialog box.

See Also 
AssignMacro, SetDrive

NewMacro

This function runs the Macro > New command.

Description 

 NewMacro();

This function displays the New Macro dialog box.

See Also 
RecordMacro, OpenMacro, RunMacro

OpenMacro

This function runs the Macro > Open command.

Description 

 OpenMacro();

This function displays the Open Macro dialog box.

See Also 
AssignMacro, NewMacro, RunMacro, EditMacro, RecordMacro, SaveAsMacro

Paste_Command

Description 

 Paste_Command(
   char *Command,
   char *Button,
   int  Mode
);

Shows window for selecting the command and its parameters.

Parameters

char *Command

Command to select, can include parameters (e.g. ImageOpen).

char *Button

Text to show on the first button in the window.

int Mode

Determines what to do when user presses the first button.

1, PASTE_COMMAND_COPY

Copies the resulting command to clipboard.

2, PASTE_COMMAND_EXECUTE

Executes the resulting command.

4, PASTE_COMMAND_REWRITE

The resulting command is written back into the Command parameter.

Return Values

Returns 0 if user cancelled the window, otherwise it returns 1.

PauseMacro

This function runs the Macro > Pause Macro command.

Description 

 PauseMacro(
   char *TextInCaption
);

This function temporally stops processing macro commands. Macro will continue processing when clicking on Resume menu item.

Parameters

char *TextInCaption

This text appears in the caption followed by image, macro and objective information. Also Resume item is added to the right edge of the main menu bar.

See Also 
AssignMacro

QML_ClearComponentCache

Description 

 QML_ClearComponentCache();

For QML code developers. This function clears cache of the QML engine so that the QML code can be reloaded without restarting the software. Just close the QML GUI, run this function and display the GUI again.

RecordMacro

Interactive command to this function: Macro > Record

Description 

 RecordMacro();

This function starts recording commands to macro.

See Also 
AssignMacro, NewMacro, RunMacro, EditMacro, OpenMacro, SaveAsMacro

RepeatLast

This function runs the Macro > Repeat Last command.

Description 

 RepeatLast();

This function executes the most recent command.

RestoreMacroPanel

Description 

 RestoreMacroPanel(
   char *Filename
);

Restores the macro panel using a previously backed up .xml file.

Parameters

char *Filename

Full path to the XML file. E.g. C:\backup\backup1.xml

RunCurrentMacro

This function runs the Macro > Run command.

Description 

 RunCurrentMacro();

This function runs the current macro.

See Also 
RunMacro

RunMacro

This function runs the Image > Batch GA3 command.

Interactive command to this function: Macro > Run Macro From File

Description 

 RunMacro(
   char *MacroFileName
);

This function executes the MacroFileName macro.

Parameters

char *MacroFileName

Name of the macro file including file path. E.g. C:\macros\mymacro.mac

See Also 
AssignMacro, NewMacro, RecordMacro, EditMacro, OpenMacro, SaveAsMacro

RunMacroOnEvent

Description 

 RunMacroOnEvent(
   int  EventIndex,
   char *EventCommand
);

This function assigns a macro function to an application event. When the event occurs, the assigned macro will run automatically.

Parameters

int EventIndex

Index of the event.

0

Open an image

1

Capture an image - before

2

Capture an image - after

3

Live - before the first frame

4

Save - before

5

RAM capture - before

6

Select optical configuration

7

Application startup

8

Application finish

9

ND experiment finish

char *EventCommand

The macro command to be performed on the selected event. If left blank, no command will be performed when the selected event occurs.

RunMacroOnFileList

Interactive command to this function: Macro > Run on File List

Description 

 RunMacroOnFileList(
   char *EventCommand,
   char *FileList,
   int  SaveModified,
   int  CloseModified,
   char *Dest_Directory,
   int  NDDimension
);

This function is used to create a list of images and process them with a macro.

Parameters

char *EventCommand

The macro command which will be executed on each file. If blank, the current macro is used.

char *FileList

List of files.

int SaveModified

Specifies whether to save an opened document when it has been modified.

0, QUERYSAVE_ASK

Asks whether to save changes or not.

Ask before overwriting.

1, QUERYSAVE_YES

Changes are saved automatically.

Overwrite existing file.

2, QUERYSAVE_NO

Changes are not saved. Always discard the image.

Do not save (handled in macro).

SAVE_DIFFDIR

Save into different folder.

QUERYSAVE_CANCEL

Cancels the operation.

int CloseModified

Specifies whether the image is closed or remains open in the application window during a macro execution.

CLOSE_NOTHING

Do nothing (handled in macro).

CLOSE_OPENED

Close only opened documents after each step.

CLOSE_ALL

Close all documents after each step.

char *Dest_Directory

This parameter describes path to the resulting files (destination directory).

int NDDimension

Frame selection of the ND document.

0

Runs a macro/command on a file.

1

Runs a macro and moves the frame in the time dimension until the end of the sequence.

2

Runs a macro and moves the frame in the multi-point dimension until the end of the sequence.

4

Runs a macro and moves the frame in the Z dimension until the end of the sequence.

15

Runs a macro and moves the frame in all dimensions until the end of the sequence.

16

Runs a macro and moves the frame in the selected frames until the end of the sequence.

Selection - the frames/dimensions selected by mouse within the ND control bar will be affected.

Note

Value combination is also possible (e.g.: M+T=3, Z+T=5, M+Z=6).

See Also 
_RunMacroOnFileList

RunMacroOnFilesInFolder

Interactive command to this function: Macro > Run on Files in Folder

Description 

 RunMacroOnFilesInFolder(
   int  NDDimension,
   char *EventCommand,
   char *Directory,
   int  SaveModified,
   int  CloseModified,
   char *Dest_Directory,
   int  IncludeSubfolders
);

This function executes macro on specified files in a folder.

Parameters

int NDDimension

Frame selection of the ND document.

0

Runs a macro/command on a file.

1

Runs a macro and moves the frame in the time dimension until the end of the sequence.

2

Runs a macro and moves the frame in the multi-point dimension until the end of the sequence.

4

Runs a macro and moves the frame in the Z dimension until the end of the sequence.

15

Runs a macro and moves the frame in all dimensions until the end of the sequence.

16

Runs a macro and moves the frame in the selected frames until the end of the sequence.

Selection - the frames/dimensions selected by mouse within the ND control bar will be affected.

Note

Value combination is also possible (e.g.: M+T=3, Z+T=5, M+Z=6).

char *EventCommand

The macro command which will be executed on each file. If blank, the current macro is used.

char *Directory

Directory path.

int SaveModified

Specifies whether to save an opened document when it has been modified.

0, QUERYSAVE_ASK

Asks whether to save changes or not.

Ask before overwriting.

1, QUERYSAVE_YES

Changes are saved automatically.

Overwrite existing file.

2, QUERYSAVE_NO

Changes are not saved. Always discard the image.

Do not save (handled in macro).

SAVE_DIFFDIR

Save into different folder.

QUERYSAVE_CANCEL

Cancels the operation.

int CloseModified

Specifies whether the image is closed or remains open in the application window during a macro execution.

CLOSE_NOTHING

Do nothing (handled in macro).

CLOSE_OPENED

Close only opened documents after each step.

CLOSE_ALL

Close all documents after each step.

char *Dest_Directory

This parameter describes path to the resulting files (destination directory).

int IncludeSubfolders

Specifies whether the macro is executed even on images in all subfolders existing in the selected directory.

0

Do not include subfolders

1

Include subfolders

See Also 
_RunMacroOnFilesInFolder

RunMacroOnND

Interactive command to this function: Macro > Run on ND

Description 

 RunMacroOnND(
   int  NDDimension,
   char *EventCommand
);

This function executes a macro on a ND image.

Parameters

int NDDimension

Frame selection of the ND document.

0

Current frame

1

Time dimension

2

Multipoint dimension

4

Z dimension

15

All frames (the whole ND document).

16

Selection - the frames/dimensions selected by mouse within the ND control bar will be affected.

Note

Value combination is also possible (e.g.: M+T=3, Z+T=5, M+Z=6).

char *EventCommand

The macro command to be performed on the selected event. If left blank, no command will be performed when the selected event occurs.

RunMacroOnOpenedDocuments

Interactive command to this function: Macro > Run on Opened Documents

Description 

 RunMacroOnOpenedDocuments(
   int  NDDimension,
   char *EventCommand
);

This function executes a macro on all opened documents.

Parameters

int NDDimension

Frame selection of the ND document.

0

Current frame

1

Time dimension

2

Multipoint dimension

4

Z dimension

15

All frames (the whole ND document).

16

Selection - the frames/dimensions selected by mouse within the ND control bar will be affected.

Note

Value combination is also possible (e.g.: M+T=3, Z+T=5, M+Z=6).

char *EventCommand

The macro command to be performed on the selected event. If left blank, no command will be performed when the selected event occurs.

SaveAsMacro

This function runs the Macro > Save As command.

Description 

 SaveAsMacro();

This function saves macro as a new file.

See Also 
AssignMacro, NewMacro, RecordMacro, EditMacro, OpenMacro, RunMacro

SaveCurrrentMacroAsShared

Description 

 SaveCurrrentMacroAsShared(
   char *SharedMacro
);

This function saves and sets current macro as shared.

Parameters

char *SharedMacro

Name and location of the shared macro.

SaveMacroAsShared

Description 

 SaveMacroAsShared(
   char *SharedMacro,
   char *MacroFileName
);

This function saves and sets selected macro as shared.

Parameters

char *SharedMacro

Name and location of the shared macro.

char *MacroFileName

Name of the macro file including file path. E.g. C:\macros\mymacro.mac

_IJ_ProcessCurrentImage

This function runs the Applications > ImageJ Bridge > Process Current Image command.

Description 

 _IJ_ProcessCurrentImage();

Opens the Process Current Image dialog window used for defining the ImageJ executable file, parameters, macros and the input and output files.

_IJ_Settings

This function runs the Applications > ImageJ Bridge > Settings command.

Description 

 _IJ_Settings();

Opens the Settings dialog window used for defining ImageJ software path, parameters and the input and output folder.

_ManageSharedMacros

This function runs the Macro > Manage Shared Macros command.

Description 

 _ManageSharedMacros();

Opens the Shared Macros Manager dialog window used for sharing and managing macros.

_RecordMacro

This function runs the Macro > Record command.

Description 

 _RecordMacro();

This function starts recording of all subsequent commands into current working macro.

See Also 
RecordMacro

_RunMacro

This function runs the Macro > Run Macro From File command.

Description 

 _RunMacro();

This function displays the Run Macro dialog box.

See Also 
RunMacro

_RunMacroOnEvents

This function runs the Macro > Run Macro on Events command.

Description 

 _RunMacroOnEvents();

_StartSearchMenu

Description 

 _StartSearchMenu();

Starts the Search edit box in the main toolbar.

_RunMacroOnFileList

This function runs the Macro > Run on File List command.

Description 

 _RunMacroOnFileList();

This function opens the Run Macro on File List dialog window.

See Also 
RunMacroOnFileList

_RunMacroOnFilesInFolder

This function runs the Macro > Run on Files in Folder command.

Description 

 _RunMacroOnFilesInFolder();

This function opens the Run Macro on Files in Folders dialog window. You can select which macro to execute, specify the selected folder and set how to treat the modified documents - whether to save and/or close them.

See Also 
RunMacroOnFilesInFolder

_RunMacroOnND

This function runs the Macro > Run on ND command.

Description 

 _RunMacroOnND();

This function displays the Macro Run on ND Image dialog box. You can select which macro to execute.

_RunMacroOnOpenedDocuments

This function runs the Macro > Run on Opened Documents command.

Description 

 _RunMacroOnOpenedDocuments();

This function opens the Run Macro on Opened Documents dialog window. You can select which macro to execute.