Exemple #1
0
        static List <LabeledTomogram> TomogramsFromGeneratedFiles()
        {
            Console.WriteLine("Loading shit...");
            List <LabeledTomogram> tomograms = new List <LabeledTomogram>();

            string[] files = Directory.GetFiles(@"/home/brush/tom4", "*.dat").ToArray();
            int      i     = 0;

            foreach (string file in files)
            {
                Console.WriteLine($"{i + 1}/{files.Length}");
                i++;
                //string dataFile = $"C:/Users/brush/Desktop/DataSets/data/{c}.bin";
                //string labelFile = $"C:/Users/brush/Desktop/DataSets/labels/{c}.bin";

                LabeledTomogram tom = DataReader.ReadDatFile(file);
                tomograms.AddRange(DataManipulator.FlipAndRotateTomogram(tom));
            }
            Console.WriteLine("...shit loaded.");

            return(tomograms);
        }