Просмотр исходного кода

Operations3D: forwarding context mode when cloning

Sven Sickert 9 лет назад
Родитель
Сommit
0542c68f86
1 измененных файлов с 66 добавлено и 22 удалено
  1. 66 22
      semseg/operations/Operations3D.h

+ 66 - 22
semseg/operations/Operations3D.h

@@ -295,7 +295,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new RegionFeat3D();
+        Operation3D* o = new RegionFeat3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -338,7 +340,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new Minus3D();
+        Operation3D* o = new Minus3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -392,7 +396,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new MinusAbs3D();
+        Operation3D* o = new MinusAbs3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -446,7 +452,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new Addition3D();
+        Operation3D* o = new Addition3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -499,7 +507,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new Only13D();
+        Operation3D* o = new Only13D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -552,7 +562,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new RelativeXPosition3D();
+        Operation3D* o = new RelativeXPosition3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -602,7 +614,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new RelativeYPosition3D();
+        Operation3D* o = new RelativeYPosition3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -652,7 +666,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new RelativeZPosition3D();
+        Operation3D* o = new RelativeZPosition3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -717,7 +733,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new IntegralOps3D();
+        Operation3D* o = new IntegralOps3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -770,7 +788,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new BiIntegralOps3D();
+        Operation3D* o = new BiIntegralOps3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -825,7 +845,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new GlobalFeats3D();
+        Operation3D* o = new GlobalFeats3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -893,7 +915,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new IntegralCenteredOps3D();
+        Operation3D* o = new IntegralCenteredOps3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -961,7 +985,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new BiIntegralCenteredOps3D();
+        Operation3D* o = new BiIntegralCenteredOps3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -1016,7 +1042,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new HaarHorizontal3D();
+        Operation3D* o = new HaarHorizontal3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -1071,7 +1099,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new HaarVertical3D();
+        Operation3D* o = new HaarVertical3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -1126,7 +1156,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new HaarStacked3D();
+        Operation3D* o = new HaarStacked3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -1181,7 +1213,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new HaarDiagXY3D();
+        Operation3D* o = new HaarDiagXY3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -1236,7 +1270,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new HaarDiagXZ3D();
+        Operation3D* o = new HaarDiagXZ3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -1291,7 +1327,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new HaarDiagYZ3D();
+        Operation3D* o = new HaarDiagYZ3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -1348,7 +1386,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new Haar3Horiz3D();
+        Operation3D* o = new Haar3Horiz3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -1404,7 +1444,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new Haar3Vert3D();
+        Operation3D* o = new Haar3Vert3D();
+        o->setContext(context);
+        return o;
     }
 
     /**
@@ -1460,7 +1502,9 @@ public:
      **/
     virtual Operation3D* clone()
     {
-        return new Haar3Stack3D();
+        Operation3D* o = new Haar3Stack3D();
+        o->setContext(context);
+        return o;
     }
 
     /**