private Cylinder[] CreateCylinders(Minutia minutia)
 {
     Cylinder3D value = new Cylinder3D();
     Cylinder3D mask = new Cylinder3D();
     for (int i = 1; i <= BaseCuboid; i++)
     {
         for (int j = 1; j <= BaseCuboid; j++)
         {
             if (IsValidPoint(GetPoint(i, j, minutia), minutia))
             {
                 for (int k = 1; k <= HeightCuboid; k++)
                 {
                     mask.SetValue(i, j, k, 1);
                     value.SetValue(i, j, k, StepFunction(Sum(
                         GetPoint(i, j, minutia),
                         AngleHeight(k),
                         GetNeighborhood(GetPoint(i, j, minutia), minutia),
                         minutia
                         )
                         ));
                 }
             }
         }
     }
     return new[]
     {
         new Cylinder(value.Cylinder, minutia.Angle, Math.Sqrt(CylinderHelper.GetOneBitsCount(value.Cylinder))),
         new Cylinder(mask.Cylinder, minutia.Angle, Math.Sqrt(CylinderHelper.GetOneBitsCount(mask.Cylinder)))
     };
 }
        private Cylinder[] CreateCylinders(Minutia minutia)
        {
            Cylinder3D value = new Cylinder3D();
            Cylinder3D mask  = new Cylinder3D();

            for (int i = 1; i <= BaseCuboid; i++)
            {
                for (int j = 1; j <= BaseCuboid; j++)
                {
                    if (IsValidPoint(GetPoint(i, j, minutia), minutia))
                    {
                        for (int k = 1; k <= HeightCuboid; k++)
                        {
                            mask.SetValue(i, j, k, 1);
                            value.SetValue(i, j, k, StepFunction(Sum(
                                                                     GetPoint(i, j, minutia),
                                                                     AngleHeight(k),
                                                                     GetNeighborhood(GetPoint(i, j, minutia), minutia),
                                                                     minutia
                                                                     )
                                                                 ));
                        }
                    }
                }
            }
            return(new[]
            {
                new Cylinder(value.Cylinder, minutia.Angle, Math.Sqrt(CylinderHelper.GetOneBitsCount(value.Cylinder))),
                new Cylinder(mask.Cylinder, minutia.Angle, Math.Sqrt(CylinderHelper.GetOneBitsCount(mask.Cylinder)))
            });
        }
 public static void PrintCylinder(uint[] cylinderValue, uint[] cylinderMask, int number)
 {
     Cylinder3D cylinder3DValue = new Cylinder3D();
     Cylinder3D cylinder3DMask = new Cylinder3D();
     cylinder3DValue.Cylinder = cylinderValue;
     cylinder3DMask.Cylinder = cylinderMask;
     FileStream file = new FileStream("cylinder" + number + ".txt" , FileMode.Create, FileAccess.ReadWrite);
     StreamWriter write = new StreamWriter(file);
     for (int k = 1; k <= TemplateCreator.HeightCuboid; k++)
     {
         for (int i = 1; i <= TemplateCreator.BaseCuboid; i++)
         {
             for (int j = 1; j <= TemplateCreator.BaseCuboid; j++)
             {
                 write.Write(cylinder3DValue.GetValue(i, j, k) + cylinder3DMask.GetValue(i, j, k));
             }
             write.WriteLine();
         }
         write.WriteLine();
     }
     write.Close();
 }