summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ovision/see/segmTable.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/ovision/see/segmTable.cc')
-rw-r--r--2005/i/robert/src/ovision/see/segmTable.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/2005/i/robert/src/ovision/see/segmTable.cc b/2005/i/robert/src/ovision/see/segmTable.cc
index ff428e2..919107f 100644
--- a/2005/i/robert/src/ovision/see/segmTable.cc
+++ b/2005/i/robert/src/ovision/see/segmTable.cc
@@ -15,6 +15,10 @@
SegmTable::SegmTable (ColorTable &tab)
: tab_ (tab)
{
+ index_ = new int[nbOutput_];
+ for (int i = 0; i<nbOutput_; i++)
+ index_[i] = oconfig_->index[i];
+
}
/// Donne la couleur à partir du tableau
@@ -23,8 +27,8 @@ unsigned char
SegmTable::giveColor (const unsigned char *x, const bool testOutputMax, const bool index_Process, const bool lumFlag)
{
if (lumFlag && (lumPos_ >= 0)) addLum (x[lumPos_]);
-// if (index_Process)
- return index_ [tab_[(int) (x[0] * ColorTable::colorTabSize2 + x[1] * ColorTable::colorTabSize + x[2]) ]];
-// else
-// return colorTable_[ x[0]*colorTabSize2 + x[1]*colorTabSize + x[2] ];
+ // if (index_Process)
+ return tab_[(int) (x[0] * ColorTable::colorTabSize2 + x[1] * ColorTable::colorTabSize + x[2]) ];
+ // else
+ // return colorTable_[ x[0]*colorTabSize2 + x[1]*colorTabSize + x[2] ];
}