|
@@ -111,7 +111,7 @@ void Operation3D::store ( std::ostream & os )
|
|
os << -1 << std::endl;
|
|
os << -1 << std::endl;
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- if (featType == 3 || featType == 4)
|
|
|
|
|
|
+ if (context)
|
|
os << CONTEXT << std::endl;
|
|
os << CONTEXT << std::endl;
|
|
else
|
|
else
|
|
os << RAWFEAT << std::endl;
|
|
os << RAWFEAT << std::endl;
|
|
@@ -168,7 +168,7 @@ std::string Operation3D::writeInfos()
|
|
double RegionFeat3D::getVal ( const Features &feats, const int &x, const int &y, const int &z )
|
|
double RegionFeat3D::getVal ( const Features &feats, const int &x, const int &y, const int &z )
|
|
{
|
|
{
|
|
int currentRegion = (*feats.feats)(x,y,z,channel1);
|
|
int currentRegion = (*feats.feats)(x,y,z,channel1);
|
|
- int chosenClass = channel2;
|
|
|
|
|
|
+ unsigned short chosenClass = channel2;
|
|
return (*feats.rProbs)[currentRegion][chosenClass];
|
|
return (*feats.rProbs)[currentRegion][chosenClass];
|
|
}
|
|
}
|
|
|
|
|
|
@@ -184,7 +184,7 @@ double Minus3D::getVal ( const Features &feats, const int &x, const int &y, cons
|
|
getXYZ ( feats, xsize, ysize, zsize );
|
|
getXYZ ( feats, xsize, ysize, zsize );
|
|
|
|
|
|
double v1 = intToRaw(feats, BOUND ( x + x1, 0, xsize - 1 ), BOUND ( y + y1, 0, ysize - 1 ), BOUND ( z + z1, 0, zsize - 1 ), channel1);
|
|
double v1 = intToRaw(feats, BOUND ( x + x1, 0, xsize - 1 ), BOUND ( y + y1, 0, ysize - 1 ), BOUND ( z + z1, 0, zsize - 1 ), channel1);
|
|
- double v2 = intToRaw(feats, BOUND ( x + x2, 0, xsize - 1 ), BOUND ( y + y2, 0, ysize - 1 ), BOUND ( z + z2, 0, zsize - 1 ), channel2);
|
|
|
|
|
|
+ double v2 = intToRaw(feats, BOUND ( x + x2, 0, xsize - 1 ), BOUND ( y + y2, 0, ysize - 1 ), BOUND ( z + z2, 0, zsize - 1 ), channel1);
|
|
|
|
|
|
return v1-v2;
|
|
return v1-v2;
|
|
}
|
|
}
|
|
@@ -195,7 +195,7 @@ double MinusAbs3D::getVal ( const Features &feats, const int &x, const int &y, c
|
|
getXYZ ( feats, xsize, ysize, zsize );
|
|
getXYZ ( feats, xsize, ysize, zsize );
|
|
|
|
|
|
double v1 = intToRaw(feats, BOUND ( x + x1, 0, xsize - 1 ), BOUND ( y + y1, 0, ysize - 1 ), BOUND ( z + z1, 0, zsize - 1 ), channel1);
|
|
double v1 = intToRaw(feats, BOUND ( x + x1, 0, xsize - 1 ), BOUND ( y + y1, 0, ysize - 1 ), BOUND ( z + z1, 0, zsize - 1 ), channel1);
|
|
- double v2 = intToRaw(feats, BOUND ( x + x2, 0, xsize - 1 ), BOUND ( y + y2, 0, ysize - 1 ), BOUND ( z + z2, 0, zsize - 1 ), channel2);
|
|
|
|
|
|
+ double v2 = intToRaw(feats, BOUND ( x + x2, 0, xsize - 1 ), BOUND ( y + y2, 0, ysize - 1 ), BOUND ( z + z2, 0, zsize - 1 ), channel1);
|
|
|
|
|
|
return abs(v1-v2);
|
|
return abs(v1-v2);
|
|
}
|
|
}
|
|
@@ -206,7 +206,7 @@ double Addition3D::getVal ( const Features &feats, const int &x, const int &y, c
|
|
getXYZ ( feats, xsize, ysize, zsize );
|
|
getXYZ ( feats, xsize, ysize, zsize );
|
|
|
|
|
|
double v1 = intToRaw(feats, BOUND ( x + x1, 0, xsize - 1 ), BOUND ( y + y1, 0, ysize - 1 ), BOUND ( z + z1, 0, zsize - 1 ), channel1);
|
|
double v1 = intToRaw(feats, BOUND ( x + x1, 0, xsize - 1 ), BOUND ( y + y1, 0, ysize - 1 ), BOUND ( z + z1, 0, zsize - 1 ), channel1);
|
|
- double v2 = intToRaw(feats, BOUND ( x + x2, 0, xsize - 1 ), BOUND ( y + y2, 0, ysize - 1 ), BOUND ( z + z2, 0, zsize - 1 ), channel2);
|
|
|
|
|
|
+ double v2 = intToRaw(feats, BOUND ( x + x2, 0, xsize - 1 ), BOUND ( y + y2, 0, ysize - 1 ), BOUND ( z + z2, 0, zsize - 1 ), channel1);
|
|
|
|
|
|
return v1+v2;
|
|
return v1+v2;
|
|
}
|
|
}
|