Эх сурвалжийг харах

Renamed class 'Operation' to 'Operation3d'

Sven Sickert 11 жил өмнө
parent
commit
6c9f32a025

+ 22 - 22
semseg/SemSegContextTree3D.cpp

@@ -177,89 +177,89 @@ void SemSegContextTree3D::initOperations()
   string featsec = "Features";
   string featsec = "Features";
 
 
   // operation prototypes
   // operation prototypes
-  vector<Operation*> tops0, tops1, tops2, tops3, tops4, tops5;
+  vector<Operation3D*> tops0, tops1, tops2, tops3, tops4, tops5;
 
 
   if ( conf->gB ( featsec, "int", true ) )
   if ( conf->gB ( featsec, "int", true ) )
   {
   {
     tops2.push_back ( new IntegralOps() );
     tops2.push_back ( new IntegralOps() );
-    Operation* o = new IntegralOps();
+    Operation3D* o = new IntegralOps();
     o->setContext(true);
     o->setContext(true);
     tops3.push_back ( o );
     tops3.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "bi_int_cent", true ) )
   if ( conf->gB ( featsec, "bi_int_cent", true ) )
   {
   {
     tops2.push_back ( new BiIntegralCenteredOps() );
     tops2.push_back ( new BiIntegralCenteredOps() );
-    Operation* o = new BiIntegralCenteredOps();
+    Operation3D* o = new BiIntegralCenteredOps();
     o->setContext(true);
     o->setContext(true);
     tops3.push_back ( o );
     tops3.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "int_cent", true ) )
   if ( conf->gB ( featsec, "int_cent", true ) )
   {
   {
     tops2.push_back ( new IntegralCenteredOps() );
     tops2.push_back ( new IntegralCenteredOps() );
-    Operation* o = new IntegralCenteredOps();
+    Operation3D* o = new IntegralCenteredOps();
     o->setContext(true);
     o->setContext(true);
     tops3.push_back ( o );
     tops3.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "haar_horz", true ) )
   if ( conf->gB ( featsec, "haar_horz", true ) )
   {
   {
     tops2.push_back ( new HaarHorizontal() );
     tops2.push_back ( new HaarHorizontal() );
-    Operation* o = new HaarHorizontal();
+    Operation3D* o = new HaarHorizontal();
     o->setContext(true);
     o->setContext(true);
     tops3.push_back ( o );
     tops3.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "haar_vert", true ) )
   if ( conf->gB ( featsec, "haar_vert", true ) )
   {
   {
     tops2.push_back ( new HaarVertical );
     tops2.push_back ( new HaarVertical );
-    Operation* o = new HaarVertical();
+    Operation3D* o = new HaarVertical();
     o->setContext(true);
     o->setContext(true);
     tops3.push_back ( o );
     tops3.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "haar_stack", true ) )
   if ( conf->gB ( featsec, "haar_stack", true ) )
   {
   {
     tops2.push_back ( new HaarStacked() );
     tops2.push_back ( new HaarStacked() );
-    Operation* o = new HaarStacked();
+    Operation3D* o = new HaarStacked();
     o->setContext(true);
     o->setContext(true);
     tops3.push_back ( o );
     tops3.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "haar_diagxy", true ) )
   if ( conf->gB ( featsec, "haar_diagxy", true ) )
   {
   {
     tops2.push_back ( new HaarDiagXY() );
     tops2.push_back ( new HaarDiagXY() );
-    Operation* o = new HaarDiagXY();
+    Operation3D* o = new HaarDiagXY();
     o->setContext(true);
     o->setContext(true);
     tops3.push_back ( o );
     tops3.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "haar_diagxz", true ) )
   if ( conf->gB ( featsec, "haar_diagxz", true ) )
   {
   {
     tops2.push_back ( new HaarDiagXZ() );
     tops2.push_back ( new HaarDiagXZ() );
-    Operation* o = new HaarDiagXZ();
+    Operation3D* o = new HaarDiagXZ();
     o->setContext(true);
     o->setContext(true);
     tops3.push_back ( o );
     tops3.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "haar_diagyz", true ) )
   if ( conf->gB ( featsec, "haar_diagyz", true ) )
   {
   {
     tops2.push_back ( new HaarDiagYZ() );
     tops2.push_back ( new HaarDiagYZ() );
-    Operation* o = new HaarDiagYZ();
+    Operation3D* o = new HaarDiagYZ();
     o->setContext(true);
     o->setContext(true);
     tops3.push_back ( o );
     tops3.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "haar3_horz", true ) )
   if ( conf->gB ( featsec, "haar3_horz", true ) )
   {
   {
     tops2.push_back ( new Haar3Horiz() );
     tops2.push_back ( new Haar3Horiz() );
-    Operation* o = new Haar3Horiz();
+    Operation3D* o = new Haar3Horiz();
     o->setContext(true);
     o->setContext(true);
     tops3.push_back ( o );
     tops3.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "haar3_vert", true ) )
   if ( conf->gB ( featsec, "haar3_vert", true ) )
   {
   {
     tops2.push_back ( new Haar3Vert() );
     tops2.push_back ( new Haar3Vert() );
-    Operation* o = new Haar3Vert();
+    Operation3D* o = new Haar3Vert();
     o->setContext(true);
     o->setContext(true);
     tops3.push_back ( o );
     tops3.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "haar3_stack", true ) )
   if ( conf->gB ( featsec, "haar3_stack", true ) )
   {
   {
     tops2.push_back ( new Haar3Stack() );
     tops2.push_back ( new Haar3Stack() );
-    Operation* o = new Haar3Stack();
+    Operation3D* o = new Haar3Stack();
     o->setContext(true);
     o->setContext(true);
     tops3.push_back ( o );
     tops3.push_back ( o );
   }
   }
@@ -267,28 +267,28 @@ void SemSegContextTree3D::initOperations()
   if ( conf->gB ( featsec, "minus", true ) )
   if ( conf->gB ( featsec, "minus", true ) )
   {
   {
     tops0.push_back ( new Minus() );
     tops0.push_back ( new Minus() );
-    Operation* o = new Minus();
+    Operation3D* o = new Minus();
     o->setContext(true);
     o->setContext(true);
     tops4.push_back ( o );
     tops4.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "minus_abs", true ) )
   if ( conf->gB ( featsec, "minus_abs", true ) )
   {
   {
     tops0.push_back ( new MinusAbs() );
     tops0.push_back ( new MinusAbs() );
-    Operation* o = new MinusAbs();
+    Operation3D* o = new MinusAbs();
     o->setContext(true);
     o->setContext(true);
     tops4.push_back ( o );
     tops4.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "addition", true ) )
   if ( conf->gB ( featsec, "addition", true ) )
   {
   {
     tops0.push_back ( new Addition() );
     tops0.push_back ( new Addition() );
-    Operation* o = new Addition();
+    Operation3D* o = new Addition();
     o->setContext(true);
     o->setContext(true);
     tops4.push_back ( o );
     tops4.push_back ( o );
   }
   }
   if ( conf->gB ( featsec, "only1", true ) )
   if ( conf->gB ( featsec, "only1", true ) )
   {
   {
     tops0.push_back ( new Only1() );
     tops0.push_back ( new Only1() );
-    Operation* o = new Only1();
+    Operation3D* o = new Only1();
     o->setContext(true);
     o->setContext(true);
     tops4.push_back ( o );
     tops4.push_back ( o );
   }
   }
@@ -321,7 +321,7 @@ double SemSegContextTree3D::getBestSplit (
     std::vector<NICE::MultiChannelImage3DT<unsigned short int> > &nodeIndices,
     std::vector<NICE::MultiChannelImage3DT<unsigned short int> > &nodeIndices,
     const std::vector<NICE::MultiChannelImageT<int> > &labels,
     const std::vector<NICE::MultiChannelImageT<int> > &labels,
     int node,
     int node,
-    Operation *&splitop,
+    Operation3D *&splitop,
     double &splitval,
     double &splitval,
     const int &tree,
     const int &tree,
     vector<vector<vector<double> > > &regionProbs )
     vector<vector<vector<double> > > &regionProbs )
@@ -407,7 +407,7 @@ double SemSegContextTree3D::getBestSplit (
     return 0.0;
     return 0.0;
 
 
   // pointers to all randomly chosen features
   // pointers to all randomly chosen features
-  std::vector<Operation*> featsel;
+  std::vector<Operation3D*> featsel;
 
 
   for ( int i = 0; i < featsPerSplit; i++ )
   for ( int i = 0; i < featsPerSplit; i++ )
   {
   {
@@ -478,7 +478,7 @@ double SemSegContextTree3D::getBestSplit (
     /* random extraction method (operation) */
     /* random extraction method (operation) */
     int o = ( int ) ( rand() % ops[ft].size() );
     int o = ( int ) ( rand() % ops[ft].size() );
 
 
-    Operation *op = ops[ft][o]->clone();
+    Operation3D *op = ops[ft][o]->clone();
     op->set ( x1, y1, z1, x2, y2, z2, f1, f2, ft );
     op->set ( x1, y1, z1, x2, y2, z2, f1, f2, ft );
 
 
     if ( ft == 3 || ft == 4 )
     if ( ft == 3 || ft == 4 )
@@ -1114,7 +1114,7 @@ void SemSegContextTree3D::train ( const LabeledSet * trainp )
         if ( !forest[tree][node].isleaf && forest[tree][node].left < 0 )
         if ( !forest[tree][node].isleaf && forest[tree][node].left < 0 )
         {
         {
           // find best split
           // find best split
-          Operation *splitfeat = NULL;
+          Operation3D *splitfeat = NULL;
           double splitval;
           double splitval;
           bestig = getBestSplit ( allfeats, lastNodeIndices, labels, node,
           bestig = getBestSplit ( allfeats, lastNodeIndices, labels, node,
                                    splitfeat, splitval, tree, lastRegionProbs );
                                    splitfeat, splitval, tree, lastRegionProbs );
@@ -2090,7 +2090,7 @@ void SemSegContextTree3D::classify (
   // TODO: operations in "forest"
   // TODO: operations in "forest"
   while( !ops.empty() )
   while( !ops.empty() )
   {
   {
-    vector<Operation*> &tops = ops.back();
+    vector<Operation3D*> &tops = ops.back();
     while ( !tops.empty() )
     while ( !tops.empty() )
       tops.pop_back();
       tops.pop_back();
 
 

+ 3 - 3
semseg/SemSegContextTree3D.h

@@ -23,7 +23,7 @@
 
 
 // nice-semseg includes
 // nice-semseg includes
 #include "SemanticSegmentation.h"
 #include "SemanticSegmentation.h"
-#include "semseg3d/semseg/operations/Operations.h"
+#include "semseg3d/semseg/operations/Operations3D.h"
 
 
 namespace OBJREC
 namespace OBJREC
 {
 {
@@ -88,7 +88,7 @@ private:
   int randomTests;
   int randomTests;
 
 
   /** prototype operations for pairwise features */
   /** prototype operations for pairwise features */
-  std::vector<std::vector<Operation*> > ops;
+  std::vector<std::vector<Operation3D*> > ops;
 
 
   /** use alternative calculation for information gain */
   /** use alternative calculation for information gain */
   bool useShannonEntropy;
   bool useShannonEntropy;
@@ -203,7 +203,7 @@ private:
    * @param splitval output threshold for selected feature
    * @param splitval output threshold for selected feature
    * @return double best information gain value
    * @return double best information gain value
    */
    */
-  double getBestSplit ( std::vector<NICE::MultiChannelImage3DT<double> > &feats, std::vector<NICE::MultiChannelImage3DT<unsigned short int> > &nodeIndices, const std::vector<NICE::MultiChannelImageT<int> > &labels, int node, Operation *&splitop, double &splitval, const int &tree, std::vector<std::vector<std::vector<double> > > &regionProbs );
+  double getBestSplit ( std::vector<NICE::MultiChannelImage3DT<double> > &feats, std::vector<NICE::MultiChannelImage3DT<unsigned short int> > &nodeIndices, const std::vector<NICE::MultiChannelImageT<int> > &labels, int node, Operation3D *&splitop, double &splitval, const int &tree, std::vector<std::vector<std::vector<double> > > &regionProbs );
 
 
   /**
   /**
    * @brief computes the mean probability for a given class over all trees
    * @brief computes the mean probability for a given class over all trees

+ 11 - 11
semseg/operations/Operations.cpp → semseg/operations/Operations3D.cpp

@@ -1,16 +1,16 @@
-#include "Operations.h"
+#include "Operations3D.h"
 
 
 using namespace OBJREC;
 using namespace OBJREC;
 using namespace std;
 using namespace std;
 using namespace NICE;
 using namespace NICE;
 
 
-Operation::Operation()
+Operation3D::Operation3D()
 {
 {
   init = false;
   init = false;
   context = false;
   context = false;
 }
 }
 
 
-void Operation::set ( int _x1, int _y1, int _z1, int _x2, int _y2, int _z2, int _channel1, int _channel2, int _featType )
+void Operation3D::set ( int _x1, int _y1, int _z1, int _x2, int _y2, int _z2, int _channel1, int _channel2, int _featType )
 {
 {
   x1 = _x1;
   x1 = _x1;
   y1 = _y1;
   y1 = _y1;
@@ -24,27 +24,27 @@ void Operation::set ( int _x1, int _y1, int _z1, int _x2, int _y2, int _z2, int
   init = true;
   init = true;
 }
 }
 
 
-void Operation::setContext ( bool _context )
+void Operation3D::setContext ( bool _context )
 {
 {
   context = _context;
   context = _context;
 }
 }
 
 
-bool Operation::getContext()
+bool Operation3D::getContext()
 {
 {
   return context;
   return context;
 }
 }
 
 
-void Operation::setFeatType ( int _featType )
+void Operation3D::setFeatType ( int _featType )
 {
 {
   featType = _featType;
   featType = _featType;
 }
 }
 
 
-int Operation::getFeatType()
+int Operation3D::getFeatType()
 {
 {
   return featType;
   return featType;
 }
 }
 
 
-void Operation::getXYZ ( const Features &feats, int &xsize, int &ysize, int &zsize )
+void Operation3D::getXYZ ( const Features &feats, int &xsize, int &ysize, int &zsize )
 {
 {
   xsize = feats.feats->width();
   xsize = feats.feats->width();
   ysize = feats.feats->height();
   ysize = feats.feats->height();
@@ -52,7 +52,7 @@ void Operation::getXYZ ( const Features &feats, int &xsize, int &ysize, int &zsi
 }
 }
 
 
 
 
-void Operation::store ( std::ostream & os )
+void Operation3D::store ( std::ostream & os )
 {
 {
   os << x1 << " " << x2 << " " << y1 << " " << y2 << " " << z1 << " " << z2 << " " << channel1 << " " << channel2 << " " << featType << std::endl;
   os << x1 << " " << x2 << " " << y1 << " " << y2 << " " << z1 << " " << z2 << " " << channel1 << " " << channel2 << " " << featType << std::endl;
   if ( !init )
   if ( !init )
@@ -66,7 +66,7 @@ void Operation::store ( std::ostream & os )
   }
   }
 }
 }
 
 
-void Operation::restore ( std::istream &is )
+void Operation3D::restore ( std::istream &is )
 {
 {
   is >> x1;
   is >> x1;
   is >> x2;
   is >> x2;
@@ -98,7 +98,7 @@ void Operation::restore ( std::istream &is )
   }
   }
 }
 }
 
 
-std::string Operation::writeInfos()
+std::string Operation3D::writeInfos()
 {
 {
   std::stringstream ss;
   std::stringstream ss;
   ss << " x1: " << x1 << " y1: " << y1 << " z1: " << z1 << " x2: " << x2 << " y2: " << y2 << " z2: " << z2 <<  " c1: " << channel1 << " c2: " << channel2;
   ss << " x1: " << x1 << " y1: " << y1 << " z1: " << z1 << " x2: " << x2 << " y2: " << y2 << " z2: " << z2 <<  " c1: " << channel1 << " c2: " << channel2;

+ 70 - 70
semseg/operations/Operations.h → semseg/operations/Operations3D.h

@@ -1,5 +1,5 @@
 /**
 /**
-* @file Operation.h
+* @file Operation3D.h
 * @brief abstract class for any kind of feature extraction from 3d images
 * @brief abstract class for any kind of feature extraction from 3d images
 * @author Björn Fröhlich, Sven Sickert
 * @author Björn Fröhlich, Sven Sickert
 * @date 24.04.2012
 * @date 24.04.2012
@@ -13,7 +13,7 @@
 
 
 namespace OBJREC {
 namespace OBJREC {
 
 
-class Operation;
+class Operation3D;
 
 
 /**
 /**
  * @brief methods for value access
  * @brief methods for value access
@@ -87,7 +87,7 @@ class TreeNode
     int right;
     int right;
 
 
     /** position of feat for decision */
     /** position of feat for decision */
-    Operation *feat;
+    Operation3D *feat;
 
 
     /** decision stamp */
     /** decision stamp */
     double decision;
     double decision;
@@ -111,7 +111,7 @@ class TreeNode
     TreeNode() : left ( -1 ), right ( -1 ), feat ( NULL ), decision ( -1.0 ), isleaf ( false ) {}
     TreeNode() : left ( -1 ), right ( -1 ), feat ( NULL ), decision ( -1.0 ), isleaf ( false ) {}
 
 
     /** standard constructor */
     /** standard constructor */
-    TreeNode ( int _left, int _right, Operation *_feat, double _decision ) : left ( _left ), right ( _right ), feat ( _feat ), decision ( _decision ), isleaf ( false ) {}
+    TreeNode ( int _left, int _right, Operation3D *_feat, double _decision ) : left ( _left ), right ( _right ), feat ( _feat ), decision ( _decision ), isleaf ( false ) {}
 
 
     /**
     /**
      * @brief initialize node
      * @brief initialize node
@@ -146,7 +146,7 @@ struct Features {
 /**
 /**
  * @brief abstract operation class
  * @brief abstract operation class
  **/
  **/
-class Operation
+class Operation3D
 {
 {
   protected:
   protected:
     /** two different points (e.g. for an rectangle or two positions), channels and size  */
     /** two different points (e.g. for an rectangle or two positions), channels and size  */
@@ -162,7 +162,7 @@ class Operation
   public:
   public:
 
 
     /** simple constructor */
     /** simple constructor */
-    Operation();
+    Operation3D();
 
 
     /**
     /**
      * @brief set all parameters
      * @brief set all parameters
@@ -220,7 +220,7 @@ class Operation
     /**
     /**
      * @brief virtual clone operation instead of copy constructor (copy constructor does not work)
      * @brief virtual clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone() = 0;
+    virtual Operation3D* clone() = 0;
 
 
     /**
     /**
      * @brief print some infos about operation extraction type
      * @brief print some infos about operation extraction type
@@ -262,7 +262,7 @@ class Operation
 /**
 /**
  * @brief simple equality check ?(A==B)
  * @brief simple equality check ?(A==B)
  **/
  **/
-class RegionFeat: public Operation
+class RegionFeat: public Operation3D
 {
 {
   public:
   public:
     /**
     /**
@@ -278,7 +278,7 @@ class RegionFeat: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new RegionFeat();
       return new RegionFeat();
     }
     }
@@ -289,7 +289,7 @@ class RegionFeat: public Operation
      **/
      **/
     virtual std::string writeInfos()
     virtual std::string writeInfos()
     {
     {
-      return "(-)RegionFeat           " + Operation::writeInfos();
+      return "(-)RegionFeat           " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -305,7 +305,7 @@ class RegionFeat: public Operation
 /**
 /**
  * @brief simple difference operation A-B
  * @brief simple difference operation A-B
  **/
  **/
-class Minus: public Operation
+class Minus: public Operation3D
 {
 {
   public:
   public:
     /**
     /**
@@ -321,7 +321,7 @@ class Minus: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new Minus();
       return new Minus();
     }
     }
@@ -339,7 +339,7 @@ class Minus: public Operation
       else
       else
         out = "(R)" + out;
         out = "(R)" + out;
 
 
-      return out + "                " +Operation::writeInfos();
+      return out + "                " +Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -358,7 +358,7 @@ class Minus: public Operation
 /**
 /**
  * @brief simple absolute difference operation |A-B|
  * @brief simple absolute difference operation |A-B|
  **/
  **/
-class MinusAbs: public Operation
+class MinusAbs: public Operation3D
 {
 {
 
 
   public:
   public:
@@ -375,7 +375,7 @@ class MinusAbs: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new MinusAbs();
       return new MinusAbs();
     }
     }
@@ -393,7 +393,7 @@ class MinusAbs: public Operation
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "             " + Operation::writeInfos();
+      return out + "             " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -412,7 +412,7 @@ class MinusAbs: public Operation
 /**
 /**
  * @brief simple addition operation A+B
  * @brief simple addition operation A+B
  **/
  **/
-class Addition: public Operation
+class Addition: public Operation3D
 {
 {
 
 
   public:
   public:
@@ -429,7 +429,7 @@ class Addition: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new Addition();
       return new Addition();
     }
     }
@@ -447,7 +447,7 @@ class Addition: public Operation
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "             " + Operation::writeInfos();
+      return out + "             " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -466,7 +466,7 @@ class Addition: public Operation
 /**
 /**
  * @brief simple single element access operation
  * @brief simple single element access operation
  **/
  **/
-class Only1: public Operation
+class Only1: public Operation3D
 {
 {
   public:
   public:
     /**
     /**
@@ -482,7 +482,7 @@ class Only1: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new Only1();
       return new Only1();
     }
     }
@@ -500,7 +500,7 @@ class Only1: public Operation
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "                " + Operation::writeInfos();
+      return out + "                " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -519,7 +519,7 @@ class Only1: public Operation
 /**
 /**
  * @brief get current relative x position
  * @brief get current relative x position
  **/
  **/
-class RelativeXPosition: public Operation
+class RelativeXPosition: public Operation3D
 {
 {
   public:
   public:
     /**
     /**
@@ -535,7 +535,7 @@ class RelativeXPosition: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new RelativeXPosition();
       return new RelativeXPosition();
     }
     }
@@ -553,7 +553,7 @@ class RelativeXPosition: public Operation
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "              " + Operation::writeInfos();
+      return out + "              " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -569,7 +569,7 @@ class RelativeXPosition: public Operation
 /**
 /**
  * @brief get current relative y position
  * @brief get current relative y position
  **/
  **/
-class RelativeYPosition: public Operation
+class RelativeYPosition: public Operation3D
 {
 {
   public:
   public:
     /**
     /**
@@ -585,7 +585,7 @@ class RelativeYPosition: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new RelativeYPosition();
       return new RelativeYPosition();
     }
     }
@@ -603,7 +603,7 @@ class RelativeYPosition: public Operation
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "              " + Operation::writeInfos();
+      return out + "              " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -619,7 +619,7 @@ class RelativeYPosition: public Operation
 /**
 /**
  * @brief get current relative z position
  * @brief get current relative z position
  **/
  **/
-class RelativeZPosition: public Operation
+class RelativeZPosition: public Operation3D
 {
 {
   public:
   public:
     /**
     /**
@@ -635,7 +635,7 @@ class RelativeZPosition: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new RelativeZPosition();
       return new RelativeZPosition();
     }
     }
@@ -653,7 +653,7 @@ class RelativeZPosition: public Operation
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "              " + Operation::writeInfos();
+      return out + "              " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -669,7 +669,7 @@ class RelativeZPosition: public Operation
 /**
 /**
  * @brief uses mean in a window given by (x1,y1,z1) (x2,y2,z2)
  * @brief uses mean in a window given by (x1,y1,z1) (x2,y2,z2)
  **/
  **/
-class IntegralOps: public Operation
+class IntegralOps: public Operation3D
 {
 {
   public:
   public:
     /**
     /**
@@ -700,7 +700,7 @@ class IntegralOps: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new IntegralOps();
       return new IntegralOps();
     }
     }
@@ -718,7 +718,7 @@ class IntegralOps: public Operation
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "          " + Operation::writeInfos();
+      return out + "          " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -755,7 +755,7 @@ class GlobalFeats: public IntegralOps
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new GlobalFeats();
       return new GlobalFeats();
     }
     }
@@ -773,7 +773,7 @@ class GlobalFeats: public IntegralOps
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "          " + Operation::writeInfos();
+      return out + "          " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -823,7 +823,7 @@ class IntegralCenteredOps: public IntegralOps
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new IntegralCenteredOps();
       return new IntegralCenteredOps();
     }
     }
@@ -841,7 +841,7 @@ class IntegralCenteredOps: public IntegralOps
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "  " + Operation::writeInfos();
+      return out + "  " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -891,7 +891,7 @@ class BiIntegralCenteredOps: public IntegralCenteredOps
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new BiIntegralCenteredOps();
       return new BiIntegralCenteredOps();
     }
     }
@@ -909,7 +909,7 @@ class BiIntegralCenteredOps: public IntegralCenteredOps
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + Operation::writeInfos();
+      return out + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -946,7 +946,7 @@ class HaarHorizontal: public IntegralCenteredOps
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new HaarHorizontal();
       return new HaarHorizontal();
     }
     }
@@ -964,7 +964,7 @@ class HaarHorizontal: public IntegralCenteredOps
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "       " + Operation::writeInfos();
+      return out + "       " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -1001,7 +1001,7 @@ class HaarVertical: public IntegralCenteredOps
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new HaarVertical();
       return new HaarVertical();
     }
     }
@@ -1019,7 +1019,7 @@ class HaarVertical: public IntegralCenteredOps
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "         " + Operation::writeInfos();
+      return out + "         " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -1056,7 +1056,7 @@ class HaarStacked: public IntegralCenteredOps
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new HaarStacked();
       return new HaarStacked();
     }
     }
@@ -1074,7 +1074,7 @@ class HaarStacked: public IntegralCenteredOps
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "          " + Operation::writeInfos();
+      return out + "          " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -1111,7 +1111,7 @@ class HaarDiagXY: public IntegralCenteredOps
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new HaarDiagXY();
       return new HaarDiagXY();
     }
     }
@@ -1129,7 +1129,7 @@ class HaarDiagXY: public IntegralCenteredOps
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "           " + Operation::writeInfos();
+      return out + "           " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -1166,7 +1166,7 @@ class HaarDiagXZ: public IntegralCenteredOps
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new HaarDiagXZ();
       return new HaarDiagXZ();
     }
     }
@@ -1184,7 +1184,7 @@ class HaarDiagXZ: public IntegralCenteredOps
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "           " + Operation::writeInfos();
+      return out + "           " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -1221,7 +1221,7 @@ class HaarDiagYZ: public IntegralCenteredOps
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new HaarDiagYZ();
       return new HaarDiagYZ();
     }
     }
@@ -1239,7 +1239,7 @@ class HaarDiagYZ: public IntegralCenteredOps
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "           " + Operation::writeInfos();
+      return out + "           " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -1278,7 +1278,7 @@ class Haar3Horiz: public BiIntegralCenteredOps
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new Haar3Horiz();
       return new Haar3Horiz();
     }
     }
@@ -1296,7 +1296,7 @@ class Haar3Horiz: public BiIntegralCenteredOps
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "           " + Operation::writeInfos();
+      return out + "           " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -1334,7 +1334,7 @@ class Haar3Vert: public BiIntegralCenteredOps
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new Haar3Vert();
       return new Haar3Vert();
     }
     }
@@ -1352,7 +1352,7 @@ class Haar3Vert: public BiIntegralCenteredOps
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "            " + Operation::writeInfos();
+      return out + "            " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -1390,7 +1390,7 @@ class Haar3Stack: public BiIntegralCenteredOps
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new Haar3Stack();
       return new Haar3Stack();
     }
     }
@@ -1408,7 +1408,7 @@ class Haar3Stack: public BiIntegralCenteredOps
         else
         else
           out = "(R)" + out;
           out = "(R)" + out;
 
 
-      return out + "           " + Operation::writeInfos();
+      return out + "           " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -1430,7 +1430,7 @@ class Haar3Stack: public BiIntegralCenteredOps
 /**
 /**
  * @brief Ray Distance-Difference features
  * @brief Ray Distance-Difference features
  */
  */
-class RayDiff: public Operation
+class RayDiff: public Operation3D
 {
 {
   public:
   public:
     /**
     /**
@@ -1446,7 +1446,7 @@ class RayDiff: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new RayDiff();
       return new RayDiff();
     }
     }
@@ -1457,7 +1457,7 @@ class RayDiff: public Operation
      **/
      **/
     virtual std::string writeInfos()
     virtual std::string writeInfos()
     {
     {
-      return "(-)RayDiff              " + Operation::writeInfos();
+      return "(-)RayDiff              " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -1473,7 +1473,7 @@ class RayDiff: public Operation
 /**
 /**
  * @brief Ray Distance features
  * @brief Ray Distance features
  */
  */
-class RayDist: public Operation
+class RayDist: public Operation3D
 {
 {
   public:
   public:
     /**
     /**
@@ -1489,7 +1489,7 @@ class RayDist: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new RayDist();
       return new RayDist();
     }
     }
@@ -1500,7 +1500,7 @@ class RayDist: public Operation
      **/
      **/
     virtual std::string writeInfos()
     virtual std::string writeInfos()
     {
     {
-      return "(-)RayDist              " + Operation::writeInfos();
+      return "(-)RayDist              " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -1516,7 +1516,7 @@ class RayDist: public Operation
 /**
 /**
  * @brief Ray Orientation features
  * @brief Ray Orientation features
  */
  */
-class RayOrient: public Operation
+class RayOrient: public Operation3D
 {
 {
   public:
   public:
     /**
     /**
@@ -1532,7 +1532,7 @@ class RayOrient: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new RayOrient();
       return new RayOrient();
     }
     }
@@ -1543,7 +1543,7 @@ class RayOrient: public Operation
      **/
      **/
     virtual std::string writeInfos()
     virtual std::string writeInfos()
     {
     {
-      return "(-)RayOrient            " + Operation::writeInfos();
+      return "(-)RayOrient            " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**
@@ -1559,7 +1559,7 @@ class RayOrient: public Operation
 /**
 /**
  * @brief Ray Norm features
  * @brief Ray Norm features
  */
  */
-class RayNorm: public Operation
+class RayNorm: public Operation3D
 {
 {
   public:
   public:
     /**
     /**
@@ -1575,7 +1575,7 @@ class RayNorm: public Operation
     /**
     /**
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      * @brief clone operation instead of copy constructor (copy constructor does not work)
      **/
      **/
-    virtual Operation* clone()
+    virtual Operation3D* clone()
     {
     {
       return new RayNorm();
       return new RayNorm();
     }
     }
@@ -1586,7 +1586,7 @@ class RayNorm: public Operation
      **/
      **/
     virtual std::string writeInfos()
     virtual std::string writeInfos()
     {
     {
-      return "(-)RayNorm              " + Operation::writeInfos();
+      return "(-)RayNorm              " + Operation3D::writeInfos();
     }
     }
 
 
     /**
     /**