Changeset 848 for branches/prototype-v0


Ignore:
Timestamp:
Aug 23, 2017, 3:01:06 PM (7 years ago)
Author:
djay
Message:

Check and set the default pixel type as proposed by Manuel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/prototype-v0/thirds/otb2zcfg/otb2zcfg.cxx

    r839 r848  
    9797  std::cout << "    </Supported>" << std::endl;
    9898  std::cout << "    <Supported>" << std::endl;
     99  std::cout << "     mimeType = application/json" << std::endl;
     100  std::cout << "     encoding = utf-8" << std::endl;
     101  std::cout << "    </Supported>" << std::endl;
     102  std::cout << "    <Supported>" << std::endl;
    99103  std::cout << "     mimeType = application/zip" << std::endl;
    100104  std::cout << "    </Supported>" << std::endl;
    101105}
    102106
    103 void printOutputImage(){
     107void printOutputImage(ImagePixelType pt){
    104108  std::cout << "   <LiteralData>" << std::endl;
    105109  std::cout << "    dataType = string" << std::endl;
    106110  std::cout << "    <Default>" << std::endl;
    107   std::cout << "     value = float" << std::endl;
    108   std::cout << "     AllowedValues = uint8,uint16,int16n,int32,int32,float,double" << std::endl;
     111  // Check for the default pixel type
     112  switch(pt){
     113  case ImagePixelType_uint8:
     114    std::cout << "     value = uint8" << std::endl;
     115    break;
     116  case ImagePixelType_int16:
     117    std::cout << "     value = int16" << std::endl;
     118    break;
     119  case ImagePixelType_uint16:
     120    std::cout << "     value = uint16" << std::endl;
     121    break;
     122  case ImagePixelType_int32:
     123    std::cout << "     value = int32" << std::endl;
     124    break;
     125  case ImagePixelType_uint32:
     126    std::cout << "     value = uint8" << std::endl;
     127    break;
     128  case ImagePixelType_double:
     129    std::cout << "     value = uint8" << std::endl;
     130    break;
     131  default:
     132    std::cout << "     value = float" << std::endl;
     133    break;
     134  }
     135  std::cout << "     AllowedValues = uint8,uint16,int16,int32,int32,float,double" << std::endl;
    109136  std::cout << "    </Default>" << std::endl;
    110137  std::cout << "   </LiteralData>" << std::endl;
    111138}
    112139
    113 void printOutputComplexImage(){
     140void printOutputComplexImage(ComplexImagePixelType pt){
    114141  std::cout << "   <LiteralData>" << std::endl;
    115142  std::cout << "    dataType = string" << std::endl;
    116143  std::cout << "    <Default>" << std::endl;
    117   std::cout << "     value = cfloat" << std::endl;
     144  // Check for the default pixel type
     145  switch(pt){
     146  case ComplexImagePixelType_double:
     147    std::cout << "     value = cdouble" << std::endl;
     148    break;
     149  default:
     150    std::cout << "     value = cfloat" << std::endl;
     151    break;
     152  }
    118153  std::cout << "     AllowedValues = cfloat,cdouble" << std::endl;
    119154  std::cout << "    </Default>" << std::endl;
     
    242277          }
    243278          else{
    244             if(type == ParameterType_OutputImage)
    245               printOutputImage();
     279            if(type == ParameterType_OutputImage){
     280              printOutputImage(m_Application->GetParameterOutputImagePixelType(paramKey));
     281            }
    246282            else{
    247283              if(type == ParameterType_ComplexOutputImage){
    248                 printOutputComplexImage();
     284                printOutputComplexImage(m_Application->GetParameterComplexOutputImagePixelType(paramKey));
    249285              }else{
    250286                std::cout << "   <ComplexData>" << std::endl;
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png