Преглед изворни кода

towards persistent version of SemSegNovelty

Alexander Freytag пре 11 година
родитељ
комит
5365c04add
2 измењених фајлова са 518 додато и 107 уклоњено
  1. 411 58
      semseg/SemSegNovelty.cpp
  2. 107 49
      semseg/SemSegNovelty.h

+ 411 - 58
semseg/SemSegNovelty.cpp

@@ -19,12 +19,8 @@ using namespace std;
 using namespace NICE;
 using namespace OBJREC;
 
-SemSegNovelty::SemSegNovelty ( const Config *conf,
-                               const MultiDataset *md )
-    : SemanticSegmentation ( conf, & ( md->getClassNames ( "train" ) ) )
+void SemSegNovelty::init()
 {
-  this->conf = conf;
-
   globalMaxUncert = -numeric_limits<double>::max();
   
   string section = "SemSegNovelty";
@@ -39,23 +35,6 @@ SemSegNovelty::SemSegNovelty ( const Config *conf,
   resultdir = conf->gS("debug", "resultdir", "result");
   cache = conf->gS ( "cache", "root", "" );
   
-  
-  //stupid work around of the const attribute
-  Config confCopy = *conf;
-  
-  //just to make sure, that we do NOT perform an optimization after every iteration step
-  //this would just take a lot of time, which is not desired so far
-  confCopy.sB("ClassifierGPHIK","performOptimizationAfterIncrement",false);
-  
-  classifierString = conf->gS ( section, "classifier", "ClassifierGPHIK" );  
-  classifier = NULL;
-  vclassifier = NULL;
-  if ( classifierString.compare("ClassifierGPHIK") == 0)
-    classifier = new GPHIKClassifierNICE ( &confCopy, "ClassifierGPHIK" );
-  else
-    vclassifier = GenericClassifierSelection::selectVecClassifier ( conf, classifierString );
-  
-
 
   findMaximumUncert = conf->gB(section, "findMaximumUncert", true);
   whs = conf->gI ( section, "window_size", 10 );
@@ -79,38 +58,6 @@ SemSegNovelty::SemSegNovelty ( const Config *conf,
       regionSeg = tmpRegionSeg;
   }
   
-  cn = md->getClassNames ( "train" );
-
-  if ( read_classifier )
-  {
-    try
-    {
-      if ( classifier != NULL )
-      {
-        string classifierdst = "/classifier.data";        
-        fprintf ( stderr, "SemSegNovelty:: Reading classifier data from %s\n", ( cache + classifierdst ).c_str() );        
-        classifier->read ( cache + classifierdst );
-      }
-      else
-      {
-        string classifierdst = "/veccl.data";        
-        fprintf ( stderr, "SemSegNovelty:: Reading classifier data from %s\n", ( cache + classifierdst ).c_str() );          
-        vclassifier->read ( cache + classifierdst );      
-      }
-      
-
-      fprintf ( stderr, "SemSegNovelty:: successfully read\n" );
-    }
-    catch ( char *str )
-    {
-      cerr << "error reading data: " << str << endl;
-    }
-  }
-  else
-  {
-    train ( md );
-  }
-  
   //define which measure for "novelty" we want to use
   noveltyMethodString = conf->gS( section,  "noveltyMethod", "gp-variance");
   if (noveltyMethodString.compare("gp-variance") == 0)  // novel = large variance
@@ -163,7 +110,62 @@ SemSegNovelty::SemSegNovelty ( const Config *conf,
   
   //we don't have queried any region so far
   queriedRegions.clear();
-  visualizeALimages = conf->gB(section, "visualizeALimages", false);
+  visualizeALimages = conf->gB(section, "visualizeALimages", false);  
+}
+
+SemSegNovelty::SemSegNovelty ( const Config * _conf,
+                               const MultiDataset *md )
+    : SemanticSegmentation ( _conf, & ( md->getClassNames ( "train" ) ) )
+{
+  this->conf = new NICE::Config ( *_conf );
+  
+  // set internal variables, default values, and all those funny things
+  this->init ( );
+  
+  std::string section = "SemSegNovelty";
+  
+  classifierString = conf->gS ( section, "classifier", "GPHIKClassifier" );  
+  classifier = NULL;
+  vclassifier = NULL;
+  if ( classifierString.compare("GPHIKClassifier") == 0)
+  { 
+    //just to make sure, that we do NOT perform an optimization after every iteration step
+    //this would just take a lot of time, which is not desired so far
+    this->conf->sB( "GPHIKClassifier", "performOptimizationAfterIncrement", false );    
+    classifier = new GPHIKClassifierNICE ( this->conf, "GPHIKClassifier" );
+  }
+  else
+    vclassifier = GenericClassifierSelection::selectVecClassifier ( this->conf, classifierString );  
+    
+  if ( read_classifier )
+  {
+    try
+    {
+      if ( classifier != NULL )
+      {
+        string classifierdst = "/classifier.data";        
+        fprintf ( stderr, "SemSegNovelty:: Reading classifier data from %s\n", ( cache + classifierdst ).c_str() );        
+        classifier->read ( cache + classifierdst );
+      }
+      else
+      {
+        string classifierdst = "/veccl.data";        
+        fprintf ( stderr, "SemSegNovelty:: Reading classifier data from %s\n", ( cache + classifierdst ).c_str() );          
+        vclassifier->read ( cache + classifierdst );      
+      }
+      
+
+      fprintf ( stderr, "SemSegNovelty:: successfully read\n" );
+    }
+    catch ( char *str )
+    {
+      cerr << "error reading data: " << str << endl;
+    }
+  }
+  else
+  {
+    train ( md );
+  }  
 }
 
 SemSegNovelty::~SemSegNovelty()
@@ -191,6 +193,7 @@ SemSegNovelty::~SemSegNovelty()
     delete featExtract;
 }
 
+
 void SemSegNovelty::visualizeRegion(const NICE::ColorImage &img, const NICE::Matrix &regions, int region, NICE::ColorImage &outimage)
 {
   std::vector<uchar> color;
@@ -240,7 +243,7 @@ void SemSegNovelty::train ( const MultiDataset *md )
   {
     forbidden_classesTrain_s = conf->gS ( "analysis", "forbidden_classesTrain", "" );
   }
-  cn.getSelection ( forbidden_classesTrain_s, forbidden_classesTrain );
+  this->classNames->getSelection ( forbidden_classesTrain_s, forbidden_classesTrain );
   
 
   ProgressBar pb ( "Local Feature Extraction" );
@@ -433,7 +436,7 @@ void SemSegNovelty::semanticseg ( CachedExample *ce, NICE::Image & segresult, NI
   
   //segResult contains the GT labels when this method is called
   // we simply store them in labels, to have an easy access to the GT information lateron
-  Image labels = segresult;
+  NICE::Image labels = segresult;
   //just to be sure that we do not have a GT-biased result :)
   segresult.set(0);
 
@@ -445,7 +448,7 @@ void SemSegNovelty::semanticseg ( CachedExample *ce, NICE::Image & segresult, NI
   int xsize, ysize;
   ce->getImageSize ( xsize, ysize );
 
-  probabilities.reInit( xsize, ysize, cn.getMaxClassno() + 1);
+  probabilities.reInit( xsize, ysize, this->classNames->getMaxClassno() + 1);
   probabilities.setAll ( 0.0 );
    
   NICE::ColorImage img;
@@ -1517,3 +1520,353 @@ const Examples * SemSegNovelty::getNovelExamples() const
 {
   return &(this->newTrainExamples);
 }
+
+///////////////////// INTERFACE PERSISTENT /////////////////////
+// interface specific methods for store and restore
+///////////////////// INTERFACE PERSISTENT ///////////////////// 
+
+void SemSegNovelty::restore ( std::istream & is, int format )
+{
+  //delete everything we knew so far...
+  this->clear();
+  
+  bool b_restoreVerbose ( false );
+#ifdef B_RESTOREVERBOSE
+  b_restoreVerbose = true;
+#endif  
+  
+  if ( is.good() )
+  {
+    if ( b_restoreVerbose ) 
+      std::cerr << " restore SemSegNovelty" << std::endl;
+    
+    std::string tmp;
+    is >> tmp; //class name 
+    
+    if ( ! this->isStartTag( tmp, "SemSegNovelty" ) )
+    {
+      std::cerr << " WARNING - attempt to restore SemSegNovelty, but start flag " << tmp << " does not match! Aborting... " << std::endl;
+      throw;
+    }   
+    
+    if (classifier != NULL)
+    {
+      delete classifier;
+      classifier = NULL;
+    }    
+    
+    is.precision (numeric_limits<double>::digits10 + 1);
+    
+    bool b_endOfBlock ( false ) ;
+    
+    while ( !b_endOfBlock )
+    {
+      is >> tmp; // start of block 
+      
+      if ( this->isEndTag( tmp, "SemSegNovelty" ) )
+      {
+        b_endOfBlock = true;
+        continue;
+      }      
+      
+      tmp = this->removeStartTag ( tmp );
+      
+      if ( b_restoreVerbose )
+        std::cerr << " currently restore section " << tmp << " in SemSegNovelty" << std::endl;
+      
+      if ( tmp.compare("Config") == 0 )
+      {
+        //TODO think about to put the config fix as first part in store restore... currently, its position is flexible
+        // possibly obsolete safety checks
+        if ( conf == NULL )
+          conf = new Config;
+        conf->clear();        
+        
+        //we do not want to read until the end of the file
+        conf->setIoUntilEndOfFile( false );
+        //load every options we determined explicitely
+        conf->restore(is, format);
+        
+        // set internal variables, default values, and all those funny things
+        this->init(); 
+        
+        is >> tmp; // end of block 
+        tmp = this->removeEndTag ( tmp );
+      }
+      else if ( tmp.compare("classifier") == 0 )
+      {
+        std::string isNull;
+        is >> isNull;
+        
+        // check whether we originally used a classifier
+        if ( isNull.compare( "NULL" ) == 0 )
+        {
+          if ( classifier != NULL )
+            delete classifier;
+          classifier = NULL;
+        }
+        else
+        {
+          if ( classifier == NULL )
+            classifier = new OBJREC::GPHIKClassifierNICE();
+
+          classifier->restore(is, format);              
+        }
+          
+        is >> tmp; // end of block 
+        tmp = this->removeEndTag ( tmp );
+      }
+      else if ( tmp.compare("vclassifier") == 0 )
+      {
+        std::string isNull;
+        is >> isNull;
+        
+        // check whether we originally used a vclassifier
+        if ( isNull.compare( "NULL" ) == 0 )
+        {
+          if ( vclassifier != NULL )
+            delete vclassifier;
+          vclassifier = NULL;
+        }
+        else
+        {
+          fthrow ( NICE::Exception, "Restoring of VecClassifiers is not implemented yet!" );
+/*          if ( vclassifier == NULL )
+            vclassifier = new OBJREC::VecClassifier();
+
+          vclassifier->restore(is, format);  */          
+        }
+          
+        is >> tmp; // end of block 
+        tmp = this->removeEndTag ( tmp );
+      }      
+      else if ( tmp.compare("forbidden_classesTrain") == 0 )
+      {
+        is >> tmp; // size
+        int forbClTrainSize ( 0 );
+        is >> forbClTrainSize;
+
+        forbidden_classesTrain.clear();
+        
+        if ( b_restoreVerbose ) 
+          std::cerr << "restore forbidden_classesTrain with size: " << forbClTrainSize << std::endl;
+
+        if ( forbClTrainSize > 0 )
+        {
+          if ( b_restoreVerbose ) 
+            std::cerr << " restore forbidden_classesTrain" << std::endl;
+          
+          for (int i = 0; i < forbClTrainSize; i++)
+          {
+            int classNo;
+            is >> classNo;        
+            forbidden_classesTrain.insert ( classNo );
+          }
+        } 
+        else
+        {
+          if ( b_restoreVerbose ) 
+            std::cerr << " skip restoring forbidden_classesTrain" << std::endl;
+        }
+        
+        is >> tmp; // end of block 
+        tmp = this->removeEndTag ( tmp );
+      }
+      else if ( tmp.compare("forbidden_classesActiveLearning") == 0 )
+      {
+        is >> tmp; // size
+        int forbClALSize ( 0 );
+        is >> forbClALSize;
+
+        forbidden_classesActiveLearning.clear();
+        
+        if ( b_restoreVerbose ) 
+          std::cerr << "restore forbidden_classesActiveLearning with size: " << forbClALSize << std::endl;
+
+        if ( forbClALSize > 0 )
+        {
+          if ( b_restoreVerbose ) 
+            std::cerr << " restore forbidden_classesActiveLearning" << std::endl;
+          
+          for (int i = 0; i < forbClALSize; i++)
+          {
+            int classNo;
+            is >> classNo;        
+            forbidden_classesActiveLearning.insert ( classNo );
+          }
+        } 
+        else
+        {
+          if ( b_restoreVerbose ) 
+            std::cerr << " skip restoring forbidden_classesActiveLearning" << std::endl;
+        }
+        
+        is >> tmp; // end of block 
+        tmp = this->removeEndTag ( tmp );
+      }
+      else if ( tmp.compare("classesInUse") == 0 )
+      {
+        is >> tmp; // size
+        int clInUseSize ( 0 );
+        is >> clInUseSize;
+
+        classesInUse.clear();
+        
+        if ( b_restoreVerbose ) 
+          std::cerr << "restore classesInUse with size: " << clInUseSize << std::endl;
+
+        if ( clInUseSize > 0 )
+        {
+          if ( b_restoreVerbose ) 
+            std::cerr << " restore classesInUse" << std::endl;
+          
+          for (int i = 0; i < clInUseSize; i++)
+          {
+            int classNo;
+            is >> classNo;        
+            classesInUse.insert ( classNo );
+          }
+        } 
+        else
+        {
+          if ( b_restoreVerbose ) 
+            std::cerr << " skip restoring classesInUse" << std::endl;
+        }
+        
+        is >> tmp; // end of block 
+        tmp = this->removeEndTag ( tmp );
+      } 
+      else
+      {
+      std::cerr << "WARNING -- unexpected SemSegNovelty object -- " << tmp << " -- for restoration... aborting" << std::endl;
+      throw;
+      }
+    }
+  }
+  else
+  {
+    std::cerr << "SemSegNovelty::restore -- InStream not initialized - restoring not possible!" << std::endl;
+    throw;
+  }
+  
+  
+ 
+}
+
+void SemSegNovelty::store ( std::ostream & os, int format ) const
+{ 
+  if (os.good())
+  {
+    // show starting point
+    os << this->createStartTag( "SemSegNovelty" ) << std::endl;    
+    
+    os.precision (numeric_limits<double>::digits10 + 1);
+    
+    os << this->createStartTag( "Config" ) << std::endl;
+    //we do not want to read until end of file for restoring    
+    conf->setIoUntilEndOfFile(false);
+    conf->store(os,format);
+    os << this->createEndTag( "Config" ) << std::endl;    
+    
+
+    
+    // now, write all variables which might have changed over time compared to initial settings
+    
+    os << this->createStartTag( "forbidden_classesTrain" ) << std::endl;
+    os << "size: " << forbidden_classesTrain.size() << std::endl;
+
+    for ( std::set< int >::const_iterator itForbClassTrain = forbidden_classesTrain.begin();
+          itForbClassTrain != forbidden_classesTrain.end();
+          itForbClassTrain++
+        )
+    {
+      os << *itForbClassTrain << " " << std::endl;
+    }   
+    os << this->createEndTag( "forbidden_classesTrain" ) << std::endl;
+    
+    //
+    
+    os << this->createStartTag( "forbidden_classesActiveLearning" ) << std::endl;
+    os << "size: " << forbidden_classesActiveLearning.size() << std::endl;
+
+    for ( std::set< int >::const_iterator itForbClassAL = forbidden_classesActiveLearning.begin();
+          itForbClassAL != forbidden_classesActiveLearning.end();
+          itForbClassAL++
+        )
+    {
+      os << *itForbClassAL << " " << std::endl;
+    }   
+    os << this->createEndTag( "forbidden_classesActiveLearning" ) << std::endl;     
+    
+    //
+    
+    os << this->createStartTag( "classesInUse" ) << std::endl;
+    os << "size: " << classesInUse.size() << std::endl;
+
+    for ( std::set< int >::const_iterator itClassesInUse = classesInUse.begin();
+          itClassesInUse != classesInUse.end();
+          itClassesInUse++
+        )
+    {
+      os << *itClassesInUse << " " << std::endl;
+    }   
+    os << this->createEndTag( "classesInUse" ) << std::endl;
+    
+    //
+    
+    os << this->createStartTag( "classifier" ) << std::endl;
+    if ( this->classifier != NULL )
+    {
+      os << "NOTNULL" << std::endl;
+      classifier->store ( os, format );
+    }
+    else
+    {
+     os << "NULL" << std::endl;
+    }
+    os << this->createEndTag( "classifier" ) << std::endl;
+    
+    //
+    
+    os << this->createStartTag( "vclassifier" ) << std::endl;
+    if ( this->classifier != NULL )
+    {
+      os << "NOTNULL" << std::endl;
+      vclassifier->store ( os, format );
+    }
+    else
+    {
+     os << "NULL" << std::endl;
+    }
+    os << this->createEndTag( "vclassifier" ) << std::endl;    
+        
+    //TODO classnames?
+    
+    //TODO
+/*    
+    os << this->createStartTag( "queriedRegions" ) << std::endl;
+    os << "size: " << queriedRegions.size() << std::endl;
+
+    for ( std::map<std::string,std::set<int> >::const_iterator itQueriedReg = queriedRegions.begin();
+          itQueriedReg != queriedRegions.end();
+          itQueriedReg++
+        )
+    {
+      os << *itForbClassTrain << " " << std::endl;
+    }   
+    os << this->createEndTag( "queriedRegions" ) << std::endl;   */   
+    
+    
+    // done
+    os << this->createEndTag( "SemSegNovelty" ) << std::endl;    
+  }
+  else
+  {
+    std::cerr << "OutStream not initialized - storing not possible!" << std::endl;
+  }
+}
+
+void SemSegNovelty::clear ()
+{
+ //TODO
+}

+ 107 - 49
semseg/SemSegNovelty.h

@@ -4,27 +4,43 @@
  * @author Björn Fröhlich, Alexander Freytag
  * @date 04/24/2009
  */
-#ifndef SemSegNoveltyINCLUDE
-#define SemSegNoveltyINCLUDE
+#ifndef _NICE_SEMSEGNOVELTYINCLUDE
+#define _NICE_SEMSEGNOVELTYINCLUDE
 
-#include "SemanticSegmentation.h"
 
+// nice-core includes
+#include <core/basics/Persistent.h>
+
+// nice-vislearning includes
+#include <vislearning/classifier/classifierbase/FeaturePoolClassifier.h>
+#include <vislearning/classifier/genericClassifierSelection.h>
+#include <vislearning/features/localfeatures/LocalFeatureColorWeijer.h>
+
+// nice-segmentation includes
+#include <segmentation/RegionSegmentationMethod.h>
+
+// nice-semseg includes
+#include "SemanticSegmentation.h"
 #include "SemSegTools.h"
-#include "vislearning/classifier/classifierbase/FeaturePoolClassifier.h"
-#include "vislearning/classifier/genericClassifierSelection.h"
-#include "vislearning/features/localfeatures/LocalFeatureColorWeijer.h"
 
-#include "segmentation/RegionSegmentationMethod.h"
 
 
 /** @brief pixelwise labeling systems */
 
 namespace OBJREC {
 
-class SemSegNovelty : public SemanticSegmentation
+class SemSegNovelty : public SemanticSegmentation, public NICE::Persistent
 {
 
   protected:
+    
+    ////////////////////////////////////////
+    // variables only setable via configfile
+    ////////////////////////////////////////
+    
+    //! Configuration File
+    NICE::Config *conf;    
+    
     //! boolean whether to reuse segmentation results for single images in different runs
     bool reuseSegmentation;
 
@@ -37,16 +53,6 @@ class SemSegNovelty : public SemanticSegmentation
     //! The cached Data
     std::string cache;
     
-    //! Classifier
-    FeaturePoolClassifier *classifier;
-    VecClassifier *vclassifier;
-    
-    //! feature extraction
-    LocalFeatureColorWeijer *featExtract;
-    
-    //! Configuration File
-    const NICE::Config *conf;
-    
     //! distance between features for training
     int trainWsize;
     
@@ -55,21 +61,9 @@ class SemSegNovelty : public SemanticSegmentation
     
     //! rectangle size for classification, 1 means pixelwise
     int testWSize;
+
     
-    //! name of all classes
-    ClassNames cn;
-    
-    //! low level Segmentation method
-    RegionSegmentationMethod *regionSeg;
-    
-    //! set of forbidden/background classes for the initial training
-    std::set<int> forbidden_classesTrain;
-    //! set of forbidden/background classes for the whole process of learning over time
-    std::set<int> forbidden_classesActiveLearning;
-    //! store the class numbers currently used
-    std::set<int> classesInUse;
-        
-    //! obviously, the number of classes used for training (i.e., classesInUse.size() )
+   //! obviously, the number of classes used for training (i.e., classesInUse.size() )
     int numberOfClasses; 
     
     //! where to save the resulting images (uncertainty and classification results)
@@ -82,21 +76,7 @@ class SemSegNovelty : public SemanticSegmentation
     NICE::ColorImage maskedImg;
     
     //! for debugging and visualization: show novelty images with and without region segmentation and the most novel region
-    bool visualizeALimages;
-    
-    //! maximum uncertainty over all images, i.e., the novelty score of the most "novel" region of all test images
-    double globalMaxUncert;
-    
-    //! determine whether a "novelty" method computes large scores for novel objects (e.g., variance), or small scores (e.g., min abs mean)
-    bool mostNoveltyWithMaxScores;
-    
-    //! current examples for most uncertain region
-    Examples newTrainExamples;
-    
-    //! contains filenames of images and indices of contained regions, that where already queried, to prevent them from being queried again
-    std::map<std::string,std::set<int> > queriedRegions;
-    
-    std::pair<std::string, int> currentRegionToQuery;
+    bool visualizeALimages;   
     
     enum NoveltyMethod{
       GPVARIANCE, // novel = large variance
@@ -115,7 +95,62 @@ class SemSegNovelty : public SemanticSegmentation
     std::string noveltyMethodString;
     
     //! just store the name of our classifier
-    std::string classifierString;
+    std::string classifierString;   
+    
+    //! feature extraction
+    LocalFeatureColorWeijer *featExtract; 
+    
+    //! low level Segmentation method
+    RegionSegmentationMethod *regionSeg;    
+    
+    ////////////////////////////////////////
+    //         changeable variables 
+    //      those guys should be stored
+    ////////////////////////////////////////
+
+    //! Classifier
+    FeaturePoolClassifier *classifier;
+    VecClassifier *vclassifier;
+    
+
+    
+    //! set of forbidden/background classes for the initial training
+    std::set<int> forbidden_classesTrain;
+    //! set of forbidden/background classes for the whole process of learning over time
+    std::set<int> forbidden_classesActiveLearning;
+    //! store the class numbers currently used
+    std::set<int> classesInUse;  
+        
+    ////////////////////////////////////////
+    //         changeable variables 
+    //    which we currently ignore for storing
+    //////////////////////////////////////// 
+    
+    //! maximum uncertainty over all images, i.e., the novelty score of the most "novel" region of all test images
+    double globalMaxUncert;
+    
+    //! determine whether a "novelty" method computes large scores for novel objects (e.g., variance), or small scores (e.g., min abs mean)
+    bool mostNoveltyWithMaxScores;
+    
+    //! current examples for most uncertain region
+    Examples newTrainExamples;
+    
+    //! contains filenames of images and indices of contained regions, that where already queried, to prevent them from being queried again
+    std::map<std::string,std::set<int> > queriedRegions;
+    
+    std::pair<std::string, int> currentRegionToQuery;
+    
+
+    ///////////////////////////////
+    //     protected methods
+    ///////////////////////////////
+    
+    /**
+     * @brief setup all internal variables with are not adjustable lateron
+     * @author Alexander Freytag
+     * @date 29-01-2014 (dd-mm-yyyy)
+     */
+    void init();
     
     inline void computeClassificationResults( const NICE::MultiChannelImageT<double> & feats, 
                                                     NICE::Image & segresult,
@@ -221,8 +256,31 @@ class SemSegNovelty : public SemanticSegmentation
      * @return Examples *
      **/        
     virtual const Examples * getNovelExamples() const; 
+    
+    ///////////////////// INTERFACE PERSISTENT /////////////////////
+    // interface specific methods for store and restore
+    ///////////////////// INTERFACE PERSISTENT /////////////////////   
+    
+    /** 
+     * @brief Load active-segmentation-object from external file (stream)
+     * @author Alexander Freytag
+     */     
+    virtual void restore ( std::istream & is, int format = 0 );
+    
+    /** 
+     * @brief Save active-segmentation-object to external file (stream)
+     * @author Alexander Freytag
+     */       
+    virtual void store( std::ostream & os, int format = 0 ) const;
+    
+    /** 
+     * @brief Clear active-segmentation-object object
+     * @author Alexander Freytag
+     */    
+    virtual void clear ();
+    
 };
 
 } //namespace
 
-#endif
+#endif //_NICE_SEMSEGNOVELTYINCLUDE