void Calculate(Imaging.IImageFilter filter, bool normalization)
        {
            double r = filter.GetRadius();

            ReallocLut(r);
            int i;
            int pivot = Diameter << (ImgSubPixConst.SHIFT - 1);

            for (i = 0; i < pivot; i++)
            {
                double x = (double)i / (double)ImgSubPixConst.SCALE;
                double y = filter.CalculateWeight(x);
                _weight_array[pivot + i]     =
                    _weight_array[pivot - i] = AggMath.iround(y * ImgFilterConst.SCALE);
            }
            int end = (Diameter << ImgSubPixConst.SHIFT) - 1;

            _weight_array[0] = _weight_array[end];
            if (normalization)
            {
                Normalize();
            }
        }
 public ImageFilterLookUpTable(Imaging.IImageFilter filter, bool normalization)
 {
     _weight_array = new int[256];
     Calculate(filter, normalization);
 }
 public ImageFilterLookUpTable(Imaging.IImageFilter filter)
     : this(filter, true)
 {
 }
 void Calculate(Imaging.IImageFilter filter)
 {
     Calculate(filter, true);
 }