Public Types | Public Slots | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Friends

Tool Class Reference

List of all members.

Public Types

enum  ToolType {
  NONE = 0, IR_FFT, IR_REFINE_TRANSLATE, IR_REFINE_GRID,
  IR_MOSAIC_OVERRIDE, IR_ASSEMBLE, IR_STOS_BRUTE, IR_STOS_GRID,
  IR_ADD_TRANSFORMS, IR_STOM, IR_STOS_OVERRIDE, SNAPSHOT,
  IR_BLOB, IR_CLAHE, SMART_IMPORT = 20, IR_ASSEMBLE_TILED = 22,
  INVALID_TOOL = 32767
}

Public Slots

void Run (bool askUserInput=true, bool userRequest=true, bool runOnAllSlices=false)
void SaveCustomArgs ()
bool ExecuteSettingsDialog (QHash< QString, ToolFlag * > &flags, bool askUserInput=true, bool onlyOkButton=false)
void Clean ()

Public Member Functions

 Tool (QXmlStreamReader &xml, ToolType type)
QString GetToolName ()
QString GetProcessName ()
QString GetIconName ()
QString GetDetails ()
QString GetShortDetails ()
QString GetFriendlyName ()
QString GetSearchName ()
QString GetSaveName ()
QString InsertAliasId (const QString &addTo)
bool GetRunPerImage ()
QStringList GetFilterList (const QString &tag="")
bool RunPerChannel ()
int GetGroupType ()
QStringList GetPossibleInputFiles (QList< VolumeIndex * > *slices, const QString &inputTag)
QHash< QString, QStringList > GetAllPossibleInputFiles (QList< VolumeIndex * > *indices)
bool FilenameMatchesSearch (const QString &filename)
void SetIndices (QList< VolumeIndex * > *indices)
void QueueOnly (bool queueOnly)
void SetUpstreamInput (const QStringList &upstreams)
void ClearUpstreamInput ()
void SetAlias (ToolAlias *alias)
void ClearAlias ()
ToolAliasGetAlias ()
Tool::ToolType GetToolType ()
void SaveCustomArgs (QXmlStreamWriter &xml, bool loadSettings=true)
void LoadCustomArgs (QXmlStreamReader &xml, QHash< QString, ToolFlag * > *newFlags=NULL)
bool RunOnSections ()
bool NoOperation ()
bool RunInTerminal ()
void ToolCompletedSuccessfully (int timeTaken)
float TotalRuntime ()
float AverageRuntime ()
QHash< QString, ToolFlag * > GetFlags ()
void OverrideFlags (QHash< QString, ToolFlag * > *flags)
void ClearOverride ()
bool CanRunAfter (ToolAlias *before)
int QueueProcess (const QString &prog, VolumeIndex *index)
int NumThreads ()
int SectionsRequired ()
bool ChecksValid ()
QString PrintValidChecks ()

Static Public Member Functions

static QString GetToolName (Tool::ToolType type)
static QString GetIconName (Tool::ToolType type)
static QString GetDetails (Tool::ToolType type)
static bool FileToComboBoxDetails (const QString &fileName, QString &properName, QIcon &icon)
static ToolAliasLoadNextTool (QXmlStreamReader &xml, int &separator, bool onlyOverride=false, QHash< QString, ToolFlag * > *newFlags=NULL)
static ToolGetTool (ToolType type)
static ToolGetOperable (int idx)
static QHash< int, Tool * > & GetOperables ()
static int ConvertToGroupId (const QString &groupStr)

Protected Attributes

QString name
QString processName
QString icon
QString description
QString shortDescription
QString friendlyName
QString saveName
QString searchName
QHash< QString, QStringList > inputFilters
Tool::ToolType type
QStringList checkList
QStringList invalidList
bool singleRun
bool runOnSections
bool useSlicesAsInput
bool runPerImage
bool runPerChannel
int runType
int numThreads
int sectionsRequired
int groupId
float totalTime
int timesFinished
ToolAliascurrentAlias
QHash< QString, ToolFlag * > flags
QHash< QString, ToolFlag * > * overrideFlags
bool queueOnly
QList< VolumeIndex * > * activeIndices
QStringList upstreamArgs

Static Protected Attributes

static QHash< ToolType, Tool * > toolList
static QHash< int, Tool * > operableTools

Friends

class Iris::IrisTests

Constructor & Destructor Documentation

Tool::Tool ( QXmlStreamReader &  xml,
ToolType  type 
)

Tools are generated from Tool\ToolList.xml file. This file allows for easy addition of custom tools. The tools are the backbone of Iris, and make up a Pipeline. The list contains xml elements with sub lists of xml attributes. The marked attributes are required.

Required Elements:
  • Tool - Each tool begins witha tool tag.
    • uid - A unique id for the tool.
  • ProcessName - Command line name of the tool. In order for Iris to find your tool it must be in a location it can recognize. See UserPreferences::toolsInPath for more information.
  • ProcessCheck - Runs the below command to verify that this process has it's run requirements fulfilled.
  • Name - Name used to reference the tool in Iris.
  • Input - Valid input files for this tool. Wildcards are accepted.
    • tag - Allows for extra input types, in case more than one input is needed. Default value [<Empty>].
    • section - [true] Check section directory for input files. Default value [false].
    • slice - [true] Check slice directory for input files. Default value [false]
    • image - [true] Check the section and slice image directories for input files. Default value [false]
    • volume - [true] Check the section to section directory for input files. Default value [false]
Optional Elements:
  • FunctionName - Name of a supported internal function name.
  • NoOperation - Don't actually run the tool. Used solely to keep track of items.
  • ShortDescription - Short name used .
  • Description - Name used to reference the tool in Iris.
  • Icon - Optional icon path. Path is local to the Iris executable.
  • NumberOfThreads - Number of threads this tool requires. Set to -1 for all threads. Note, if the system does not have the requested number of threads this tool will not be able to run.
Optional Elements (Defult to false)
  • RunPerImage - Run the tool once per image. See ir-clahe.
  • RunPerChannel - Run the tool once per channel. See ir-assemble.
  • RunOnSection - Tools can either be run once per section (true) or once per slice (false).
  • SingleRun - Only run the tool once for all the sections and slices. The run will be performed on the last section.
  • GroupType - The group type determines what menus this tool should be added to.


The documentation for this class was generated from the following files:
 All Classes Functions Variables