public List<ROI> Load() { // Read in all the lines string[] lines = System.IO.File.ReadAllLines(_fullPath); List<ROI> regionsOfInterest = new List<ROI>(); foreach (var line in lines) { var fields = line.Split(' '); ROI roi = new ROI() { Index = Int32.Parse(fields[0]), Name = fields[1], Ident = Int32.Parse(fields[2]), X = Double.Parse(fields[3]), Y = Double.Parse(fields[4]), Z = Double.Parse(fields[5]), }; //if (_isSpecial.ContainsKey(roi.Ident)) // roi.Special = true; regionsOfInterest.Add(roi); } XMax = (double)regionsOfInterest.Max(r => r.X); XMin = (double)regionsOfInterest.Min(r => r.X); YMax = (double)regionsOfInterest.Max(r => r.Y); YMin = (double)regionsOfInterest.Min(r => r.Y); ZMax = (double)regionsOfInterest.Max(r => r.Z); ZMin = (double)regionsOfInterest.Min(r => r.Z); return regionsOfInterest; }
public BrainDataPoint(double x, double y, ROI roi) { this.x = x; this.y = y; this.roi = roi; }