bool kNearestNeighFilter::apply(const channel8& src,channel8& dest) {
   imatrix tmpSrc,tmpDest;
   tmpSrc.castFrom(src);
   apply(tmpSrc,tmpDest);
   dest.castFrom(tmpDest);
   return true;
 }
 // On copy apply for type channel8!
 bool distanceTransform::apply(const channel8& src,channel8& dest) const {
   channel tmp;
   tmp.castFrom(static_cast<matrix<ubyte> >(src));
   if (apply(tmp)) {
     dest.castFrom(static_cast<matrix<float> >(tmp));
     return true;
   }
   return false;
 };