public static void Write(string path, ThermalFile file)
 {
     using (StreamWriter writer =
                new System.IO.StreamWriter(@path, true))
         foreach (string line in file.raw)
         {
             writer.WriteLine(line);
         }
 }
        public ThermalFile Read(string filePath)
        {
            if (File.Exists(filePath))
            {
                thermalFile      = new ThermalFile();
                thermalFile.path = filePath;
                Trace.WriteLine("File: " + thermalFile.path);

                thermalFile.raw             = ReadAllLines();
                thermalFile.TemperatureData = DataConverting.RawDataToArray(thermalFile.raw, thermalFile.height, thermalFile.width);
                thermalFile.images          = DataConverting.CreateThermalImages(thermalFile.intMatrices, thermalFile.minTemperature, thermalFile.maxTemperature);
                thermalFile.count           = thermalFile.images.Count;
                return(thermalFile);
            }
            else
            {
                Trace.WriteLine("File dont exist");
                return(null);
            }
        }
示例#3
0
 public static void Write(string path, ThermalFile file)
 {
     ThermalWriter.Write(path, file);
 }