Exemple #1
0
bool ModelExporter::getInputSpecification(PlugInArgList*& pInArgList)
{
   pInArgList = mpPlugInManager->getPlugInArgList();
   VERIFY(pInArgList != NULL);

   PlugInArg* pArg = NULL;
   VERIFY((pArg = mpPlugInManager->getPlugInArg()) != NULL);
   pArg->setName(Executable::ProgressArg());
   pArg->setType("Progress");
   pArg->setDefaultValue(NULL);
   pArg->setDescription(Executable::ProgressArgDescription());
   pInArgList->addArg(*pArg);

   VERIFY((pArg = mpPlugInManager->getPlugInArg()) != NULL);
   pArg->setName(Exporter::ExportDescriptorArg());
   pArg->setType("FileDescriptor");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("File descriptor for the output file.");
   pInArgList->addArg(*pArg);

   VERIFY((pArg = mpPlugInManager->getPlugInArg()) != NULL);
   pArg->setName(Exporter::ExportItemArg());
   pArg->setType(mDataElementSubclass);
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Model item to export.");
   pInArgList->addArg(*pArg);

   return true;
}
Exemple #2
0
bool SaveLayer::getInputSpecification(PlugInArgList*& pArgList)
{
   pArgList = NULL;

   if (mbInteractive)
   {
      VERIFY(DesktopItems::getInputSpecification(pArgList) && pArgList != NULL);

      Service<PlugInManagerServices> pPlugInManager;
      VERIFY(pPlugInManager.get() != NULL);

      // Add args
      PlugInArg* pArg = pPlugInManager->getPlugInArg();
      VERIFY(pArg != NULL);
      pArg->setName("Filename");
      pArg->setType("Filename");
      pArg->setDefaultValue(NULL);
      pArg->setDescription("Location to save the file at.");
      pArgList->addArg(*pArg);

      LayerType eType = getLayerType();
      string modelType = getModelType(eType);
      VERIFY(!modelType.empty());

      pArg = pPlugInManager->getPlugInArg();
      VERIFY(pArg != NULL);
      pArg->setName("Layer Element");
      pArg->setType(modelType);
      pArg->setDefaultValue(NULL);
      pArg->setDescription("Layer element to save.");
      pArgList->addArg(*pArg);
   }

   return true;
}
Exemple #3
0
bool PrintView::getInputSpecification(PlugInArgList*& pArgList)
{
   pArgList = NULL;

   if (mbInteractive)
   {
      VERIFY(DesktopItems::getInputSpecification(pArgList) && pArgList != NULL);

      Service<PlugInManagerServices> pPlugInManager;
      VERIFY(pPlugInManager.get() != NULL);

      // Add args
      PlugInArg* pArg = pPlugInManager->getPlugInArg();
      VERIFY(pArg != NULL);
      pArg->setName("Data set");
      pArg->setType("RasterElement");
      pArg->setDefaultValue(NULL);
      pArg->setDescription("Data set to be printed.");
      pArgList->addArg(*pArg);

      pArg = pPlugInManager->getPlugInArg();
      VERIFY(pArg != NULL);
      pArg->setName("Setup Dialog");
      pArg->setType("bool");
      pArg->setDefaultValue(&mbPrintDialog);
      pArg->setDescription("Whether to show the setup dialog before printing.");
      pArgList->addArg(*pArg);
   }

   return true;
}
Exemple #4
0
bool AutoImporter::getInputSpecification(PlugInArgList*& pArgList)
{
    pArgList = NULL;

    pArgList = mpPlugInManager->getPlugInArgList();
    if (pArgList == NULL)
    {
        return false;
    }

    // Menu command
    PlugInArg* pArg = mpPlugInManager->getPlugInArg();
    VERIFY(pArg != NULL);

    pArg->setName(Executable::MenuCommandArg());
    pArg->setType("string");
    pArg->setDescription("String name for the menu command.");
    pArg->setDefaultValue(NULL);
    pArgList->addArg(*pArg);

    // Progress
    pArg = mpPlugInManager->getPlugInArg();
    VERIFY(pArg != NULL);

    pArg->setName(Executable::ProgressArg());
    pArg->setType("Progress");
    pArg->setDescription(Executable::ProgressArgDescription());
    pArg->setDefaultValue(NULL);
    pArgList->addArg(*pArg);

    // Data element
    pArg = mpPlugInManager->getPlugInArg();
    VERIFY(pArg != NULL);

    pArg->setName(Importer::ImportElementArg());
    pArg->setType("DataElement");
    pArg->setDescription("Data element to be imported.");
    pArg->setDefaultValue(NULL);
    pArgList->addArg(*pArg);

    return true;
}
Exemple #5
0
bool SaveLayerFromDataSet::getInputSpecification(PlugInArgList*& pArgList)
{
   pArgList = NULL;

   if (mbInteractive)
   {
      VERIFY(DesktopItems::getInputSpecification(pArgList) && pArgList != NULL);
   
      Service<PlugInManagerServices> pPlugInManager;
      VERIFY(pPlugInManager.get() != NULL);

      // Add args
      PlugInArg* pArg = NULL;
      pArg = pPlugInManager->getPlugInArg();
      VERIFY(pArg != NULL);
      pArg->setName("Filename");
      pArg->setType("Filename");
      pArg->setDefaultValue(NULL);
      pArg->setDescription("Location to save the file at.");
      pArgList->addArg(*pArg);

      pArg = pPlugInManager->getPlugInArg();
      VERIFY(pArg != NULL);
      pArg->setName("Data set");
      pArg->setType("RasterElement");
      pArg->setDefaultValue(NULL);
      pArg->setDescription("Data set to be saved.");
      pArgList->addArg(*pArg);

      pArg = pPlugInManager->getPlugInArg();
      VERIFY(pArg != NULL);
      LayerType eType = getLayerType();

      pArg->setName("Layer Name");
      pArg->setType("string");
      pArg->setDefaultValue(NULL);
      pArg->setDescription("Name of the layer to be saved.");
      pArgList->addArg(*pArg);
   }

   return true;
}
Exemple #6
0
bool CgmImporter::getInputSpecification(PlugInArgList*& pInArgList)
{
   pInArgList = mpPlugInManager->getPlugInArgList();
   VERIFY(pInArgList != NULL);

   PlugInArg* pArg = NULL;
   VERIFY((pArg = mpPlugInManager->getPlugInArg()) != NULL);
   pArg->setName(Executable::ProgressArg());
   pArg->setType("Progress");
   pArg->setDefaultValue(NULL);
   pArg->setDescription(Executable::ProgressArgDescription());
   pInArgList->addArg(*pArg);

   VERIFY((pArg = mpPlugInManager->getPlugInArg()) != NULL);
   pArg->setName(Importer::ImportElementArg());
   pArg->setType("DataElement");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Data element to be imported.");
   pInArgList->addArg(*pArg);

   return true;
}
bool GenericConvolution::getInputSpecification(PlugInArgList*& pInArgList)
{
   if (!ConvolutionFilterShell::getInputSpecification(pInArgList))
   {
      return false;
   }
   PlugInArg* pArg = Service<PlugInManagerServices>()->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("Kernel");
   pArg->setDescription("The convolution kernel as an ossim NEWMAT::Matrix.");
   pArg->setType("NEWMAT::Matrix");
   pInArgList->addArg(*pArg);
   return true;
}
Exemple #8
0
bool BandMath::getOutputSpecification(PlugInArgList*& pArgList)
{
   // Set up list
   pArgList = mpPluginManager->getPlugInArgList();
   VERIFY(pArgList != NULL);

   PlugInArg* pArg = mpPluginManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("Band Math Result");
   pArg->setType("RasterElement");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Output element for the result of the band math operation.");
   pArgList->addArg(*pArg);

   return true;
}
Exemple #9
0
bool PlugInTester::getInputSpecification(PlugInArgList *&pArgList)
{
   bool bSuccess = false;
   pArgList = mpPlugMgr->getPlugInArgList();
   if (pArgList != NULL)
   {
      PlugInArg* pArg = mpPlugMgr->getPlugInArg();
      if (pArg != NULL)
      {
         pArg->setName(Executable::ProgressArg());
         pArg->setType("Progress");
         pArg->setDefaultValue(NULL);
         pArg->setDescription(Executable::ProgressArgDescription());
         bSuccess = pArgList->addArg(*pArg);
      }
   }
   return bSuccess;
}
Exemple #10
0
bool CreateExportFileDescriptor::getOutputSpecification(PlugInArgList*& pArgList)
{
   Service<PlugInManagerServices> pPlugInManager;
   VERIFY(pPlugInManager.get() != NULL);

   // Set up list
   pArgList = pPlugInManager->getPlugInArgList();
   VERIFY(pArgList != NULL);

   // Add args
   PlugInArg* pArg = pPlugInManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("File Descriptor");                  // File descriptor
   pArg->setType("FileDescriptor");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Resulting descriptor.");
   pArgList->addArg(*pArg);

   return true;
}
Exemple #11
0
bool ResultsExporter::getInputSpecification(PlugInArgList*& pArgList)
{
    // Set up list
    pArgList = mpPlugInManager->getPlugInArgList();
    VERIFY(pArgList != NULL);

    PlugInArg* pArg = mpPlugInManager->getPlugInArg();
    VERIFY(pArg != NULL);
    pArg->setName(Executable::ProgressArg());
    pArg->setType("Progress");
    pArg->setDefaultValue(NULL);
    pArg->setDescription(Executable::ProgressArgDescription());
    pArgList->addArg(*pArg);

    pArg = mpPlugInManager->getPlugInArg();
    VERIFY(pArg != NULL);
    pArg->setName(Exporter::ExportItemArg());
    pArg->setType("RasterElement");
    pArg->setDefaultValue(NULL);
    pArg->setDescription("Element to be exported.");
    pArgList->addArg(*pArg);

    pArg = mpPlugInManager->getPlugInArg();
    VERIFY(pArg != NULL);
    pArg->setName(Exporter::ExportDescriptorArg());
    pArg->setType("RasterFileDescriptor");
    pArg->setDefaultValue(NULL);
    pArg->setDescription("File descriptor for the output file.");
    pArgList->addArg(*pArg);

    if (!mbInteractive)
    {
        pArg = mpPlugInManager->getPlugInArg();
        VERIFY(pArg != NULL);
        pArg->setName("Pass Area");
        pArg->setType("PassArea");
        pArg->setDefaultValue(&mPassArea);
        pArg->setDescription("The area of the threshold from which results should be exported.");
        pArgList->addArg(*pArg);

        pArg = mpPlugInManager->getPlugInArg();
        VERIFY(pArg != NULL);
        pArg->setName("First Threshold");
        pArg->setType("double");
        pArg->setDefaultValue(&mFirstThreshold);
        pArg->setDescription("The lower boundary of the threshold.");
        pArgList->addArg(*pArg);

        pArg = mpPlugInManager->getPlugInArg();
        VERIFY(pArg != NULL);
        pArg->setName("Second Threshold");
        pArg->setType("double");
        pArg->setDefaultValue(&mSecondThreshold);
        pArg->setDescription("The upper boundary of the threshold.");
        pArgList->addArg(*pArg);

        pArg = mpPlugInManager->getPlugInArg();
        VERIFY(pArg != NULL);
        pArg->setName("Geocoordinate Type");
        pArg->setType("GeocoordType");
        pArg->setDefaultValue(&mGeocoordType);
        pArg->setDescription("Coordinate type for georeferenced files.");
        pArgList->addArg(*pArg);

        pArg = mpPlugInManager->getPlugInArg();
        VERIFY(pArg != NULL);
        pArg->setName("Metadata");
        pArg->setType("bool");
        pArg->setDefaultValue(&mbMetadata);
        pArg->setDescription("Whether associated metadata should be exported.");
        pArgList->addArg(*pArg);

        pArg = mpPlugInManager->getPlugInArg();
        VERIFY(pArg != NULL);
        pArg->setName("Append To File");
        pArg->setType("bool");
        pArg->setDefaultValue(&mbAppendFile);
        pArg->setDescription("Whether to append to an existing file or create a new file for the results.");
        pArgList->addArg(*pArg);
    }

    return true;
}
Exemple #12
0
bool BandMath::getInputSpecification(PlugInArgList*& pArgList)
{
   // Set up list
   pArgList = mpPluginManager->getPlugInArgList();
   VERIFY(pArgList != NULL);

   PlugInArg* pArg = mpPluginManager->getPlugInArg();  //progress
   VERIFY(pArg != NULL);
   pArg->setName(Executable::ProgressArg());
   pArg->setType("Progress");
   pArg->setDefaultValue(NULL);
   pArg->setDescription(Executable::ProgressArgDescription());
   pArgList->addArg(*pArg);

   pArg = mpPluginManager->getPlugInArg();     //cube
   VERIFY(pArg != NULL);
   pArg->setName(Executable::DataElementArg());
   pArg->setType("RasterElement");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Element on which band math will be performed.");
   pArgList->addArg(*pArg);

   if (!mbInteractive)
   {
      pArg = mpPluginManager->getPlugInArg();    //cube2
      VERIFY(pArg != NULL);
      pArg->setName("Raster Element 2");
      pArg->setType("RasterElement");
      pArg->setDefaultValue(NULL);
      pArg->setDescription("Second element to perform band math on.");
      pArgList->addArg(*pArg);

      pArg = mpPluginManager->getPlugInArg();     //cube3
      VERIFY(pArg != NULL);
      pArg->setName("Raster Element 3");
      pArg->setType("RasterElement");
      pArg->setDefaultValue(NULL);
      pArg->setDescription("Third element to perform band math on.");
      pArgList->addArg(*pArg);

      pArg = mpPluginManager->getPlugInArg();     //cube4
      VERIFY(pArg != NULL);
      pArg->setName("Raster Element 4");
      pArg->setType("RasterElement");
      pArg->setDefaultValue(NULL);
      pArg->setDescription("Fourth element to perform band math on.");
      pArgList->addArg(*pArg);

      pArg = mpPluginManager->getPlugInArg();     //cube5
      VERIFY(pArg != NULL);
      pArg->setName("Raster Element 5");
      pArg->setType("RasterElement");
      pArg->setDefaultValue(NULL);
      pArg->setDescription("Fifth element to perform band math on.");
      pArgList->addArg(*pArg);

      pArg = mpPluginManager->getPlugInArg();    // Input Expression
      VERIFY(pArg != NULL);
      pArg->setName("Input Expression");
      pArg->setType("string");
      pArg->setDefaultValue(&mExpression);
      pArg->setDescription("Expression for band math to evaluate.");
      pArgList->addArg(*pArg);

      bool temp = true;
      pArg = mpPluginManager->getPlugInArg();    // Display Results
      VERIFY(pArg != NULL);
      pArg->setName("Display Results");
      pArg->setType("bool");
      pArg->setDefaultValue(&temp);
      pArg->setDescription("Whether or not to display the result of the band math operation.");
      pArgList->addArg(*pArg);

      temp = false;
      pArg = mpPluginManager->getPlugInArg();
      VERIFY(pArg != NULL);
      pArg->setName("Degrees");
      pArg->setType("bool");
      pArg->setDefaultValue(&temp);
      pArg->setDescription("True causes band math to use degrees; false uses radians (default).");
      pArgList->addArg(*pArg);

      VERIFY(pArgList->addArg<bool>("Overlay Results", mbAsLayerOnExistingView, "Flag for whether "
         "the results should be added to the original view or a new view.  A new view is created "
         "by default if results are displayed."));
   }

   return true;
}
Exemple #13
0
bool CreateExportFileDescriptor::getInputSpecification(PlugInArgList*& pArgList)
{
   bool bSuccess = ModelItems::getInputSpecification(pArgList);
   if (bSuccess == false)
   {
      return false;
   }

   VERIFY(pArgList != NULL);

   Service<PlugInManagerServices> pPlugInManager;
   VERIFY(pPlugInManager.get() != NULL);

   // Add args
   PlugInArg* pArg = pPlugInManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("Filename");                         // Filename
   pArg->setType("Filename");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Location on-disk for the file data.");
   pArgList->addArg(*pArg);

   pArg = pPlugInManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("Data Set");                         // Data element
   pArg->setType("DataElement");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Element to create the new descriptor from.");
   pArgList->addArg(*pArg);

   pArg = pPlugInManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("Start Row");                        // Start row
   pArg->setType("unsigned int");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Beginning row for this descriptor.");
   pArgList->addArg(*pArg);

   pArg = pPlugInManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("End Row");                          // End row
   pArg->setType("unsigned int");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Ending row for this descriptor.");
   pArgList->addArg(*pArg);

   pArg = pPlugInManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("Row Skip Factor");                  // Row skip factor
   pArg->setType("unsigned int");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Row skip factor for this descriptor.");
   pArgList->addArg(*pArg);

   pArg = pPlugInManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("Start Column");                     // Start column
   pArg->setType("unsigned int");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Beginning column for this descriptor.");
   pArgList->addArg(*pArg);

   pArg = pPlugInManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("End Column");                       // End column
   pArg->setType("unsigned int");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Ending column for this descriptor.");
   pArgList->addArg(*pArg);

   pArg = pPlugInManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("Column Skip Factor");               // Column skip factor
   pArg->setType("unsigned int");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Column skip factor for this descriptor.");
   pArgList->addArg(*pArg);

   pArg = pPlugInManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("Start Band");                       // Start band
   pArg->setType("unsigned int");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Beginning band for this descriptor.");
   pArgList->addArg(*pArg);

   pArg = pPlugInManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("End Band");                         // End band
   pArg->setType("unsigned int");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Ending band for this descriptor.");
   pArgList->addArg(*pArg);

   pArg = pPlugInManager->getPlugInArg();
   VERIFY(pArg != NULL);
   pArg->setName("Band Skip Factor");                 // Band skip factor
   pArg->setType("unsigned int");
   pArg->setDefaultValue(NULL);
   pArg->setDescription("Band skip factor for this descriptor.");
   pArgList->addArg(*pArg);

   return true;
}