void LogVersion()
 {
     if (!VersionOffered)
     {
         bool offer = false;
         lock (this)
         {
             if (!VersionOffered)
             {
                 VersionOffered = true;
                 offer          = true;
             }
         }
         if (offer && Accepts("version"))
         {
             Take("version", "text/plain", Encoding.UTF8.GetBytes(FingerprintCompatibility.Version()));
         }
     }
 }
        public PersistentTemplate(MutableTemplate mutable)
        {
            Version = FingerprintCompatibility.Version();
            Width   = mutable.Size.X;
            Height  = mutable.Size.Y;
            int count = mutable.Minutiae.Count;

            PositionsX = new int[count];
            PositionsY = new int[count];
            Directions = new double[count];
            var chars = new char[count];

            for (int i = 0; i < count; ++i)
            {
                var minutia = mutable.Minutiae[i];
                PositionsX[i] = minutia.Position.X;
                PositionsY[i] = minutia.Position.Y;
                Directions[i] = minutia.Direction;
                chars[i]      = minutia.Type == MinutiaType.Bifurcation ? 'B' : 'E';
            }
            Types = new string(chars);
        }