const bool complete) const
# else
  bool fastViewer::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {
      lti::write(handler, "topleft", topleft);
      lti::write(handler, "noBorder", noBorder);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && viewerBase::parameters::write(handler,false);
# else
    bool (viewerBase::parameters::* p_writeMS)(ioHandler&,const bool) const =
      viewerBase::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool huMoments::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {

      lti::write(handler,"scaling",scaling);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && globalFeatureExtractor::parameters::write(handler,false);
# else
    bool (globalFeatureExtractor::parameters::* p_writeMS)(ioHandler&,const bool) const =
      globalFeatureExtractor::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool shClassifier::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {
      b=b && lti::write(handler, "numberOfBins",numberOfBins);
      b=b && lti::write(handler, "binVector",binVector);
      b=b && lti::write(handler, "minimum",minimum);
      b=b && lti::write(handler, "maximum",maximum);
      b=b && lti::write(handler, "autoBounds", autoBounds);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && supervisedInstanceClassifier::parameters::write(handler,false);
# else
    bool (supervisedInstanceClassifier::parameters::* p_writeMS)(ioHandler&,const bool) const =
      supervisedInstanceClassifier::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool labelAdjacencyMap::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {

      lti::write(handler,"minColors",minColors);
      lti::write(handler,"thePalette",thePalette);
      lti::write(handler,"neighborhood",neighborhood);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && functor::parameters::write(handler,false);
# else
    bool (functor::parameters::* p_writeMS)(ioHandler&,const bool) const =
      functor::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool sigmoidKernel::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {
      b=b && lti::write(handler, "kappa", kappa);
      b=b && lti::write(handler, "theta", theta);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && kernelFunctor<double>::parameters::write(handler,false);
# else
    bool (kernelFunctor<double>::parameters::* p_writeMS)(ioHandler&,const bool) const =
      kernelFunctor<double>::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool homography8DofEstimator::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {
      
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && homographyEstimatorBase::parameters::write(handler,false);
# else
    bool (homographyEstimatorBase::parameters::* p_writeMS)
      (ioHandler&,const bool) const =
      homographyEstimatorBase::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool regionMerge::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {

      lti::write(handler,"threshold",threshold);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && functor::parameters::write(handler,false);
# else
    bool (functor::parameters::* p_writeMS)(ioHandler&,const bool) const =
      functor::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool medianCut::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {

      lti::write(handler,"preQuant",preQuant);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && colorQuantization::parameters::write(handler,false);
# else
    bool (colorQuantization::parameters::* p_writeMS)(ioHandler&,
                                                      const bool) const =
      colorQuantization::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
Example #9
0
                                         const bool complete) const
# else
  bool SOFM2D::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {

      lti::write(handler,"area",area);
      lti::write(handler,"sizeX",sizeX);
      lti::write(handler,"sizeY",sizeY);
      lti::write(handler,"calculateSize",calculateSize);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && SOFM::parameters::write(handler,false);
# else
    bool (SOFM::parameters::* p_writeMS)(ioHandler&,const bool) const =
      SOFM::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool kNearestNeighFilter::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {

	lti::write(handler,"kernelSize",kernelSize);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && filter::parameters::write(handler,false);
# else
    bool (filter::parameters::* p_writeMS)(ioHandler&,const bool) const =
      filter::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool distanceTransform::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {
      switch(distance) {
        case EightNeighborhood:
          lti::write(handler, "distance","EightNeighborhood");
          break;
        case FourNeighborhood:
          lti::write(handler, "distance","FourNeighborhood");
          break;
        case EuclideanSqr:
          lti::write(handler, "distance","EuclideanSqr");
          break;
        case Euclidean:
          lti::write(handler, "distance","Euclidean");
          break;
        case EightSED:
            lti::write(handler,"distance","EightSED");
          break;
        case EightSEDSqr:
            lti::write(handler,"distance","EightSEDSqr");
          break;
        case FourSED:
            lti::write(handler,"distance","FourSED");
          break;
        case FourSEDSqr:
            lti::write(handler,"distance","FourSEDSqr");
          break;

        default:
          lti::write(handler, "distance","EightNeighborhood");
          break;
      }
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && morphology::parameters::write(handler,false);
# else
    bool (morphology::parameters::* p_writeMS)(ioHandler&,const bool) const =
      morphology::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
Example #12
0
                               const bool complete) const 
# else
    bool sffs::parameters::writeMS(ioHandler& handler,
                                   const bool complete) const 
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {

      usedCostFunction->write(handler,false);      
//       lti::write(handler,"classifier",classifier->getTypeName());
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to 
    // compile...
    b = b && featureSelector::parameters::write(handler,false);
# else
    bool (featureSelector::parameters::* p_writeMS)(ioHandler&,const bool) const = 
      featureSelector::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
Example #13
0
                                         const bool complete) const
# else
  bool MLP::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {

      switch(trainingMode) {
        case SteepestDescent:
          lti::write(handler,"trainingMode","SteepestDescent");
          break;
        case ConjugateGradients:
          lti::write(handler,"trainingMode","ConjugateGradients");
          break;
        default:
          lti::write(handler,"trainingMode","SteepestDescent");
      };

      lti::write(handler,"batchMode",batchMode);
      lti::write(handler,"momentum",momentum);
      lti::write(handler,"hiddenUnits",hiddenUnits);
      lti::write(handler,"learnrate",learnrate);
      lti::write(handler,"maxNumberOfEpochs",maxNumberOfEpochs);
      lti::write(handler,"stopError",stopError);

      className classNamer;

      unsigned int i;

      for (i=0;i<activationFunctions.size();++i) {
        lti::write(handler,"activationFunctorType",
                   classNamer.get(*activationFunctions[i]));
        lti::write(handler,"functor",*activationFunctions[i]);
      }

    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && supervisedInstanceClassifier::parameters::write(handler,false);
# else
    bool (supervisedInstanceClassifier::parameters::* p_writeMS)(ioHandler&,const bool) const =
      supervisedInstanceClassifier::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
Example #14
0
  /*
   * write the classifier in the given ioHandler
   */
  bool svm::write(ioHandler& handler,const bool complete) const {
    bool b=true;
    if (complete) {
      b=handler.writeBegin();
    }
    b = b && supervisedInstanceClassifier::write(handler,false);
    if (b) {
      b=b && lti::write(handler, "nClasses",nClasses);
      b=b && lti::write(handler, "alpha",alpha);
      b=b && lti::write(handler, "vectors",*trainData);
      b=b && lti::write(handler, "idMap",idMap);
      b=b && lti::write(handler, "rIdMap",rIdMap);
      b=b && lti::write(handler, "srcIds",srcIds);
      b=b && lti::write(handler, "bias", bias);
      b=b && lti::write(handler, "nKernels", kernels.size());
      b=b && handler.writeBegin();
      b=b && lti::write(handler, "kernels");
      b=b && handler.writeDataSeparator();
      className cn;
      std::string kname;
      // always write the complete kernel vector, so we do not need
      // to remember which training methods has been used.
      for (unsigned int i=0; i<kernels.size(); i++) {
        if (kernels[i] != 0) {
          cn.get(kernels[i],kname);
          lti::write(handler,"name",kname);
          b=b && kernels[i]->write(handler);
        } else {
          lti::write(handler,"name","unknown");
        }
      }
      b=b && handler.writeEnd();
      b=b && lti::write(handler, "offset", offset);
      b=b && lti::write(handler, "scale", scale);

    }
    if (complete) {
      b=handler.writeEnd();
    }
    return b;
  }
Example #15
0
                                         const bool complete) const
# else
  bool camera::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {
      lti::write(handler,"autoWhiteBalance",autoWhiteBalance);
      lti::write(handler,"autoGain",autoGain);
      lti::write(handler,"gain",gain);
      lti::write(handler,"redGain",redGain);
      lti::write(handler,"blueGain",blueGain);
      lti::write(handler,"minGain",minGain);
      lti::write(handler,"maxGain",maxGain);
      lti::write(handler,"minRBGain",minRBGain);
      lti::write(handler,"maxRBGain",maxRBGain);
      lti::write(handler,"autoShutter",autoShutter);
      lti::write(handler,"shutterSpeed",shutterSpeed);
      lti::write(handler,"minShutterSpeed",minShutterSpeed);
      lti::write(handler,"maxShutterSpeed",maxShutterSpeed);
      lti::write(handler,"autoFocus",autoFocus);
      lti::write(handler,"focus",focus);
      lti::write(handler,"minFocus",minFocus);
      lti::write(handler,"maxFocus",maxFocus);
      lti::write(handler,"zoom",zoom);
      lti::write(handler,"maxZoom",maxZoom);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && functor::parameters::write(handler,false);
# else
    bool (functor::parameters::* p_writeMS)(ioHandler&,const bool) const =
      functor::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
Example #16
0
                                         const bool complete) const
# else
  bool svm::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {
      if (kernel != 0) {
        std::string kernelName;
        cn.get(kernel,kernelName);
        b=b && lti::write(handler, "haveKernel", true);
        b=b && lti::write(handler, "kernelType", kernelName);
        b=b && lti::write(handler, "kernelParam", kernel->getParameters());
      } else {
        b=b && lti::write(handler, "haveKernel", false);
        b=b && lti::write(handler, "kernelType", "unknown");
      }
      b=b && lti::write(handler,"nSupport",nSupport);
      b=b && lti::write(handler, "C", C);
      b=b && lti::write(handler, "bias", bias);
      b=b && lti::write(handler, "tolerance", tolerance);
      b=b && lti::write(handler, "epsilon", epsilon);
      b=b && lti::write(handler, "sumToOne", sumToOne);
      b=b && lti::write(handler, "usePairwise", usePairwise);
      b=b && lti::write(handler, "normalizeData", normalizeData);
      //lti::write(handler, "useKernelVector",useKernelVector);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && supervisedInstanceClassifier::parameters::write(handler,false);
# else
    bool (supervisedInstanceClassifier::parameters::* p_writeMS)(ioHandler&,const bool) const =
      supervisedInstanceClassifier::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                const bool complete) const
# else
    bool ioLTI::parameters::writeMS(ioHandler& handler,
                                    const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && ioFunctor::parameters::write(handler,false);
# else
    bool (ioFunctor::parameters::* p_writeMS)(ioHandler&,const bool) const =
      ioFunctor::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    std::string tmp;
    switch (compression) {
      case ioLTI::None:
        tmp="None";
        break;
      case ioLTI::Flate:
        tmp="Flate";
        break;
      case ioLTI::RunLength: 
        tmp="RunLength"; 
        break;
      default:  
        // error
        tmp="None";
        break;
    }
    lti::write(handler, "compression", tmp);

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool brightRGB::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    switch (type) {
    case Minimum:
      b = b && lti::write(handler,"type","Minimum");
      break;
    case Maximum:
      b = b && lti::write(handler,"type","Maximum");
      break;
    case Median:
      b = b && lti::write(handler,"type","Median");
      break;
    case Average:
      b = b && lti::write(handler,"type","Average");
      break;
    default:
      b = b && lti::write(handler,"type","Average");
    }

    b = b && lti::write(handler,"transparent",transparent);
    b = b && lti::write(handler,"transColor",transColor);

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && globalFeatureExtractor::parameters::write(handler,false);
# else
    bool (globalFeatureExtractor::parameters::* p_writeMS)
      (ioHandler&,const bool) const =
      globalFeatureExtractor::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
Example #19
0
                                         const bool complete) const
# else
  bool panTiltUnit::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {
      switch (angleFormat) {
      case Degrees:
	lti::write(handler,"angleFormat","Degrees");
	break;
      default:
	lti::write(handler,"angleFormat","Radiant");
	break;
      }
      lti::write(handler,"pan",pan);
      lti::write(handler,"tilt",tilt);
      lti::write(handler,"relativeMovement", relativeMovement);
      lti::write(handler,"minPan", minPan);
      lti::write(handler,"maxPan", maxPan);
      lti::write(handler,"minTilt", minTilt);
      lti::write(handler,"maxTilt", maxTilt);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && functor::parameters::write(handler,false);
# else
    bool (functor::parameters::* p_writeMS)(ioHandler&,const bool) const =
      functor::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
  bool centroidClustering::write(ioHandler& handler,const bool complete) const {
    bool b(true);

    if (complete) {
      b = handler.writeBegin();
    }

    // write the standard data (output and parameters)
    b = b && clustering::write(handler,false);

    b = b && lti::write(handler,"centroids",centroids);

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool fuzzyCMeans::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {

      lti::write(handler,"fuzzifier",fuzzifier);
      lti::write(handler,"epsilon",epsilon);
      lti::write(handler,"maxIterations",maxIterations);
      lti::write(handler,"nbOfClusters",nbOfClusters);
      switch(norm) {
        case L1:
          lti::write(handler,"norm","L1distance");
          break;
        case L2:
          lti::write(handler,"norm","L2distance");
          break;
      }
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && centroidClustering::parameters::write(handler,false);
# else
    bool (centroidClustering::parameters::* p_writeMS)(ioHandler&,const bool) const =
      centroidClustering::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
Example #22
0
  bool SOFM::write(ioHandler& handler,const bool complete) const {
    bool b(true);

    if (complete) {
      b = handler.writeBegin();
    }

    // write the standard data (output and parameters)
    unsupervisedClassifier::write(handler,false);

    if (b) {
      lti::write(handler,"grid",grid);
    }

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
Example #23
0
  bool SOFM2D::write(ioHandler& handler,const bool complete) const {
    bool b(true);

    if (complete) {
      b = handler.writeBegin();
    }

    // write the standard data (output and parameters)
    SOFM::write(handler,false);

    if (b) {
      lti::write(handler,"sizeX",sizeX);
      lti::write(handler,"sizeY",sizeY);
    }

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
  /*
   * write the parameters in the given ioHandler
   * @param handler the ioHandler to be used
   * @param complete if true (the default) the enclosing begin/end will
   *        be also written, otherwise only the data block will be written.
   * @return true if write was succeful
   */
  bool 
  cwagmSegmentationEvaluation::parameters::write(ioHandler& handler,
                                                 const bool& complete) const {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {
      lti::write(handler,"minValues",minValues);
      lti::write(handler,"maxValues",maxValues);
    }

    b = b && segmentationEvaluation::parameters::write(handler,false);

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                      const bool complete) const
# else
  bool correlation::parameters::writeMS(ioHandler& handler,
                                        const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {
      if (isNull(kernel)) {
        lti::write(handler,"kernelType","none");
      } else {
        lti::write(handler,"kernelType",kernel->getTypeName());
        lti::write(handler,"kernel",getKernel());
      }
      lti::write(handler,"maskPresent",notNull(mask));
      if (notNull(mask)) {
        mask->write(handler);
      }
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && filter::parameters::write(handler,false);
# else
    bool (modifier::parameters::* p_writeMS)(ioHandler&,const bool) const =
      modifier::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool harrisCorners::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {

      lti::write(handler,"variance",variance);
      lti::write(handler,"kernelSize",kernelSize);
      lti::write(handler,"maximumCorners",maximumCorners);
      lti::write(handler,"scale",scale);
      lti::write(handler,"localMaximaParameters",localMaximaParameters);
      lti::write(handler,"gradientFunctorParameters",
                 gradientFunctorParameters);
      
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && cornerDetector::parameters::write(handler,false);
# else
    bool (cornerDetector::parameters::* p_writeMS)(ioHandler&,const bool) const =
      cornerDetector::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
Example #27
0
  // write method
  bool MLP::write(ioHandler& handler,const bool complete) const {
    bool b(true);

    if (complete) {
      b = handler.writeBegin();
    }

    // write the standard data (output and parameters)
    supervisedInstanceClassifier::write(handler,false);

    if (b) {
      lti::write(handler,"inputs",inputs);
      lti::write(handler,"outputs",outputs);
      lti::write(handler,"weights",weights);

    }

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool histogramRGBL::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {

      lti::write(handler,"smooth",smooth);
      lti::write(handler,"normalize",normalize);
      lti::write(handler,"cells",cells);
      lti::write(handler,"considerAllData",considerAllData);
      lti::write(handler,"ignoreValue",ignoreValue);
      lti::write(handler,"kernel",kernel);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && globalFeatureExtractor::parameters::write(handler,false);
# else
    bool (globalFeatureExtractor::parameters::* p_writeMS)(ioHandler&,const bool) const =
      globalFeatureExtractor::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
                                         const bool complete) const
# else
  bool binomialDistribution::parameters::writeMS(ioHandler& handler,
                                           const bool complete) const
# endif
  {
    bool b = true;
    if (complete) {
      b = handler.writeBegin();
    }

    if (b) {

      lti::write(handler,"sampleSize",sampleSize);
      lti::write(handler,"events",events);
      lti::write(handler,"confidence",confidence);
      lti::write(handler,"accuracy",accuracy);
      lti::write(handler,"baseProbability",baseProbability);
    }

# ifndef _LTI_MSC_6
    // This is the standard C++ code, which MS Visual C++ 6 is not able to
    // compile...
    b = b && discreteRandomDistribution::parameters::write(handler,false);
# else
    bool (discreteRandomDistribution::parameters::* p_writeMS)(ioHandler&,const bool) const =
      discreteRandomDistribution::parameters::writeMS;
    b = b && (this->*p_writeMS)(handler,false);
# endif

    if (complete) {
      b = b && handler.writeEnd();
    }

    return b;
  }
  /*
   * write the classifier in the given ioHandler
   */
  bool shClassifier::write(ioHandler& handler,const bool complete) const {
    bool b=true;
    if (complete) {
      b=handler.writeBegin();
    }
    b = b && supervisedInstanceClassifier::write(handler,false);
    if (b) {

      // TODO: Write data
      b=b && lti::write(handler, "nClasses",nClasses);
      b=b && lti::write(handler, "idMap",idMap);
      b=b && lti::write(handler, "rIdMap",rIdMap);

      for (int i=0; i<nClasses; i++) {
        b=b && models[i]->write(handler);
      }

      //b=b && handler.writeEnd();
    }
    if (complete) {
      b=handler.writeEnd();
    }
    return b;
  }