From cc44c180156edf3e17eb55af5a8dc2237b529ab3 Mon Sep 17 00:00:00 2001
From: Cyrille Valladeau <cyrille.valladeau@c-s.fr>
Date: Thu, 27 Oct 2011 09:11:19 +0200
Subject: [PATCH] ENH: change output pixeltype description

---
 .../otbWrapperCommandLineLauncher.cxx         | 26 +++++++++----------
 ...otbWrapperQtWidgetOutputImageParameter.cxx | 12 ++++-----
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
index 128edc5ec5..a20fbb88fd 100644
--- a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
+++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
@@ -389,22 +389,22 @@ CommandLineLauncher::LoadParameters()
               if (values.size() == 2)
                 {
                 ImagePixelType outPixType = ImagePixelType_float;
-                if (values[1] == "char")
+                if (values[1] == "int8")
                   outPixType = ImagePixelType_int8;
                 else
-                  if (values[1] == "uchar")
+                  if (values[1] == "uint8")
                     outPixType = ImagePixelType_uint8;
                   else
-                    if (values[1] == "short")
+                    if (values[1] == "int16")
                       outPixType = ImagePixelType_int16;
                     else
-                      if (values[1] == "ushort")
+                      if (values[1] == "uint16")
                         outPixType = ImagePixelType_uint16;
                       else
-                        if (values[1] == "int")
+                        if (values[1] == "int32")
                           outPixType = ImagePixelType_int32;
                         else
-                          if (values[1] == "uint")
+                          if (values[1] == "uint32")
                             outPixType = ImagePixelType_uint32;
                           else
                             if (values[1] == "float")
@@ -622,7 +622,7 @@ CommandLineLauncher::DisplayParameterHelp( const Parameter::Pointer & param, con
   else if( type == ParameterType_OutputImage )
     {
     oss<<"\t          Type: String (output image file name and optionally its pixel type)"<<std::endl;
-    oss<<"\t                Possible pixel type: char, uchar, short, ushort, int, uint, float or double"<<std::endl;
+    oss<<"\t                Possible pixel type: int8, uint8, int16, uint16, int32, uint32, flooat or double"<<std::endl;
     }
   else if( type == ParameterType_OutputVectorData )
     {
@@ -676,17 +676,17 @@ CommandLineLauncher::DisplayParameterHelp( const Parameter::Pointer & param, con
       oss << "\t                pixel type: ";
       ImagePixelType outPixType = m_Application->GetParameterOutputImagePixelType( paramKey );
       if( outPixType == ImagePixelType_int8 )
-        oss << "char";
+        oss << "int8";
       else if( outPixType == ImagePixelType_uint8 )
-        oss << "uchar";
+        oss << "uint8";
       else if( outPixType == ImagePixelType_int16 )
-        oss << "short";
+        oss << "int16";
       else if( outPixType == ImagePixelType_uint16 )
-        oss << "ushort";
+        oss << "uint16";
       else if( outPixType == ImagePixelType_int32 )
-        oss << "int";
+        oss << "int32";
       else if( outPixType == ImagePixelType_uint32 )
-        oss << "uint";
+        oss << "uint32";
       else if( outPixType == ImagePixelType_float )
         oss << "float";
       else if( outPixType == ImagePixelType_double )
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.cxx
index d84ffc7844..14f7f3393a 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.cxx
@@ -53,12 +53,12 @@ void QtWidgetOutputImageParameter::DoCreateWidget()
   // Set the Output PixelType choice Combobox
   m_ComboBox = new QComboBox;
   m_ComboBox->setToolTip("Output Pixel Type");
-  m_ComboBox->addItem( "char");
-  m_ComboBox->addItem( "unsigned char");
-  m_ComboBox->addItem( "short");
-  m_ComboBox->addItem( "unsigned short");
-  m_ComboBox->addItem( "int");
-  m_ComboBox->addItem( "unsigned int");
+  m_ComboBox->addItem( "int 8");
+  m_ComboBox->addItem( "uint 8");
+  m_ComboBox->addItem( "int 16");
+  m_ComboBox->addItem( "uint 16");
+  m_ComboBox->addItem( "int 32");
+  m_ComboBox->addItem( "uint 32");
   m_ComboBox->addItem( "float");
   m_ComboBox->addItem( "double");
   m_ComboBox->setCurrentIndex(m_OutputImageParam->GetPixelType());
-- 
GitLab