diff --git a/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h b/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h index a1926380836519267d86e950f078f3d1368cc9ea..ab2ef3c0d3657d07c8b7bb9777bbbe77c7107399 100644 --- a/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h +++ b/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h @@ -152,72 +152,72 @@ public: /* Get the internal application parameter specified * if the follow flag is on, the function returns the target of proxy parameters * WARNING: this method may disappear from the API */ - Parameter* GetParameterByKey(std::string parameter, bool follow=true); + Parameter* GetParameterByKey(std::string const& parameter, bool follow=true); /* Get the internal application parameter specified * * WARNING: this method may disappear from the API */ - const Parameter* GetParameterByKey(std::string parameter, bool follow=true) const; + const Parameter* GetParameterByKey(std::string const& parameter, bool follow=true) const; /* Returns the description of a parameter */ - std::string GetParameterName(std::string paramKey); + std::string GetParameterName(std::string const& paramKey); /* Returns the description of a parameter */ - std::string GetParameterDescription(std::string paramKey); + std::string GetParameterDescription(std::string const& paramKey); /* Set the description of a parameter */ - void SetParameterDescription(std::string paramKey, std::string dec); + void SetParameterDescription(std::string const& paramKey, std::string dec); /* Enable the use of an optional parameter. Returns the previous state */ - void EnableParameter(std::string paramKey); + void EnableParameter(std::string const& paramKey); /* Disable the use of an optional parameter. Returns the previous state */ - void DisableParameter(std::string paramKey); + void DisableParameter(std::string const& paramKey); /* Return the enable state of an optional parameter */ - bool IsParameterEnabled(std::string paramKey, bool recurseParents = false) const; + bool IsParameterEnabled(std::string const& paramKey, bool recurseParents = false) const; /* Return true if the specified parameter is mandatory */ - bool IsMandatory(std::string paramKey) const; + bool IsMandatory(std::string const& paramKey) const; /* Return true if the specified parameter was set automatically in * the application */ - bool HasAutomaticValue(std::string paramKey) const; + bool HasAutomaticValue(std::string const& paramKey) const; /* Returns true if the parameter has an associated value provided externally * (not automatically computed by the application) */ - bool HasUserValue(std::string paramKey) const; + bool HasUserValue(std::string const& paramKey) const; /* If a user value was provided, clear it and update the other parameters */ - void ClearValue(std::string paramKey); + void ClearValue(std::string const& paramKey); /* Returns true if the parameter has an associated value. * This value can be an automatically computed value or default value, * or a value set externally by user */ - bool HasValue(std::string paramKey) const; + bool HasValue(std::string const& paramKey) const; /** Set HasUserValue flag of parameter with key paramKey * Note that when this function is called from DoInit, DoUpdateParameters * or DoExecute, it will always set this flag to false, because this is * the core behavior of the application. */ - void SetParameterUserValue(std::string paramKey, bool value); + void SetParameterUserValue(std::string const& paramKey, bool value); /* Return the user level of access to a parameter */ - UserLevel GetParameterUserLevel(std::string paramKey) const; + UserLevel GetParameterUserLevel(std::string const& paramKey) const; /** Get the role of the parameter */ - Role GetParameterRole(std::string paramKey) const; + Role GetParameterRole(std::string const& paramKey) const; /* Get the parameter type from its name */ - ParameterType GetParameterType(std::string paramKey) const; + ParameterType GetParameterType(std::string const& paramKey) const; /* Returns the description of a parameter */ - std::vector<std::string> GetChoiceKeys(std::string paramKey); + std::vector<std::string> GetChoiceKeys(std::string const& paramKey); /* Returns the description of a parameter */ - std::vector<std::string> GetChoiceNames(std::string paramKey); + std::vector<std::string> GetChoiceNames(std::string const& paramKey); /* Set an integer value * @@ -228,14 +228,14 @@ public: * \li ParameterType_Radius * \li ParameterType_Choice */ - void SetParameterInt(std::string parameter, int value, bool hasUserValueFlag = true); + void SetParameterInt(std::string const& parameter, int value, bool hasUserValueFlag = true); /* Set a floating value * * Can be called for types : * \li ParameterType_Float */ - void SetParameterFloat(std::string parameter, float value, bool hasUserValueFlag = true); + void SetParameterFloat(std::string const& parameter, float value, bool hasUserValueFlag = true); /* Set a string value * @@ -246,7 +246,7 @@ public: * \li ParameterType_StringList * \li ParameterType_ListView */ - void SetParameterString(std::string parameter, std::string value, bool hasUserValueFlag = true); + void SetParameterString(std::string const& parameter, std::string value, bool hasUserValueFlag = true); /* Set a string value * @@ -266,7 +266,7 @@ public: * \li ParameterType_OutputImageParameter * \li ParameterType_OutputVectorDataParameter */ - void SetParameterStringList(std::string parameter, std::vector<std::string> values, bool hasUserValueFlag = true); + void SetParameterStringList(std::string const& parameter, std::vector<std::string> values, bool hasUserValueFlag = true); /** Checks if the application is ready to be executed. It checks that there * is no missing parameter @@ -294,7 +294,7 @@ public: * \li ParameterType_Radius * \li ParameterType_Choice */ - void SetDefaultParameterInt(std::string parameter, int value); + void SetDefaultParameterInt(std::string const& parameter, int value); /* Get the default integer value of a parameter * @@ -304,7 +304,7 @@ public: * \li ParameterType_Radius * \li ParameterType_Choice */ - int GetDefaultParameterInt(std::string parameter); + int GetDefaultParameterInt(std::string const& parameter); /* Set a default floating value, must be used in the * DoInit when setting a value by default @@ -313,28 +313,28 @@ public: * Can be called for types : * \li ParameterType_Float */ - void SetDefaultParameterFloat(std::string parameter, float value); + void SetDefaultParameterFloat(std::string const& parameter, float value); /* Get the default floating value of a parameter * * Can be called for types : * \li ParameterType_Float */ - float GetDefaultParameterFloat(std::string parameter); + float GetDefaultParameterFloat(std::string const& parameter); /** Set a default pixel type for an output image parameter * * \param[in] parameter Name of the output image parameter * \param[in] type Default pixel type */ - void SetDefaultOutputPixelType(std::string parameter, ImagePixelType type); + void SetDefaultOutputPixelType(std::string const& parameter, ImagePixelType type); /** Set a default complex pixel type for an output complex image parameter * * \param[in] parameter Name of the output complex image parameter * \param[in] type Default complex pixel type */ - void SetDefaultOutputComplexPixelType(std::string parameter, ComplexImagePixelType type); + void SetDefaultOutputComplexPixelType(std::string const& parameter, ComplexImagePixelType type); /* Set a minimum int value, must used in the * DoInit when setting a value by default @@ -343,7 +343,7 @@ public: * Can be called for types : * \li ParameterType_Int */ - void SetMinimumParameterIntValue(std::string parameter, int value); + void SetMinimumParameterIntValue(std::string const& parameter, int value); /* Set a maximum int value, must used in the * DoInit when setting a value by default @@ -352,7 +352,7 @@ public: * Can be called for types : * \li ParameterType_Int */ - void SetMaximumParameterIntValue(std::string parameter, int value); + void SetMaximumParameterIntValue(std::string const& parameter, int value); /* Set a minimum int value, must used in the * DoInit when setting a value by default @@ -361,7 +361,7 @@ public: * Can be called for types : * \li ParameterType_Float */ - void SetMinimumParameterFloatValue(std::string parameter, float value); + void SetMinimumParameterFloatValue(std::string const& parameter, float value); /* Set a maximum int value, must used in the * DoInit when setting a value by default @@ -370,7 +370,7 @@ public: * Can be called for types : * \li ParameterType_Float */ - void SetMaximumParameterFloatValue(std::string parameter, float value); + void SetMaximumParameterFloatValue(std::string const& parameter, float value); /** @@ -380,7 +380,7 @@ public: * Can be called for types: * \li ParameterType_ListView */ - void SetListViewSingleSelectionMode(std::string parameter, bool status); + void SetListViewSingleSelectionMode(std::string const& parameter, bool status); /** * True if the parameter is a list view and is in single selection mode @@ -395,21 +395,21 @@ public: * Can be called for types : * \li ParameterType_OutputImage */ - void SetParameterOutputImage(std::string parameter, FloatVectorImageType* value); + void SetParameterOutputImage(std::string const& parameter, FloatVectorImageType* value); /* Set the pixel type in which the image will be saved * * Can be called for types : * \li ParameterType_OutputImage */ - void SetParameterOutputImagePixelType(std::string parameter, ImagePixelType pixelType); + void SetParameterOutputImagePixelType(std::string const& parameter, ImagePixelType pixelType); /* Set an output vector data value * * Can be called for types : * \li ParameterType_OutputVectorData */ - void SetParameterOutputVectorData(std::string parameter, VectorDataType* value); + void SetParameterOutputVectorData(std::string const& parameter, VectorDataType* value); /* Get an integer parameter value * @@ -420,14 +420,14 @@ public: * \li ParameterType_Radius * \li ParameterType_Choice */ - int GetParameterInt(std::string parameter) const; + int GetParameterInt(std::string const& parameter) const; /* Get a floating parameter value * * Can be called for types : * \li ParameterType_Float */ - float GetParameterFloat(std::string parameter) const; + float GetParameterFloat(std::string const& parameter) const; /* Get a string parameter value * @@ -441,7 +441,7 @@ public: * \li ParameterType_OutputImage * \li ParameterType_OutputVectorData */ - std::string GetParameterString(std::string parameter) const; + std::string GetParameterString(std::string const& parameter) const; /* Get a string list parameter value * @@ -470,7 +470,7 @@ public: * \throw itk::Exception if parameter is not found or not an * InputImageParameter */ - void SetParameterInputImage(std::string parameter, ImageBaseType * inputImage); + void SetParameterInputImage(std::string const& parameter, ImageBaseType * inputImage); /** * Get the output image parameter as an ImageBase * instead @@ -481,7 +481,7 @@ public: * \throw itk::Exception if parameter is not found or not an * OutputImageParameter */ - ImageBaseType * GetParameterOutputImage(std::string parameter); + ImageBaseType * GetParameterOutputImage(std::string const& parameter); /** * Add an image to an InputImageList parameter as an ImageBase @@ -492,7 +492,7 @@ public: * \throw itk::Exception if parameter is not found or not an * InputImageList parameter */ - void AddImageToParameterInputImageList(std::string parameter, ImageBaseType * img); + void AddImageToParameterInputImageList(std::string const& parameter, ImageBaseType * img); /** * Set the nth image of an InputImageList parameter as an ImageBase pointer @@ -504,7 +504,7 @@ public: * \throw itk::Exception if parameter is not found or not an * InputImageList parameter or if id is out of bounds */ - void SetNthParameterInputImageList(std::string parameter, const unsigned int &id, ImageBaseType * img); + void SetNthParameterInputImageList(std::string const& parameter, const unsigned int &id, ImageBaseType * img); /** * Add a value to a parameter list as a string @@ -517,7 +517,7 @@ public: * \throw itk::Exception if parameter is not found or not an * InputImageList parameter */ - void AddParameterStringList(std::string parameter, const std::string & str); + void AddParameterStringList(std::string const& parameter, const std::string & str); /** * Set the nth value of a parameter list as a string. @@ -531,7 +531,7 @@ public: * \throw itk::Exception if parameter is not found or not an * InputImageList parameter or if id is out of bounds */ - void SetNthParameterStringList(std::string parameter, const unsigned int &id, const std::string& str); + void SetNthParameterStringList(std::string const& parameter, const unsigned int &id, const std::string& str); /** @@ -541,7 +541,7 @@ public: * \throw itk::Exception if parameter is not found or not an * InputImageList parameter */ - void ClearParameterInputImageList(std::string parameter); + void ClearParameterInputImageList(std::string const& parameter); /** * Get the number of images in an InputImageList parameter. @@ -550,7 +550,7 @@ public: * \throw itk::Exception if parameter is not found or not an * InputImageList parameter */ - unsigned int GetNumberOfElementsInParameterInputImageList(std::string parameter); + unsigned int GetNumberOfElementsInParameterInputImageList(std::string const& parameter); /* Get an image value @@ -558,35 +558,35 @@ public: * Can be called for types : * \li ParameterType_InputImage */ - FloatVectorImageType* GetParameterImage(std::string parameter); - - UInt8ImageType * GetParameterUInt8Image(std::string); - UInt16ImageType * GetParameterUInt16Image(std::string); - Int16ImageType * GetParameterInt16Image(std::string); - UInt32ImageType * GetParameterUInt32Image(std::string); - Int32ImageType * GetParameterInt32Image(std::string); - FloatImageType * GetParameterFloatImage(std::string); - DoubleImageType * GetParameterDoubleImage(std::string); - UInt8VectorImageType * GetParameterUInt8VectorImage(std::string); - UInt16VectorImageType * GetParameterUInt16VectorImage(std::string); - Int16VectorImageType * GetParameterInt16VectorImage(std::string); - UInt32VectorImageType * GetParameterUInt32VectorImage(std::string); - Int32VectorImageType * GetParameterInt32VectorImage(std::string); - FloatVectorImageType * GetParameterFloatVectorImage(std::string); - DoubleVectorImageType * GetParameterDoubleVectorImage(std::string); - UInt8RGBImageType * GetParameterUInt8RGBImage(std::string); - UInt8RGBAImageType * GetParameterUInt8RGBAImage(std::string); + FloatVectorImageType* GetParameterImage(std::string const& parameter); + + UInt8ImageType * GetParameterUInt8Image(std::string const&); + UInt16ImageType * GetParameterUInt16Image(std::string const&); + Int16ImageType * GetParameterInt16Image(std::string const&); + UInt32ImageType * GetParameterUInt32Image(std::string const&); + Int32ImageType * GetParameterInt32Image(std::string const&); + FloatImageType * GetParameterFloatImage(std::string const&); + DoubleImageType * GetParameterDoubleImage(std::string const&); + UInt8VectorImageType * GetParameterUInt8VectorImage(std::string const&); + UInt16VectorImageType * GetParameterUInt16VectorImage(std::string const&); + Int16VectorImageType * GetParameterInt16VectorImage(std::string const&); + UInt32VectorImageType * GetParameterUInt32VectorImage(std::string const&); + Int32VectorImageType * GetParameterInt32VectorImage(std::string const&); + FloatVectorImageType * GetParameterFloatVectorImage(std::string const&); + DoubleVectorImageType * GetParameterDoubleVectorImage(std::string const&); + UInt8RGBImageType * GetParameterUInt8RGBImage(std::string const&); + UInt8RGBAImageType * GetParameterUInt8RGBAImage(std::string const&); // Complex image - ComplexInt16ImageType * GetParameterComplexInt16Image(std::string); - ComplexInt32ImageType * GetParameterComplexInt32Image(std::string); - ComplexFloatImageType * GetParameterComplexFloatImage(std::string); - ComplexDoubleImageType * GetParameterComplexDoubleImage(std::string); + ComplexInt16ImageType * GetParameterComplexInt16Image(std::string const&); + ComplexInt32ImageType * GetParameterComplexInt32Image(std::string const&); + ComplexFloatImageType * GetParameterComplexFloatImage(std::string const&); + ComplexDoubleImageType * GetParameterComplexDoubleImage(std::string const&); - ComplexInt16VectorImageType * GetParameterComplexInt16VectorImage(std::string); - ComplexInt32VectorImageType * GetParameterComplexInt32VectorImage(std::string); - ComplexFloatVectorImageType * GetParameterComplexFloatVectorImage(std::string); - ComplexDoubleVectorImageType * GetParameterComplexDoubleVectorImage(std::string); + ComplexInt16VectorImageType * GetParameterComplexInt16VectorImage(std::string const&); + ComplexInt32VectorImageType * GetParameterComplexInt32VectorImage(std::string const&); + ComplexFloatVectorImageType * GetParameterComplexFloatVectorImage(std::string const&); + ComplexDoubleVectorImageType * GetParameterComplexDoubleVectorImage(std::string const&); /* Get an image list value @@ -594,7 +594,7 @@ public: * Can be called for types : * \li ParameterType_InputImageList */ - FloatVectorImageListType* GetParameterImageList(std::string parameter); + FloatVectorImageListType* GetParameterImageList(std::string const& parameter); /* GetParameterVectorData * @@ -602,7 +602,7 @@ public: * \li ParameterType_InputVectorData */ - VectorDataType* GetParameterVectorData(std::string parameter); + VectorDataType* GetParameterVectorData(std::string const& parameter); /* GetParameteVetorDataList * @@ -610,7 +610,7 @@ public: * \li ParameterType_InputVectorDatalist */ - VectorDataListType* GetParameterVectorDataList(std::string parameter); + VectorDataListType* GetParameterVectorDataList(std::string const& parameter); /* Get the parameter as a std::string * @@ -628,7 +628,7 @@ public: * \li ParameterType_OutputImage * \li ParameterType_OutputVectorData */ - std::string GetParameterAsString(std::string paramKey); + std::string GetParameterAsString(std::string const& paramKey); /* Get the list of all parameters */ @@ -639,7 +639,7 @@ public: * Can be called for types : * \li ParameterType_OutputImage */ - ImagePixelType GetParameterOutputImagePixelType(std::string parameter); + ImagePixelType GetParameterOutputImagePixelType(std::string const& parameter); void SetParameterList(ParameterGroup::Pointer paramGroup) { @@ -797,43 +797,43 @@ protected: void AddProcess(itk::ProcessObject* object, std::string description); /** Add a new choice value to an existing choice parameter */ - void AddChoice(std::string paramKey, std::string paramName); + void AddChoice(std::string const& paramKey, std::string const& paramName); /** Add a new parameter to the parameter group * the parent key of paramKey can be the path to a parameter group * or the path to a choice value */ - void AddParameter(ParameterType type, std::string paramKey, std::string paramName); + void AddParameter(ParameterType type, std::string const& paramKey, std::string const& paramName); /** Add a parameterRAM method with no parameter*/ - void AddRAMParameter(std::string paramKey="ram"); + void AddRAMParameter(std::string const& paramKey="ram"); /** Add a parameterRAM method with parameter*/ - void AddRAMParameter(std::string paramKey, std::string paramName, unsigned int defaultValue); + void AddRAMParameter(std::string const& paramKey, std::string const& paramName, unsigned int defaultValue); /** Add a parameterRAND method with no parameter*/ - void AddRANDParameter(std::string paramKey="rand"); + void AddRANDParameter(std::string const& paramKey="rand"); /** Add a parameterRAND method with parameter * by default seed initialization is based on time value*/ - void AddRANDParameter(std::string paramKey, std::string paramName, unsigned int defaultValue); + void AddRANDParameter(std::string const& paramKey, std::string const& paramName, unsigned int defaultValue); /** Remove the items added to the ListWidget */ - void ClearChoices(std::string key); + void ClearChoices(std::string const& key); /** Get Items selected in the ListView Parameter*/ - std::vector<int> GetSelectedItems(std::string paramKey); + std::vector<int> GetSelectedItems(std::string const& paramKey); /** Declare a parameter as mandatory */ - void MandatoryOn(std::string paramKey); + void MandatoryOn(std::string const& paramKey); /** Declare a parameter as NOT mandatory (default state) */ - void MandatoryOff(std::string paramKey); + void MandatoryOff(std::string const& paramKey); /* Set the user level of access to a parameter */ - void SetParameterUserLevel(std::string paramKey, UserLevel level); + void SetParameterUserLevel(std::string const& paramKey, UserLevel level); /* Set the parameter role (input/output) */ - void SetParameterRole(std::string paramKey, Role role); + void SetParameterRole(std::string const& paramKey, Role role); /* Get an image value * @@ -841,13 +841,13 @@ protected: * \li ParameterType_InputImage */ template <class TImageType> - TImageType* GetParameterImage(std::string parameter); + TImageType* GetParameterImage(std::string const& parameter); /** Declare a parameter as having an automatic value */ - void AutomaticValueOn(std::string paramKey); + void AutomaticValueOn(std::string const& paramKey); /** Declare a parameter as NOT having an automatic value */ - void AutomaticValueOff(std::string paramKey); + void AutomaticValueOff(std::string const& paramKey); /* Set an output image value * @@ -855,7 +855,7 @@ protected: * \li ParameterType_OutputImage */ template <class TImageType> - void SetParameterOutputImage(std::string parameter, TImageType* value); + void SetParameterOutputImage(std::string const& parameter, TImageType* value); private: /* Implement this method to add parameters */ @@ -937,77 +937,77 @@ namespace otb namespace Wrapper { -extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt8VectorImageType* Application::GetParameterImage<UInt8VectorImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE Int16VectorImageType* Application::GetParameterImage<Int16VectorImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt16VectorImageType* Application::GetParameterImage<UInt16VectorImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE Int32VectorImageType* Application::GetParameterImage<Int32VectorImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt32VectorImageType* Application::GetParameterImage<UInt32VectorImageType>(std::string); +extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt8VectorImageType* Application::GetParameterImage<UInt8VectorImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE Int16VectorImageType* Application::GetParameterImage<Int16VectorImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt16VectorImageType* Application::GetParameterImage<UInt16VectorImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE Int32VectorImageType* Application::GetParameterImage<Int32VectorImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt32VectorImageType* Application::GetParameterImage<UInt32VectorImageType>(std::string const&); -extern template OTBApplicationEngine_EXPORT_TEMPLATE FloatVectorImageType* Application::GetParameterImage<FloatVectorImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE DoubleVectorImageType* Application::GetParameterImage<DoubleVectorImageType>(std::string); +extern template OTBApplicationEngine_EXPORT_TEMPLATE FloatVectorImageType* Application::GetParameterImage<FloatVectorImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE DoubleVectorImageType* Application::GetParameterImage<DoubleVectorImageType>(std::string const&); -extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexInt16VectorImageType* Application::GetParameterImage<ComplexInt16VectorImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexInt32VectorImageType* Application::GetParameterImage<ComplexInt32VectorImageType>(std::string); +extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexInt16VectorImageType* Application::GetParameterImage<ComplexInt16VectorImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexInt32VectorImageType* Application::GetParameterImage<ComplexInt32VectorImageType>(std::string const&); -extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexFloatVectorImageType* Application::GetParameterImage<ComplexFloatVectorImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexDoubleVectorImageType* Application::GetParameterImage<ComplexDoubleVectorImageType>(std::string); +extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexFloatVectorImageType* Application::GetParameterImage<ComplexFloatVectorImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexDoubleVectorImageType* Application::GetParameterImage<ComplexDoubleVectorImageType>(std::string const&); -extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt8RGBImageType* Application::GetParameterImage<UInt8RGBImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt8RGBAImageType* Application::GetParameterImage<UInt8RGBAImageType>(std::string); +extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt8RGBImageType* Application::GetParameterImage<UInt8RGBImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt8RGBAImageType* Application::GetParameterImage<UInt8RGBAImageType>(std::string const&); -extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt8ImageType* Application::GetParameterImage<UInt8ImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE Int16ImageType* Application::GetParameterImage<Int16ImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt16ImageType* Application::GetParameterImage<UInt16ImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE Int32ImageType* Application::GetParameterImage<Int32ImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt32ImageType* Application::GetParameterImage<UInt32ImageType>(std::string); +extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt8ImageType* Application::GetParameterImage<UInt8ImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE Int16ImageType* Application::GetParameterImage<Int16ImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt16ImageType* Application::GetParameterImage<UInt16ImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE Int32ImageType* Application::GetParameterImage<Int32ImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt32ImageType* Application::GetParameterImage<UInt32ImageType>(std::string const&); -extern template OTBApplicationEngine_EXPORT_TEMPLATE FloatImageType* Application::GetParameterImage<FloatImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE DoubleImageType* Application::GetParameterImage<DoubleImageType>(std::string); +extern template OTBApplicationEngine_EXPORT_TEMPLATE FloatImageType* Application::GetParameterImage<FloatImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE DoubleImageType* Application::GetParameterImage<DoubleImageType>(std::string const&); -extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexInt16ImageType* Application::GetParameterImage<ComplexInt16ImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexInt32ImageType* Application::GetParameterImage<ComplexInt32ImageType>(std::string); +extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexInt16ImageType* Application::GetParameterImage<ComplexInt16ImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexInt32ImageType* Application::GetParameterImage<ComplexInt32ImageType>(std::string const&); -extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexFloatImageType* Application::GetParameterImage<ComplexFloatImageType>(std::string); -extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexDoubleImageType* Application::GetParameterImage<ComplexDoubleImageType>(std::string); +extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexFloatImageType* Application::GetParameterImage<ComplexFloatImageType>(std::string const&); +extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexDoubleImageType* Application::GetParameterImage<ComplexDoubleImageType>(std::string const&); // -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt8VectorImageType>(std::string, UInt8VectorImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<Int16VectorImageType>(std::string, Int16VectorImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt16VectorImageType>(std::string, UInt16VectorImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<Int32VectorImageType>(std::string, Int32VectorImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt32VectorImageType>(std::string, UInt32VectorImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt8VectorImageType>(std::string const&, UInt8VectorImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<Int16VectorImageType>(std::string const&, Int16VectorImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt16VectorImageType>(std::string const&, UInt16VectorImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<Int32VectorImageType>(std::string const&, Int32VectorImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt32VectorImageType>(std::string const&, UInt32VectorImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<FloatVectorImageType>(std::string, FloatVectorImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<DoubleVectorImageType>(std::string, DoubleVectorImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<FloatVectorImageType>(std::string const&, FloatVectorImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<DoubleVectorImageType>(std::string const&, DoubleVectorImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt16VectorImageType>(std::string, +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt16VectorImageType>(std::string const&, ComplexInt16VectorImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt32VectorImageType>(std::string, +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt32VectorImageType>(std::string const&, ComplexInt32VectorImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexFloatVectorImageType>(std::string, +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexFloatVectorImageType>(std::string const&, ComplexFloatVectorImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexDoubleVectorImageType>(std::string, +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexDoubleVectorImageType>(std::string const&, ComplexDoubleVectorImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt8RGBImageType>(std::string, UInt8RGBImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt8RGBAImageType>(std::string, UInt8RGBAImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt8RGBImageType>(std::string const&, UInt8RGBImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt8RGBAImageType>(std::string const&, UInt8RGBAImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt8ImageType>(std::string, UInt8ImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<Int16ImageType>(std::string, Int16ImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt16ImageType>(std::string, UInt16ImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<Int32ImageType>(std::string, Int32ImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt32ImageType>(std::string, UInt32ImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt8ImageType>(std::string const&, UInt8ImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<Int16ImageType>(std::string const&, Int16ImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt16ImageType>(std::string const&, UInt16ImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<Int32ImageType>(std::string const&, Int32ImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt32ImageType>(std::string const&, UInt32ImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<FloatImageType>(std::string, FloatImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<DoubleImageType>(std::string, DoubleImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<FloatImageType>(std::string const&, FloatImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<DoubleImageType>(std::string const&, DoubleImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt16ImageType>(std::string, ComplexInt16ImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt32ImageType>(std::string, ComplexInt32ImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt16ImageType>(std::string const&, ComplexInt16ImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt32ImageType>(std::string const&, ComplexInt32ImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexFloatImageType>(std::string, ComplexFloatImageType*); -extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexDoubleImageType>(std::string, ComplexDoubleImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexFloatImageType>(std::string const&, ComplexFloatImageType*); +extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexDoubleImageType>(std::string const&, ComplexDoubleImageType*); } // namespace Wrapper } // namespace otb diff --git a/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.hxx b/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.hxx index 33330cd2418fa7c81e506806d6a43b3d9d583f23..104b4a99a5e682295aa3c17373ce2ac2f1d53404 100644 --- a/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.hxx +++ b/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.hxx @@ -36,7 +36,7 @@ namespace Wrapper template <class TImageType> TImageType* Application -::GetParameterImage(std::string parameter) +::GetParameterImage(std::string const& parameter) { typename TImageType::Pointer ret; @@ -57,7 +57,7 @@ Application template <class TImageType> void Application -::SetParameterOutputImage(std::string parameter, TImageType* value) +::SetParameterOutputImage(std::string const& parameter, TImageType* value) { Parameter* param = GetParameterByKey(parameter); diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx index 7d5cfe93b7a1f29482afe3b313ecb28916998f78..95f4f794430447c6697da6b9245973c7f515d1e8 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx @@ -75,77 +75,77 @@ namespace Wrapper { -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt8VectorImageType* Application::GetParameterImage<UInt8VectorImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE Int16VectorImageType* Application::GetParameterImage<Int16VectorImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt16VectorImageType* Application::GetParameterImage<UInt16VectorImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE Int32VectorImageType* Application::GetParameterImage<Int32VectorImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt32VectorImageType* Application::GetParameterImage<UInt32VectorImageType>(std::string); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt8VectorImageType* Application::GetParameterImage<UInt8VectorImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE Int16VectorImageType* Application::GetParameterImage<Int16VectorImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt16VectorImageType* Application::GetParameterImage<UInt16VectorImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE Int32VectorImageType* Application::GetParameterImage<Int32VectorImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt32VectorImageType* Application::GetParameterImage<UInt32VectorImageType>(std::string const&); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE FloatVectorImageType* Application::GetParameterImage<FloatVectorImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE DoubleVectorImageType* Application::GetParameterImage<DoubleVectorImageType>(std::string); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE FloatVectorImageType* Application::GetParameterImage<FloatVectorImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE DoubleVectorImageType* Application::GetParameterImage<DoubleVectorImageType>(std::string const&); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexInt16VectorImageType* Application::GetParameterImage<ComplexInt16VectorImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexInt32VectorImageType* Application::GetParameterImage<ComplexInt32VectorImageType>(std::string); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexInt16VectorImageType* Application::GetParameterImage<ComplexInt16VectorImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexInt32VectorImageType* Application::GetParameterImage<ComplexInt32VectorImageType>(std::string const&); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexFloatVectorImageType* Application::GetParameterImage<ComplexFloatVectorImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexDoubleVectorImageType* Application::GetParameterImage<ComplexDoubleVectorImageType>(std::string); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexFloatVectorImageType* Application::GetParameterImage<ComplexFloatVectorImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexDoubleVectorImageType* Application::GetParameterImage<ComplexDoubleVectorImageType>(std::string const&); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt8RGBImageType* Application::GetParameterImage<UInt8RGBImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt8RGBAImageType* Application::GetParameterImage<UInt8RGBAImageType>(std::string); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt8RGBImageType* Application::GetParameterImage<UInt8RGBImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt8RGBAImageType* Application::GetParameterImage<UInt8RGBAImageType>(std::string const&); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt8ImageType* Application::GetParameterImage<UInt8ImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE Int16ImageType* Application::GetParameterImage<Int16ImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt16ImageType* Application::GetParameterImage<UInt16ImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE Int32ImageType* Application::GetParameterImage<Int32ImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt32ImageType* Application::GetParameterImage<UInt32ImageType>(std::string); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt8ImageType* Application::GetParameterImage<UInt8ImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE Int16ImageType* Application::GetParameterImage<Int16ImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt16ImageType* Application::GetParameterImage<UInt16ImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE Int32ImageType* Application::GetParameterImage<Int32ImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE UInt32ImageType* Application::GetParameterImage<UInt32ImageType>(std::string const&); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE FloatImageType* Application::GetParameterImage<FloatImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE DoubleImageType* Application::GetParameterImage<DoubleImageType>(std::string); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE FloatImageType* Application::GetParameterImage<FloatImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE DoubleImageType* Application::GetParameterImage<DoubleImageType>(std::string const&); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexInt16ImageType* Application::GetParameterImage<ComplexInt16ImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexInt32ImageType* Application::GetParameterImage<ComplexInt32ImageType>(std::string); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexInt16ImageType* Application::GetParameterImage<ComplexInt16ImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexInt32ImageType* Application::GetParameterImage<ComplexInt32ImageType>(std::string const&); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexFloatImageType* Application::GetParameterImage<ComplexFloatImageType>(std::string); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexDoubleImageType* Application::GetParameterImage<ComplexDoubleImageType>(std::string); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexFloatImageType* Application::GetParameterImage<ComplexFloatImageType>(std::string const&); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE ComplexDoubleImageType* Application::GetParameterImage<ComplexDoubleImageType>(std::string const&); // -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt8VectorImageType>(std::string, UInt8VectorImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<Int16VectorImageType>(std::string, Int16VectorImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt16VectorImageType>(std::string, UInt16VectorImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<Int32VectorImageType>(std::string, Int32VectorImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt32VectorImageType>(std::string, UInt32VectorImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt8VectorImageType>(std::string const&, UInt8VectorImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<Int16VectorImageType>(std::string const&, Int16VectorImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt16VectorImageType>(std::string const&, UInt16VectorImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<Int32VectorImageType>(std::string const&, Int32VectorImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt32VectorImageType>(std::string const&, UInt32VectorImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<FloatVectorImageType>(std::string, FloatVectorImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<DoubleVectorImageType>(std::string, DoubleVectorImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<FloatVectorImageType>(std::string const&, FloatVectorImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<DoubleVectorImageType>(std::string const&, DoubleVectorImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt16VectorImageType>(std::string, +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt16VectorImageType>(std::string const&, ComplexInt16VectorImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt32VectorImageType>(std::string, +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt32VectorImageType>(std::string const&, ComplexInt32VectorImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexFloatVectorImageType>(std::string, +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexFloatVectorImageType>(std::string const&, ComplexFloatVectorImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexDoubleVectorImageType>(std::string, +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexDoubleVectorImageType>(std::string const&, ComplexDoubleVectorImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt8RGBImageType>(std::string, UInt8RGBImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt8RGBAImageType>(std::string, UInt8RGBAImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt8RGBImageType>(std::string const&, UInt8RGBImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt8RGBAImageType>(std::string const&, UInt8RGBAImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt8ImageType>(std::string, UInt8ImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<Int16ImageType>(std::string, Int16ImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt16ImageType>(std::string, UInt16ImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<Int32ImageType>(std::string, Int32ImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt32ImageType>(std::string, UInt32ImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt8ImageType>(std::string const&, UInt8ImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<Int16ImageType>(std::string const&, Int16ImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt16ImageType>(std::string const&, UInt16ImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<Int32ImageType>(std::string const&, Int32ImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<UInt32ImageType>(std::string const&, UInt32ImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<FloatImageType>(std::string, FloatImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<DoubleImageType>(std::string, DoubleImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<FloatImageType>(std::string const&, FloatImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<DoubleImageType>(std::string const&, DoubleImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt16ImageType>(std::string, ComplexInt16ImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt32ImageType>(std::string, ComplexInt32ImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt16ImageType>(std::string const&, ComplexInt16ImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt32ImageType>(std::string const&, ComplexInt32ImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexFloatImageType>(std::string, ComplexFloatImageType*); -template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexDoubleImageType>(std::string, ComplexDoubleImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexFloatImageType>(std::string const&, ComplexFloatImageType*); +template OTBApplicationEngine_EXPORT_EXPLICIT_TEMPLATE void Application::SetParameterOutputImage<ComplexDoubleImageType>(std::string const&, ComplexDoubleImageType*); void Application::SetName( const std::string & name ) @@ -383,36 +383,36 @@ ParameterGroup* Application::GetParameterList() return m_ParameterList; } -Parameter* Application::GetParameterByKey(std::string name, bool follow) +Parameter* Application::GetParameterByKey(std::string const& name, bool follow) { return GetParameterList()->GetParameterByKey(name, follow); } -void Application::SetParameterInt(std::string key, int value, bool hasUserValueFlag) +void Application::SetParameterInt(std::string const& key, int value, bool hasUserValueFlag) { GetParameterByKey(key)->FromInt(value); this->SetParameterUserValue(key, hasUserValueFlag); } -void Application::SetParameterFloat(std::string key, float value, bool hasUserValueFlag) +void Application::SetParameterFloat(std::string const& key, float value, bool hasUserValueFlag) { GetParameterByKey(key)->FromFloat(value); this->SetParameterUserValue(key, hasUserValueFlag); } -void Application::SetParameterString(std::string parameter, std::string value, bool hasUserValueFlag) +void Application::SetParameterString(std::string const& parameter, std::string value, bool hasUserValueFlag) { GetParameterByKey(parameter)->FromString(value); this->SetParameterUserValue(parameter, hasUserValueFlag); } -void Application::SetParameterStringList(std::string key, std::vector<std::string> values, bool hasUserValueFlag) +void Application::SetParameterStringList(std::string const& key, std::vector<std::string> values, bool hasUserValueFlag) { GetParameterByKey(key)->FromStringList(values); this->SetParameterUserValue(key, hasUserValueFlag); } -void Application::SetParameterUserValue(std::string paramKey, bool value) +void Application::SetParameterUserValue(std::string const& paramKey, bool value) { /** UserValue is set/unset parameter must be active. Can't set the m_Active flg in Parameter::SetUserValue() instead of @@ -429,7 +429,7 @@ void Application::SetParameterUserValue(std::string paramKey, bool value) } } -const Parameter* Application::GetParameterByKey(std::string name, bool follow) const +const Parameter* Application::GetParameterByKey(std::string const& name, bool follow) const { // GetParameterList is non const... Application* _this = const_cast<Application*>(this); @@ -942,36 +942,36 @@ Application::Stop() } /* Enable the use of an optional parameter. Returns the previous state */ -void Application::EnableParameter(std::string paramKey) +void Application::EnableParameter(std::string const& paramKey) { Parameter* param = GetParameterByKey(paramKey); param->SetActive(true); } /* Disable the use of an optional parameter. Returns the previous state */ -void Application::DisableParameter(std::string paramKey) +void Application::DisableParameter(std::string const& paramKey) { GetParameterByKey(paramKey)->SetActive(false); } /* Return the enable state of an optional parameter */ -bool Application::IsParameterEnabled(std::string paramKey, bool recurseParents) const +bool Application::IsParameterEnabled(std::string const& paramKey, bool recurseParents) const { return GetParameterByKey(paramKey)->GetActive(recurseParents); } /* Return true if the specified parameter is mandatory */ -bool Application::IsMandatory(std::string paramKey) const +bool Application::IsMandatory(std::string const& paramKey) const { return GetParameterByKey(paramKey)->GetMandatory(); } -void Application::MandatoryOn(std::string paramKey) +void Application::MandatoryOn(std::string const& paramKey) { GetParameterByKey(paramKey)->SetMandatory(true); } -void Application::MandatoryOff(std::string paramKey) +void Application::MandatoryOff(std::string const& paramKey) { GetParameterByKey(paramKey)->SetMandatory(false); } @@ -979,30 +979,30 @@ void Application::MandatoryOff(std::string paramKey) /* Return true if the specified parameter was set automatically in the * application */ -bool Application::HasAutomaticValue(std::string paramKey) const +bool Application::HasAutomaticValue(std::string const& paramKey) const { return GetParameterByKey(paramKey)->GetAutomaticValue(); } -void Application::AutomaticValueOn(std::string paramKey) +void Application::AutomaticValueOn(std::string const& paramKey) { GetParameterByKey(paramKey)->SetAutomaticValue(true); } -void Application::AutomaticValueOff(std::string paramKey) +void Application::AutomaticValueOff(std::string const& paramKey) { GetParameterByKey(paramKey)->SetAutomaticValue(false); } /* Returns true if the parameter has an associated value provided externally * (not automatically computed by the application) */ -bool Application::HasUserValue(std::string paramKey) const +bool Application::HasUserValue(std::string const& paramKey) const { return GetParameterByKey(paramKey)->HasUserValue(); } /* If a user value was provided clear it and update the other parameters */ -void Application::ClearValue(std::string paramKey) +void Application::ClearValue(std::string const& paramKey) { GetParameterByKey(paramKey)->ClearValue(); } @@ -1010,37 +1010,37 @@ void Application::ClearValue(std::string paramKey) /* Returns true if the parameter has an associated value. * This value can be an automatically computed value or default value, * or a value set externally by user */ -bool Application::HasValue(std::string paramKey) const +bool Application::HasValue(std::string const& paramKey) const { return GetParameterByKey(paramKey)->HasValue(); } /* Return the user level of access to a parameter */ -UserLevel Application::GetParameterUserLevel(std::string paramKey) const +UserLevel Application::GetParameterUserLevel(std::string const& paramKey) const { return GetParameterByKey(paramKey)->GetUserLevel(); } /* Return the role (input/output) of a parameter */ -Role Application::GetParameterRole(std::string paramKey) const +Role Application::GetParameterRole(std::string const& paramKey) const { return GetParameterByKey(paramKey)->GetRole(); } /* Return the role (input/output) of a parameter */ -void Application::SetParameterRole(std::string paramKey, Role role) +void Application::SetParameterRole(std::string const& paramKey, Role role) { GetParameterByKey(paramKey)->SetRole(role); } /* Get the parameter type from its name */ -ParameterType Application::GetParameterType(std::string key) const +ParameterType Application::GetParameterType(std::string const& key) const { return GetParameterByKey(key)->GetType(); } -std::vector<std::string> Application::GetChoiceKeys(std::string name) +std::vector<std::string> Application::GetChoiceKeys(std::string const& name) { Parameter* param = GetParameterByKey(name); if (dynamic_cast<ChoiceParameter*>(param)) @@ -1056,7 +1056,7 @@ std::vector<std::string> Application::GetChoiceKeys(std::string name) itkExceptionMacro(<< name << " is not a choice parameter"); } -std::vector<std::string> Application::GetChoiceNames(std::string name) +std::vector<std::string> Application::GetChoiceNames(std::string const& name) { Parameter* param = GetParameterByKey(name); if (dynamic_cast<ChoiceParameter*>(param)) @@ -1073,7 +1073,7 @@ std::vector<std::string> Application::GetChoiceNames(std::string name) } -void Application::SetDefaultParameterInt(std::string parameter, int value) +void Application::SetDefaultParameterInt(std::string const& parameter, int value) { Parameter* param = GetParameterByKey(parameter); bool hasUserValue = param->HasUserValue(); @@ -1104,7 +1104,7 @@ void Application::SetDefaultParameterInt(std::string parameter, int value) } } -int Application::GetDefaultParameterInt(std::string parameter) +int Application::GetDefaultParameterInt(std::string const& parameter) { Parameter* param = GetParameterByKey(parameter); int ret = 0 ; @@ -1135,7 +1135,7 @@ int Application::GetDefaultParameterInt(std::string parameter) return ret; } -void Application::SetDefaultParameterFloat(std::string key, float value) +void Application::SetDefaultParameterFloat(std::string const& key, float value) { auto param = downcast_check<FloatParameter>(GetParameterByKey(key)); param->SetDefaultValue(value); @@ -1146,44 +1146,44 @@ void Application::SetDefaultParameterFloat(std::string key, float value) } } -float Application::GetDefaultParameterFloat(std::string key) +float Application::GetDefaultParameterFloat(std::string const& key) { auto param = downcast_check<FloatParameter>(GetParameterByKey(key)); return param->GetDefaultValue(); } -void Application::SetDefaultOutputPixelType(std::string key, ImagePixelType type) +void Application::SetDefaultOutputPixelType(std::string const& key, ImagePixelType type) { auto param = downcast_check<OutputImageParameter>(GetParameterByKey(key)); param->SetDefaultPixelType(type); param->SetPixelType(type); } -void Application::SetMinimumParameterIntValue(std::string key, int value) +void Application::SetMinimumParameterIntValue(std::string const& key, int value) { auto param = downcast_check<IntParameter>(GetParameterByKey(key)); param->SetMinimumValue(value); } -void Application::SetMaximumParameterIntValue(std::string key, int value) +void Application::SetMaximumParameterIntValue(std::string const& key, int value) { auto param = downcast_check<IntParameter>(GetParameterByKey(key)); param->SetMaximumValue(value); } -void Application::SetMinimumParameterFloatValue(std::string key, float value) +void Application::SetMinimumParameterFloatValue(std::string const& key, float value) { auto param = downcast_check<FloatParameter>(GetParameterByKey(key)); param->SetMinimumValue(value); } -void Application::SetMaximumParameterFloatValue(std::string key, float value) +void Application::SetMaximumParameterFloatValue(std::string const& key, float value) { auto param = downcast_check<FloatParameter>(GetParameterByKey(key)); param->SetMaximumValue(value); } -void Application::SetListViewSingleSelectionMode(std::string key, bool status) +void Application::SetListViewSingleSelectionMode(std::string const& key, bool status) { auto param = downcast_check<ListViewParameter>(GetParameterByKey(key)); param->SetSingleSelection(status); @@ -1195,56 +1195,56 @@ bool Application::GetListViewSingleSelectionMode(const std::string& key) return param->GetSingleSelection(); } -void Application::SetParameterOutputImage(std::string key, FloatVectorImageType* value) +void Application::SetParameterOutputImage(std::string const& key, FloatVectorImageType* value) { auto param = downcast_check<OutputImageParameter>(GetParameterByKey(key)); param->SetValue(value); } -void Application::SetParameterOutputImagePixelType(std::string key, ImagePixelType pixelType) +void Application::SetParameterOutputImagePixelType(std::string const& key, ImagePixelType pixelType) { auto param = downcast_check<OutputImageParameter>(GetParameterByKey(key)); param->SetPixelType(pixelType); } -void Application::SetParameterOutputVectorData(std::string key, VectorDataType* value) +void Application::SetParameterOutputVectorData(std::string const& key, VectorDataType* value) { auto param = downcast_check<OutputVectorDataParameter>(GetParameterByKey(key)); param->SetValue(value); } -std::string Application::GetParameterName(std::string parameter) +std::string Application::GetParameterName(std::string const& parameter) { // get the actual parameter, even if it is a proxy Parameter* param = GetParameterByKey(parameter,false); return param->GetName(); } -std::string Application::GetParameterDescription(std::string parameter) +std::string Application::GetParameterDescription(std::string const& parameter) { // get the actual parameter, even if it is a proxy Parameter* param = GetParameterByKey(parameter,false); return param->GetDescription(); } -void Application::SetParameterDescription(std::string parameter, std::string desc) +void Application::SetParameterDescription(std::string const& parameter, std::string desc) { // get the actual parameter, even if it is a proxy Parameter* param = GetParameterByKey(parameter,false); param->SetDescription(desc); } -int Application::GetParameterInt(std::string key) const +int Application::GetParameterInt(std::string const& key) const { return GetParameterByKey(key)->ToInt(); } -float Application::GetParameterFloat(std::string key) const +float Application::GetParameterFloat(std::string const& key) const { return GetParameterByKey(key)->ToFloat(); } -std::string Application::GetParameterString(std::string key) const +std::string Application::GetParameterString(std::string const& key) const { return GetParameterByKey(key)->ToString(); } @@ -1254,113 +1254,113 @@ std::vector<std::string> Application::GetParameterStringList(const std::string& return GetParameterByKey(key)->ToStringList(); } -void Application::SetParameterInputImage(std::string key, ImageBaseType* inputImage) +void Application::SetParameterInputImage(std::string const& key, ImageBaseType* inputImage) { auto param = downcast_check<InputImageParameter>(GetParameterByKey(key)); param->SetImage(inputImage); } -ImageBaseType* Application::GetParameterOutputImage(std::string key) +ImageBaseType* Application::GetParameterOutputImage(std::string const& key) { auto param = downcast_check<OutputImageParameter>(GetParameterByKey(key)); return param->GetValue(); } -void Application::AddImageToParameterInputImageList(std::string key, ImageBaseType* img) +void Application::AddImageToParameterInputImageList(std::string const& key, ImageBaseType* img) { auto param = downcast_check<InputImageListParameter>(GetParameterByKey(key)); param->AddImage(img); } -void Application::SetNthParameterInputImageList(std::string key, const unsigned int& id, ImageBaseType* img) +void Application::SetNthParameterInputImageList(std::string const& key, const unsigned int& id, ImageBaseType* img) { auto param = downcast_check<InputImageListParameter>(GetParameterByKey(key)); param->SetNthImage(id, img); } -void Application::AddParameterStringList(std::string key, const std::string& str) +void Application::AddParameterStringList(std::string const& key, const std::string& str) { auto param = downcast_check<InputImageListParameter>(GetParameterByKey(key)); param->AddFromFileName(str); } -void Application::SetNthParameterStringList(std::string key, const unsigned int& id, const std::string& str) +void Application::SetNthParameterStringList(std::string const& key, const unsigned int& id, const std::string& str) { auto param = downcast_check<InputImageListParameter>(GetParameterByKey(key)); param->SetNthFileName(id, str); } -void Application::ClearParameterInputImageList(std::string key) +void Application::ClearParameterInputImageList(std::string const& key) { auto param = downcast_check<InputImageListParameter>(GetParameterByKey(key)); param->ClearValue(); } -unsigned int Application::GetNumberOfElementsInParameterInputImageList(std::string key) +unsigned int Application::GetNumberOfElementsInParameterInputImageList(std::string const& key) { auto param = downcast_check<InputImageListParameter>(GetParameterByKey(key)); return param->Size(); } -FloatVectorImageType* Application::GetParameterImage(std::string parameter) +FloatVectorImageType* Application::GetParameterImage(std::string const& parameter) { return this->GetParameterImage<FloatVectorImageType>(parameter); } -FloatVectorImageListType* Application::GetParameterImageList(std::string key) +FloatVectorImageListType* Application::GetParameterImageList(std::string const& key) { auto param = downcast_check<InputImageListParameter>(GetParameterByKey(key)); return param->GetImageList(); } -VectorDataType* Application::GetParameterVectorData(std::string key) +VectorDataType* Application::GetParameterVectorData(std::string const& key) { auto param = downcast_check<InputVectorDataParameter>(GetParameterByKey(key)); return param->GetVectorData(); } -VectorDataListType* Application::GetParameterVectorDataList(std::string key) +VectorDataListType* Application::GetParameterVectorDataList(std::string const& key) { auto param = downcast_check<InputVectorDataListParameter>(GetParameterByKey(key)); return param->GetVectorDataList(); } -std::string Application::GetParameterAsString(std::string key) +std::string Application::GetParameterAsString(std::string const& key) { return GetParameterString(key); } -ImagePixelType Application::GetParameterOutputImagePixelType(std::string key) +ImagePixelType Application::GetParameterOutputImagePixelType(std::string const& key) { auto param = downcast_check<OutputImageParameter>(GetParameterByKey(key)); return param->GetPixelType(); } void -Application::AddChoice(std::string paramKey, std::string paramName) +Application::AddChoice(std::string const& paramKey, std::string const& paramName) { GetParameterList()->AddChoice(paramKey, paramName); } void -Application::ClearChoices(std::string paramKey) +Application::ClearChoices(std::string const& paramKey) { GetParameterList()->ClearChoices(paramKey); } std::vector<int> -Application::GetSelectedItems(std::string param) +Application::GetSelectedItems(std::string const& param) { return GetParameterList()->GetSelectedItems(param); } void -Application::AddParameter(ParameterType type, std::string paramKey, std::string paramName) +Application::AddParameter(ParameterType type, std::string const& paramKey, std::string const& paramName) { GetParameterList()->AddParameter(type, paramKey, paramName); } -void Application::AddRAMParameter(std::string paramKey, std::string paramName, unsigned int defaultValue) +void Application::AddRAMParameter(std::string const& paramKey, std::string const& paramName, unsigned int defaultValue) { GetParameterList()->AddParameter(ParameterType_RAM, paramKey, paramName); SetDefaultParameterInt(paramKey, defaultValue); @@ -1368,7 +1368,7 @@ void Application::AddRAMParameter(std::string paramKey, std::string paramName, u } // paramKey default value = ram -void Application::AddRAMParameter(std::string paramKey) +void Application::AddRAMParameter(std::string const& paramKey) { // Get the RAM Parameter from the configuration manager AddRAMParameter(paramKey, "Available RAM (MB)", otb::ConfigurationManager::GetMaxRAMHint()); @@ -1376,7 +1376,7 @@ void Application::AddRAMParameter(std::string paramKey) SetParameterDescription(paramKey, "Available memory for processing (in MB)."); } -void Application::AddRANDParameter(std::string paramKey, std::string paramName, unsigned int defaultValue) +void Application::AddRANDParameter(std::string const& paramKey, std::string const& paramName, unsigned int defaultValue) { GetParameterList()->AddParameter(ParameterType_Int, paramKey, paramName); SetDefaultParameterInt(paramKey, defaultValue); @@ -1384,7 +1384,7 @@ void Application::AddRANDParameter(std::string paramKey, std::string paramName, } // paramKey default value = rand -void Application::AddRANDParameter(std::string paramKey) +void Application::AddRANDParameter(std::string const& paramKey) { // Get the RAND Parameter from the configuration file @@ -1711,7 +1711,7 @@ Application::GetImageBasePixelType(const std::string & key, unsigned int idx) } #define otbGetParameterImageMacro( Image ) \ - Image##Type * Application::GetParameter##Image(std::string parameter) \ + Image##Type * Application::GetParameter##Image(std::string const& parameter) \ { \ Parameter* param = GetParameterByKey(parameter); \ InputImageParameter* paramDown = dynamic_cast<InputImageParameter*>(param); \