File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
 |
Isis 3 Programmer Reference
|
1 #ifndef PipelineApplication_h
2 #define PipelineApplication_h
14 #include "IException.h"
18 class PipelineParameter;
78 const QString &
Name()
const {
117 void SetInputParameter(
const QString &inputParamName,
bool supportsVirtualBands);
120 void SetOutputParameter(
const QString &outputParamName,
const QString &outNameModifier,
const QString &outFileExtension =
"cub");
122 const QString &outNameModifier,
const QString &outFileExtension);
126 void AddParameter(
const QString &inputParamName,
const QString &appParamName);
127 void AddParameter(
const QString &branch,
const QString &inputParamName,
const QString &appParamName);
129 void AddConstParameter(
const QString &appParamName,
const QString &appParamValue);
130 void AddConstParameter(
const QString &branch,
const QString &appParamName,
const QString &appParamValue);
274 if(compare.size() > from.size())
return false;
276 for(
int index = 0; index < compare.size(); index++)
277 if(from[index] != compare[index])
return false;
287 int FindBranch(QString name,
bool input =
true);
std::vector< PipelineParameter > p_params
Regular parameters.
int FindBranch(QString name, bool input=true)
The method, given a string, finds the index of a branch.
void SetNext(PipelineApplication *next)
Link to the next application in the pipeline.
std::vector< QString > p_virtualBands
Virtual bands string to add (empty if none)
This class represents one application in the pipeline.
bool AffectsAllBranches()
True if branch-independant.
@ ConstantStrings
Known strings.
Pipeline * p_pipeline
The pipeline.
bool Branches()
Return true is this application does branch (one input branch, multiple output)
bool Merges()
Returns true if this application does merge branches (multiple input branches, one output)
bool AppliesToBranch(int branch)
Returns whether or not the specified branch is affected.
bool Continue(void)
Get the continue flag status.
QString Name()
Name of the parameter.
std::vector< QString > p_outBranches
Output branches.
CustomParameterValue
This is used to set custom values that must be calculated on the fly.
bool LastApplicationWithOutput()
Returns true if this is the last application with output.
QString CalculateOutputFile(int branch)
This method calculates the output file for the specified branch.
void SetContinue(bool pbFlag)
Set the continue flag status.
PipelineApplication * Previous() const
This returns the last enabled pipeline application or null.
QString p_outputMod
Output file name modifier.
Pipeline * GetPipeline()
Returns the pipeline.
void AddConstParameter(const QString &appParamName, const QString &appParamValue)
This method adds a parameter to this application with a known value (does not get it from the user in...
PipelineApplication * PreviousOutputer() const
This returns the previous enabled pipeline application that makes output or null.
PipelineApplication * p_next
Next pipeline application.
QString p_paramName
Parameter name.
@ LastAppOutputList
A list of files from the last run application's output.
QString GetRealLastOutput(bool skipOne=false)
This method is used to calculate the value for CustomParameterValue::LastOutput.
std::vector< QString > TemporaryFiles()
This method returns a list of the temporary files generated by this program.
@ LastAppOutputListNoMerge
A list of files from the last run application's output.
QString OutputExtension()
This returns this application's output file name's extension.
QString Value()
Non-special value of the parameter.
PipelineParameter(int branch, QString paramName)
Construct the parameter with only a parameter name; affects only the specified branch and is not a sp...
bool p_supportsVirtualBands
This application supports virtual bands?
PipelineParameter(QString paramName, PipelineApplication::CustomParameterValue special)
Construct the parameter with a parameter name and special value; affects all branches.
void SetOutputParameter(const QString &outputParamName, const QString &outNameModifier, const QString &outFileExtension="cub")
Set the output parameter for this application and it's naming convention.
void BuildParamString()
This method calculates the inputs, outputs and necessary calls to this program for the pipeline.
This class represents a parameter of some type for the PipelineApplication.
void SetPrevious(PipelineApplication *prev)
Link to the previous application in the pipeline.
bool IsSpecial()
True if the parameter value is special.
PipelineApplication(QString appName, Pipeline *pipe)
Constructs the first pipeline application.
std::vector< PipelineParameter > p_output
Output parameters.
void AddBranch(const QString &modString, NameModifierType type)
This method adds branch to this program.
bool BranchEnabled(int branch)
Check whether a branch is enabled given branch index.
bool p_continue
Continue the pipeline execution even if an error is encountered by this app.
const QString & Name() const
Get the name of this pipeline application.
const std::vector< QString > & OutputBranches() const
Get the branches this program has as output.
bool p_enabled
This application enabled?
std::vector< PipelineParameter > p_input
Input parameters.
std::vector< QString > p_paramString
Built parameter strings.
const std::vector< QString > & InputBranches() const
Get the branches this program expects as input.
bool SupportsVirtualBands()
Returns true if virtual bands are supported.
QString p_outputExtension
Output file name extension.
std::vector< QString > p_tempFiles
Actial temporary files.
QString p_name
Name of this application.
PipelineParameter & GetInputParameter(int branch)
This gets the input parameter for the specified branch.
PipelineApplication * p_previous
Previous pipeline application.
~PipelineApplication()
This is the destructor.
PipelineApplication * Next() const
This returns the next enabled pipeline application or null.
std::vector< bool > p_enableBranch
Branch enabled/disabled.
PipelineParameter(int branch, QString paramName, PipelineApplication::CustomParameterValue special)
Construct the parameter with a parameter name and special value; affects only the specified branch.
QString OutputNameModifier()
This returns this application's output name modifier.
void Disable()
This method disables this program, causing it to be ignored.
const bool & Enabled() const
Returns true if this program will be run.
void SetVirtualBands(std::vector< QString > bands)
Set the virtual bands that this application is to apply.
PipelineParameter(QString paramName)
Construct the parameter with only a parameter name; affects all branches and is not a special value.
void AddParameter(const QString &inputParamName, const QString &appParamName)
This method adds knowledge of a parameter to the application.
This class helps to call other Isis Applications in a Pipeline.
PipelineParameter(QString paramName, QString value)
Construct the parameter with a parameter name and value; affects all branches and is not special.
bool FutureOutputFileCreated()
Returns true if a future application creates output.
void EnableBranch(QString branch, bool flag)
Enable/Disable Branch given the branch name.
std::vector< QString > p_outputs
Actual output files.
const std::vector< QString > & ParamString() const
Get the parameters for running this program; one element in the vector per run.
PipelineApplication::CustomParameterValue p_special
Parameter special value.
PipelineApplication::CustomParameterValue Special()
Special value of the parameter.
PipelineParameter(int branch, QString paramName, QString paramValue)
Construct the parameter with a parameter name and value; affects only the specified branch and is not...
int p_branch
Branch this affects.
void SetInputParameter(const QString &inputParamName, bool supportsVirtualBands)
Set the input parameter for this application and whether or not this application supports the virtual...
std::vector< QString > p_inBranches
Input branches.
@ LastOutput
The very last output file. Do not use this for input parameters if it's not necessary,...
QString p_paramValue
Parameter non-special value.
NameModifierType
This is used for branches.
std::vector< QString > & GetOutputs()
This returns this application's output files. Only valid after BuildParamString is called.
bool StringStartsWith(QString from, QString compare)
String comparison helper, returns true if from starts with compare bool.
This is free and unencumbered software released into the public domain.
QString CalculateInputFile(int branch)
This method calculates the input file for the specified branch.
void Enable()
This method enables this program to be run.