OTB  6.7.0
Orfeo Toolbox
otbWrapperApplication.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbWrapperApplication_h
22 #define otbWrapperApplication_h
23 
24 #include <string>
25 #include <set>
26 #include "otbWrapperTypes.h"
27 #include "otbWrapperTags.h"
29 
30 #include "otbLogger.h"
31 #include "otbStopwatch.h"
32 #include "otbWrapperMacros.h"
38 #include "OTBApplicationEngineExport.h"
39 
40 namespace otb
41 {
42 
50 class OTBApplicationEngine_EXPORT ApplicationException : public itk::ExceptionObject
51 {
52 public:
54  itkTypeMacro( ApplicationException, ExceptionObject );
55 
57  ApplicationException(const char *file, unsigned int line,
58  const char* message = "Application error.",
59  const char* loc = "Unknown");
60 
62  ApplicationException(const std::string& file, unsigned int line,
63  const char* message = "Application error.",
64  const char* loc = "Unknown");
65 
66  ApplicationException(const std::string& file, unsigned int line,
67  const std::string& message = "Application error.",
68  const std::string& loc = "Unknown");
69 };
70 
71 namespace Wrapper
72 {
73 
81 class OTBApplicationEngine_EXPORT Application: public itk::Object
82 {
83 public:
85  typedef Application Self;
89 
91  itkTypeMacro(Application, itk::Object);
92 
93  virtual void SetName(const std::string&);
94  virtual const char* GetName() const;
95 
96  void SetDescription(const std::string&);
97  virtual const char* GetDescription() const;
98 
100  void Init();
101 
103  bool IsInitialized() const;
104 
105  void LoadParametersFromXML(const std::string& filename);
106  void SaveParametersToXML(const std::string& filename);
107 
109  void UpdateParameters();
110 
122  int Execute();
123 
130  int ExecuteAndWriteOutput();
131 
133  void Stop();
134 
135  /* Get the internal application parameters
136  *
137  * WARNING: this method may disappear from the API */
138  ParameterGroup* GetParameterList();
139 
140  /* Get the internal application parameter specified
141  * if the follow flag is on, the function returns the target of proxy parameters
142  * WARNING: this method may disappear from the API */
143  Parameter* GetParameterByKey(std::string parameter, bool follow=true);
144 
145  /* Get the internal application parameter specified
146  *
147  * WARNING: this method may disappear from the API */
148  const Parameter* GetParameterByKey(std::string parameter, bool follow=true) const;
149 
150  /* Returns the description of a parameter */
151  std::string GetParameterName(std::string paramKey);
152 
153  /* Returns the description of a parameter */
154  std::string GetParameterDescription(std::string paramKey);
155 
156  /* Set the description of a parameter */
157  void SetParameterDescription(std::string paramKey, std::string dec);
158 
159  /* Enable the use of an optional parameter. Returns the previous state */
160  void EnableParameter(std::string paramKey);
161 
162  /* Disable the use of an optional parameter. Returns the previous state */
163  void DisableParameter(std::string paramKey);
164 
165  /* Return the enable state of an optional parameter */
166  bool IsParameterEnabled(std::string paramKey, bool recurseParents = false) const;
167 
168  /* Return true if the specified parameter is mandatory */
169  bool IsMandatory(std::string paramKey) const;
170 
171  /* Return true if the specified parameter was set automatically in
172  * the application
173  */
174  bool HasAutomaticValue(std::string paramKey) const;
175 
176  /* Returns true if the parameter has an associated value provided externally
177  * (not automatically computed by the application) */
178  bool HasUserValue(std::string paramKey) const;
179 
180  /* If a user value was provided, clear it and update the other parameters */
181  void ClearValue(std::string paramKey);
182 
183  /* Returns true if the parameter has an associated value.
184  * This value can be an automatically computed value or default value,
185  * or a value set externally by user */
186  bool HasValue(std::string paramKey) const;
187 
193  void SetParameterUserValue(std::string paramKey, bool value);
194 
195  /* Return the user level of access to a parameter */
196  UserLevel GetParameterUserLevel(std::string paramKey) const;
197 
199  Role GetParameterRole(std::string paramKey) const;
200 
201  /* Get the parameter type from its name */
202  ParameterType GetParameterType(std::string paramKey) const;
203 
204  /* Returns the description of a parameter */
205  std::vector<std::string> GetChoiceKeys(std::string paramKey);
206 
207  /* Returns the description of a parameter */
208  std::vector<std::string> GetChoiceNames(std::string paramKey);
209 
210  /* Set an integer value
211  *
212  * Can be called for types :
213  * \li ParameterType_Int
214  * \li ParameterType_Bool
215  * \li ParameterType_Float
216  * \li ParameterType_Radius
217  * \li ParameterType_Choice
218  */
219  void SetParameterInt(std::string parameter, int value, bool hasUserValueFlag = true);
220 
221  /* Set a floating value
222  *
223  * Can be called for types :
224  * \li ParameterType_Float
225  */
226  void SetParameterFloat(std::string parameter, float value, bool hasUserValueFlag = true);
227 
228  /* Set a string value
229  *
230  * Can be called for types :
231  * \li ParameterType_InputImageListParameter
232  * \li ParameterType_InputVectorDataListParameter
233  * \li ParameterType_InputFilenameListParameter
234  * \li ParameterType_StringList
235  * \li ParameterType_ListView
236  */
237  void SetParameterString(std::string parameter, std::string value, bool hasUserValueFlag = true);
238 
239  /* Set a string value
240  *
241  * Can be called for types :
242  * \li ParameterType_String
243  * \li ParameterType_StringList
244  * \li ParameterType_ListView
245  * \li ParameterType_InputFilename
246  * \li ParameterType_OutputFilename
247  * \li ParameterType_Directory
248  * \li ParameterType_Choice
249  * \li ParameterType_Float
250  * \li ParameterType_Int
251  * \li ParameterType_Radius
252  * \li ParameterType_InputImageParameter
253  * \li ParameterType_InputVectorDataParameter
254  * \li ParameterType_OutputImageParameter
255  * \li ParameterType_OutputVectorDataParameter
256  */
257  void SetParameterStringList(std::string parameter, std::vector<std::string> values, bool hasUserValueFlag = true);
258 
262  bool IsApplicationReady();
263 
273  bool IsParameterMissing(const std::string &key) const;
274 
275  /* Set a default integer value, must be used in the
276  * DoInit when setting a value by default
277  * for the parameter
278  *
279  * Can be called for types :
280  * \li ParameterType_Int
281  * \li ParameterType_Float
282  * \li ParameterType_Radius
283  * \li ParameterType_Choice
284  */
285  void SetDefaultParameterInt(std::string parameter, int value);
286 
287  /* Get the default integer value of a parameter
288  *
289  * Can be called for types :
290  * \li ParameterType_Int
291  * \li ParameterType_Float
292  * \li ParameterType_Radius
293  * \li ParameterType_Choice
294  */
295  int GetDefaultParameterInt(std::string parameter);
296 
297  /* Set a default floating value, must be used in the
298  * DoInit when setting a value by default
299  * for the parameter
300  *
301  * Can be called for types :
302  * \li ParameterType_Float
303  */
304  void SetDefaultParameterFloat(std::string parameter, float value);
305 
306  /* Get the default floating value of a parameter
307  *
308  * Can be called for types :
309  * \li ParameterType_Float
310  */
311  float GetDefaultParameterFloat(std::string parameter);
312 
318  void SetDefaultOutputPixelType(std::string parameter, ImagePixelType type);
319 
325  void SetDefaultOutputComplexPixelType(std::string parameter, ComplexImagePixelType type);
326 
327  /* Set a minimum int value, must used in the
328  * DoInit when setting a value by default
329  * for the parameter
330  *
331  * Can be called for types :
332  * \li ParameterType_Int
333  */
334  void SetMinimumParameterIntValue(std::string parameter, int value);
335 
336  /* Set a maximum int value, must used in the
337  * DoInit when setting a value by default
338  * for the parameter
339  *
340  * Can be called for types :
341  * \li ParameterType_Int
342  */
343  void SetMaximumParameterIntValue(std::string parameter, int value);
344 
345  /* Set a minimum int value, must used in the
346  * DoInit when setting a value by default
347  * for the parameter
348  *
349  * Can be called for types :
350  * \li ParameterType_Float
351  */
352  void SetMinimumParameterFloatValue(std::string parameter, float value);
353 
354  /* Set a maximum int value, must used in the
355  * DoInit when setting a value by default
356  * for the parameter
357  *
358  * Can be called for types :
359  * \li ParameterType_Float
360  */
361  void SetMaximumParameterFloatValue(std::string parameter, float value);
362 
363 
371  void SetListViewSingleSelectionMode(std::string parameter, bool status);
372 
379  bool GetListViewSingleSelectionMode(const std::string& parameter);
380 
381  /* Set an output image value
382  *
383  * Can be called for types :
384  * \li ParameterType_OutputImage
385  */
386  void SetParameterOutputImage(std::string parameter, FloatVectorImageType* value);
387 
388  /* Set the pixel type in which the image will be saved
389  *
390  * Can be called for types :
391  * \li ParameterType_OutputImage
392  */
393  void SetParameterOutputImagePixelType(std::string parameter, ImagePixelType pixelType);
394 
395  /* Set an output vector data value
396  *
397  * Can be called for types :
398  * \li ParameterType_OutputVectorData
399  */
400  void SetParameterOutputVectorData(std::string parameter, VectorDataType* value);
401 
402  /* Get an integer parameter value
403  *
404  * Can be called for types :
405  * \li ParameterType_Int
406  * \li ParameterType_Bool
407  * \li ParameterType_Float
408  * \li ParameterType_Radius
409  * \li ParameterType_Choice
410  */
411  int GetParameterInt(std::string parameter);
412 
413  /* Get a floating parameter value
414  *
415  * Can be called for types :
416  * \li ParameterType_Float
417  */
418  float GetParameterFloat(std::string parameter);
419 
420  /* Get a string parameter value
421  *
422  * Can be called for types :
423  * \li ParameterType_String
424  * \li ParameterType_InputFilename
425  * \li ParameterType_OutputFilename
426  * \li ParameterType_Directory
427  * \li ParameterType_InputImage
428  * \li ParameterType_InputVectorData
429  * \li ParameterType_OutputImage
430  * \li ParameterType_OutputVectorData
431  */
432  std::string GetParameterString(std::string parameter);
433 
434  /* Get a string list parameter value
435  *
436  * Can be called for types :
437  * \li ParameterType_StringList
438  * \li ParameterType_InputImageList
439  * \li ParameterType_InputFilenameList
440  */
441  // TODO: Should be rewritten:
442  //
443  // std::size_t
444  // GetParameterStringList( const std::vector< String > & v,
445  // const std::string & parameter ) const;
446  //
447  // to avoid useless memory allocations.
448  std::vector< std::string >
449  GetParameterStringList( const std::string & parameter );
450 
451 
461  void SetParameterInputImage(std::string parameter, ImageBaseType * inputImage);
462 
472  ImageBaseType * GetParameterOutputImage(std::string parameter);
473 
483  void AddImageToParameterInputImageList(std::string parameter, ImageBaseType * img);
484 
495  void SetNthParameterInputImageList(std::string parameter, const unsigned int &id, ImageBaseType * img);
496 
508  void AddParameterStringList(std::string parameter, const std::string & str);
509 
522  void SetNthParameterStringList(std::string parameter, const unsigned int &id, const std::string& str);
523 
524 
532  void ClearParameterInputImageList(std::string parameter);
533 
541  unsigned int GetNumberOfElementsInParameterInputImageList(std::string parameter);
542 
543 
544  /* Get an image value
545  *
546  * Can be called for types :
547  * \li ParameterType_InputImage
548  */
549  FloatVectorImageType* GetParameterImage(std::string parameter);
550 
551  UInt8ImageType * GetParameterUInt8Image(std::string);
552  UInt16ImageType * GetParameterUInt16Image(std::string);
553  Int16ImageType * GetParameterInt16Image(std::string);
554  UInt32ImageType * GetParameterUInt32Image(std::string);
555  Int32ImageType * GetParameterInt32Image(std::string);
556  FloatImageType * GetParameterFloatImage(std::string);
557  DoubleImageType * GetParameterDoubleImage(std::string);
558  UInt8VectorImageType * GetParameterUInt8VectorImage(std::string);
559  UInt16VectorImageType * GetParameterUInt16VectorImage(std::string);
560  Int16VectorImageType * GetParameterInt16VectorImage(std::string);
561  UInt32VectorImageType * GetParameterUInt32VectorImage(std::string);
562  Int32VectorImageType * GetParameterInt32VectorImage(std::string);
563  FloatVectorImageType * GetParameterFloatVectorImage(std::string);
564  DoubleVectorImageType * GetParameterDoubleVectorImage(std::string);
565  UInt8RGBImageType * GetParameterUInt8RGBImage(std::string);
566  UInt8RGBAImageType * GetParameterUInt8RGBAImage(std::string);
567 
568  // Complex image
569  ComplexInt16ImageType * GetParameterComplexInt16Image(std::string);
570  ComplexInt32ImageType * GetParameterComplexInt32Image(std::string);
571  ComplexFloatImageType * GetParameterComplexFloatImage(std::string);
572  ComplexDoubleImageType * GetParameterComplexDoubleImage(std::string);
573 
574  ComplexInt16VectorImageType * GetParameterComplexInt16VectorImage(std::string);
575  ComplexInt32VectorImageType * GetParameterComplexInt32VectorImage(std::string);
576  ComplexFloatVectorImageType * GetParameterComplexFloatVectorImage(std::string);
577  ComplexDoubleVectorImageType * GetParameterComplexDoubleVectorImage(std::string);
578 
579 
580  /* Get an image list value
581  *
582  * Can be called for types :
583  * \li ParameterType_InputImageList
584  */
585  FloatVectorImageListType* GetParameterImageList(std::string parameter);
586 
587  /* GetParameterVectorData
588  *
589  * Can be called for types :
590 
591  * \li ParameterType_InputVectorData
592  */
593  VectorDataType* GetParameterVectorData(std::string parameter);
594 
595  /* GetParameteVetorDataList
596  *
597  * Can be called for types :
598 
599  * \li ParameterType_InputVectorDatalist
600  */
601  VectorDataListType* GetParameterVectorDataList(std::string parameter);
602 
603  /* Get the parameter as a std::string
604  *
605  * Can be called for types :
606  * \li ParameterType_Float
607  * \li ParameterType_Int
608  * \li ParameterType_Choice
609  * \li ParameterType_Radius
610  * \li ParameterType_String
611  * \li ParameterType_InputFilename
612  * \li ParameterType_OutputFilename
613  * \li ParameterType_Directory
614  * \li ParameterType_InputImage
615  * \li ParameterType_InputVectorData
616  * \li ParameterType_OutputImage
617  * \li ParameterType_OutputVectorData
618  */
619  std::string GetParameterAsString(std::string paramKey);
620 
621  /* Get the list of all parameters
622  */
623  std::vector<std::string> GetParametersKeys(bool recursive = true);
624 
625  /* Get the pixel type in which the image will be saved
626  *
627  * Can be called for types :
628  * \li ParameterType_OutputImage
629  */
630  ImagePixelType GetParameterOutputImagePixelType(std::string parameter);
631 
633  {
634  m_ParameterList = paramGroup;
635  }
636 
637  otb::Logger* GetLogger() const;
638 
640  void SetLogger(otb::Logger *logger);
641 
642  itk::ProcessObject* GetProgressSource() const;
643 
644  std::string GetProgressDescription() const;
645 
646  virtual void SetDocLongDescription(const std::string&);
647  virtual const char* GetDocLongDescription() const;
648 
649  virtual void SetDocAuthors(const std::string&);
650  virtual const char* GetDocAuthors() const;
651 
652  virtual void SetDocLimitations(const std::string&);
653  virtual const char* GetDocLimitations() const;
654 
655  virtual void SetDocSeeAlso(const std::string&);
656  virtual const char* GetDocSeeAlso() const;
657 
658  virtual void SetDocTags(std::vector<std::string>);
659  virtual std::vector<std::string> GetDocTags() const;
660 
661  void AddDocTag(const std::string&);
662 
664  bool IsDeprecated();
665 
666  DocExampleStructure::Pointer GetDocExample();
667  unsigned int GetNumberOfExamples();
668  std::string GetExampleComment(unsigned int id);
669  unsigned int GetExampleNumberOfParameters(unsigned int id);
670  std::string GetExampleParameterKey(unsigned int exId, unsigned int paramId);
671  std::string GetExampleParameterValue(unsigned int exId, unsigned int paramId);
672  void SetDocExampleParameterValue( const std::string key, const std::string value, unsigned int exId=0 );
673  void SetExampleComment( const std::string & comm, unsigned int i );
674  unsigned int AddExample( const std::string & comm="" );
675  std::string GetCLExample();
676  std::string GetHtmlExample();
677 
681  std::vector< std::pair<std::string, std::string> > GetOutputParametersSumUp();
682 
683  double GetLastExecutionTiming() const;
684 
685  virtual void SetDocLink(const std::string & link);
686  virtual const std::string& GetDocLink() const;
687 
688  void SetOfficialDocLink();
689 
692  ImageBaseType::PointType GetImageOrigin(const std::string & key, unsigned int idx = 0);
693 
696  ImageBaseType::SpacingType GetImageSpacing(const std::string & key, unsigned int idx = 0);
697 
700  ImageBaseType::SizeType GetImageSize(const std::string & key, unsigned int idx = 0);
701 
704  unsigned int GetImageNbBands(const std::string & key, unsigned int idx = 0);
705 
708  std::string GetImageProjection(const std::string & key, unsigned int idx = 0);
709 
712  otb::ImageKeywordlist GetImageKeywordlist(const std::string & key, unsigned int idx = 0);
713 
719  unsigned long PropagateRequestedRegion(const std::string & key, ImageBaseType::RegionType region, unsigned int idx = 0);
720 
724  ImageBaseType::RegionType GetImageRequestedRegion(const std::string & key, unsigned int idx = 0);
725 
727  itk::MetaDataDictionary GetImageMetaData(const std::string & key, unsigned int idx = 0);
728 
733  ImagePixelType GetImageBasePixelType(const std::string & key, unsigned int idx = 0);
734 
743  ImageBaseType* GetParameterImageBase(const std::string & key, unsigned int idx = 0);
744 
752  void SetParameterImageBase(const std::string & key, ImageBaseType* img, unsigned int idx = 0);
753 
764  void RegisterPipeline();
765 
773  void FreeRessources();
774 
775 protected:
777  Application();
778 
780  ~Application() override;
781 
782  /* Register a ProcessObject as a new progress source */
783  void AddProcess(itk::ProcessObject* object, std::string description);
784 
786  void AddChoice(std::string paramKey, std::string paramName);
787 
791  void AddParameter(ParameterType type, std::string paramKey, std::string paramName);
792 
794  void AddRAMParameter(std::string paramKey="ram");
795 
797  void AddRAMParameter(std::string paramKey, std::string paramName, unsigned int defaultValue);
798 
800  void AddRANDParameter(std::string paramKey="rand");
801 
804  void AddRANDParameter(std::string paramKey, std::string paramName, unsigned int defaultValue);
805 
807  void ClearChoices(std::string key);
808 
810  std::vector<int> GetSelectedItems(std::string paramKey);
811 
813  void MandatoryOn(std::string paramKey);
814 
816  void MandatoryOff(std::string paramKey);
817 
818  /* Set the user level of access to a parameter */
819  void SetParameterUserLevel(std::string paramKey, UserLevel level);
820 
821  /* Set the parameter role (input/output) */
822  void SetParameterRole(std::string paramKey, Role role);
823 
824  /* Get an image value
825  *
826  * Can be called for types :
827  * \li ParameterType_InputImage
828  */
829  template <class TImageType>
830  TImageType* GetParameterImage(std::string parameter);
831 
833  void AutomaticValueOn(std::string paramKey);
834 
836  void AutomaticValueOff(std::string paramKey);
837 
838  /* Set an output image value
839  *
840  * Can be called for types :
841  * \li ParameterType_OutputImage
842  */
843  template <class TImageType>
844  void SetParameterOutputImage(std::string parameter, TImageType* value);
845 
846 private:
847  /* Implement this method to add parameters */
848  virtual void DoInit() = 0;
849 
850  /* Implement this method to update non valued parameters */
851  virtual void DoUpdateParameters() = 0;
852 
853  /* Implement this method to build the output */
854  virtual void DoExecute() = 0;
855 
856  /* This method will be called after the
857  * ExecuteAndWriteOutput() call to allow for cleanup. Default
858  * implementation does nothing */
859  virtual void AfterExecuteAndWriteOutputs();
860 
861  virtual void DoFreeRessources(){};
862 
863  Application(const Application &) = delete;
864  void operator =(const Application&) = delete;
865 
866  std::string m_Name;
867  std::string m_Description;
870 
873 
874  std::set<itk::ProcessObject::Pointer> m_Filters;
875 
877  std::string m_DocLongDescription;
878 
881 
883  std::string m_DocAuthors;
884 
886  std::string m_DocLimitations;
887 
889  std::string m_DocSeeAlso;
890 
892  std::vector<std::string> m_DocTags;
893 
895  std::string m_Doclink;
896 
899 
902 
912 
913 }; //end class
914 
915 } // end namespace Wrapper
916 } //end namespace otb
917 
918 
919 #ifndef OTB_MANUAL_INSTANTIATION
920 #include "otbWrapperApplication.hxx"
921 #endif
922 
923 
924 namespace otb
925 {
926 namespace Wrapper
927 {
928 
929 extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt8VectorImageType* Application::GetParameterImage<UInt8VectorImageType>(std::string);
930 extern template OTBApplicationEngine_EXPORT_TEMPLATE Int16VectorImageType* Application::GetParameterImage<Int16VectorImageType>(std::string);
931 extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt16VectorImageType* Application::GetParameterImage<UInt16VectorImageType>(std::string);
932 extern template OTBApplicationEngine_EXPORT_TEMPLATE Int32VectorImageType* Application::GetParameterImage<Int32VectorImageType>(std::string);
933 extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt32VectorImageType* Application::GetParameterImage<UInt32VectorImageType>(std::string);
934 
935 extern template OTBApplicationEngine_EXPORT_TEMPLATE FloatVectorImageType* Application::GetParameterImage<FloatVectorImageType>(std::string);
936 extern template OTBApplicationEngine_EXPORT_TEMPLATE DoubleVectorImageType* Application::GetParameterImage<DoubleVectorImageType>(std::string);
937 
938 extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexInt16VectorImageType* Application::GetParameterImage<ComplexInt16VectorImageType>(std::string);
939 extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexInt32VectorImageType* Application::GetParameterImage<ComplexInt32VectorImageType>(std::string);
940 
941 extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexFloatVectorImageType* Application::GetParameterImage<ComplexFloatVectorImageType>(std::string);
942 extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexDoubleVectorImageType* Application::GetParameterImage<ComplexDoubleVectorImageType>(std::string);
943 
944 extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt8RGBImageType* Application::GetParameterImage<UInt8RGBImageType>(std::string);
945 extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt8RGBAImageType* Application::GetParameterImage<UInt8RGBAImageType>(std::string);
946 
947 extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt8ImageType* Application::GetParameterImage<UInt8ImageType>(std::string);
948 extern template OTBApplicationEngine_EXPORT_TEMPLATE Int16ImageType* Application::GetParameterImage<Int16ImageType>(std::string);
949 extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt16ImageType* Application::GetParameterImage<UInt16ImageType>(std::string);
950 extern template OTBApplicationEngine_EXPORT_TEMPLATE Int32ImageType* Application::GetParameterImage<Int32ImageType>(std::string);
951 extern template OTBApplicationEngine_EXPORT_TEMPLATE UInt32ImageType* Application::GetParameterImage<UInt32ImageType>(std::string);
952 
953 extern template OTBApplicationEngine_EXPORT_TEMPLATE FloatImageType* Application::GetParameterImage<FloatImageType>(std::string);
954 extern template OTBApplicationEngine_EXPORT_TEMPLATE DoubleImageType* Application::GetParameterImage<DoubleImageType>(std::string);
955 
956 extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexInt16ImageType* Application::GetParameterImage<ComplexInt16ImageType>(std::string);
957 extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexInt32ImageType* Application::GetParameterImage<ComplexInt32ImageType>(std::string);
958 
959 extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexFloatImageType* Application::GetParameterImage<ComplexFloatImageType>(std::string);
960 extern template OTBApplicationEngine_EXPORT_TEMPLATE ComplexDoubleImageType* Application::GetParameterImage<ComplexDoubleImageType>(std::string);
961 
962 //
963 
964 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt8VectorImageType>(std::string, UInt8VectorImageType*);
965 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<Int16VectorImageType>(std::string, Int16VectorImageType*);
966 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt16VectorImageType>(std::string, UInt16VectorImageType*);
967 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<Int32VectorImageType>(std::string, Int32VectorImageType*);
968 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt32VectorImageType>(std::string, UInt32VectorImageType*);
969 
970 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<FloatVectorImageType>(std::string, FloatVectorImageType*);
971 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<DoubleVectorImageType>(std::string, DoubleVectorImageType*);
972 
973 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt16VectorImageType>(std::string,
975 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt32VectorImageType>(std::string,
977 
978 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexFloatVectorImageType>(std::string,
980 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexDoubleVectorImageType>(std::string,
982 
983 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt8RGBImageType>(std::string, UInt8RGBImageType*);
984 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt8RGBAImageType>(std::string, UInt8RGBAImageType*);
985 
986 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt8ImageType>(std::string, UInt8ImageType*);
987 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<Int16ImageType>(std::string, Int16ImageType*);
988 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt16ImageType>(std::string, UInt16ImageType*);
989 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<Int32ImageType>(std::string, Int32ImageType*);
990 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<UInt32ImageType>(std::string, UInt32ImageType*);
991 
992 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<FloatImageType>(std::string, FloatImageType*);
993 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<DoubleImageType>(std::string, DoubleImageType*);
994 
995 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt16ImageType>(std::string, ComplexInt16ImageType*);
996 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexInt32ImageType>(std::string, ComplexInt32ImageType*);
997 
998 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexFloatImageType>(std::string, ComplexFloatImageType*);
999 extern template OTBApplicationEngine_EXPORT_TEMPLATE void Application::SetParameterOutputImage<ComplexDoubleImageType>(std::string, ComplexDoubleImageType*);
1000 
1001 } // namespace Wrapper
1002 } // namespace otb
1003 
1004 
1005 #endif // otbWrapperApplication_h_
std::set< itk::ProcessObject::Pointer > m_Filters
Creation of an "otb" vector image which contains metadata.
itk::ProcessObject::Pointer m_ProgressSource
Storage and conversion for OSSIM metadata.
This class represent a parameter for the wrapper framework This class is a high level class represent...
Stopwatch timer.
Definition: otbStopwatch.h:41
otb::Image< Int16ComplexPixelType, 2 > ComplexInt16ImageType
itk::SmartPointer< Self > Pointer
otb::Image< double > DoubleImageType
An ITK logger specialized for OTB.
Definition: otbLogger.h:39
otb::VectorImage< unsigned short > UInt16VectorImageType
otb::VectorImage< Int16ComplexPixelType, 2 > ComplexInt16VectorImageType
otb::VectorImage< FloatComplexPixelType, 2 > ComplexFloatVectorImageType
std::vector< std::string > m_DocTags
void SetParameterList(ParameterGroup::Pointer paramGroup)
otb::VectorImage< double > DoubleVectorImageType
otb::Image< unsigned char > UInt8ImageType
otb::VectorImage< unsigned int > UInt32VectorImageType
otb::VectorImage< unsigned char > UInt8VectorImageType
This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >...
Definition: otbObjectList.h:40
otb::Image< short > Int16ImageType
otb::Image< Int32ComplexPixelType, 2 > ComplexInt32ImageType
otb::VectorImage< float > FloatVectorImageType
otb::Image< unsigned int > UInt32ImageType
otb::VectorImage< DoubleComplexPixelType, 2 > ComplexDoubleVectorImageType
ParameterGroup::Pointer m_ParameterList
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:89
otb::Image< float > FloatImageType
int Execute(int argc, char *argv[])
otb::VectorImage< int > Int32VectorImageType
otb::Image< int > Int32ImageType
Exception for runtime errors in OTB Applications.
DocExampleStructure::Pointer m_DocExample
This class represents a hierarchy of vector data.
Definition: otbVectorData.h:58
otb::Image< unsigned short > UInt16ImageType
otb::Image< itk::RGBAPixel< unsigned char > > UInt8RGBAImageType
This class represent an application TODO.
otb::Image< DoubleComplexPixelType, 2 > ComplexDoubleImageType
otb::VectorImage< Int32ComplexPixelType, 2 > ComplexInt32VectorImageType
otb::Image< itk::RGBPixel< unsigned char > > UInt8RGBImageType
This class represent a helper class for elevation modes. It add the parameters automatically to the a...
itk::SmartPointer< const Self > ConstPointer
otb::VectorImage< short > Int16VectorImageType
otb::Image< FloatComplexPixelType, 2 > ComplexFloatImageType