KernelFilter does not allow you to write kernel filter coefficients. You must work with a FMatrix, then create a KernelFilter from it. For example:
#include <pcl/KernelFilter.h>
FMatrix M( .0F, 5, 5 ); // a matrix of float elements, 5 rows and 5 columns, initialized with zeros
M[2][2] = 1; // set the central element to 1
M[1][1] = M[1][2] = M[1][3] = // now set its surrounding elements to 1/2
M[2][1] = M[2][3] =
M[3][1] = M[3][2] = M[3][3] = 0.5;
KernelFilter F( M ); // convert matrix coefficients into a filter