예제 #1
0
        public void setTable(ushort[] table, int nfilled, bool dither)
        {
            TableLookUp t = new TableLookUp(1, dither);

            t.setTable(0, table, nfilled);
            this.table = (t);
        }
예제 #2
0
 public void ApplyTableLookUp()
 {
     if (table?.tables != null && table.ntables > 0)
     {
         Debug.Assert(fullSize?.rawView != null);
         Parallel.For(fullSize.offset.height, fullSize.dim.height + fullSize.offset.height, y =>
         {
             long pos = y * fullSize.UncroppedDim.width * fullSize.cpp;
             for (uint x = fullSize.offset.width; x < (fullSize.offset.width + fullSize.dim.width) * fullSize.cpp; x++)
             {
                 fullSize.rawView[x + pos] = table.tables[Convert.ToInt32(fullSize.rawView[x + pos])];
             }
         });
     }
     table = null;
 }