public string roi_getAllInfo() { ROI roi = this; string val = "{"; val += roi.Shape.ToString() + "\n"; val += roi.Type.ToString() + "\n"; val += roi.Width.ToString() + "\n"; val += roi.Height.ToString() + "\n"; val += roi.Stack.ToString() + "\n"; val += roi.D.ToString() + "\n"; val += roi.FromT.ToString() + "\n"; val += roi.ToT.ToString() + "\n"; val += roi.FromZ.ToString() + "\n"; val += roi.ToZ.ToString() + "\n"; val += BiggestW.ToString() + "\n"; val += BiggestH.ToString() + "\n"; val += ReturnBiggest.ToString() + "\n"; val += turnOnStackRoi.ToString() + "\n"; val += GetColors() + "\n"; val += GetChartUseIndex() + "\n"; val += "Comment=" + Comment + "\n"; val += roi_getAllLocation(); val += "}"; return(val); }
private string roi_getAllLocation() { ROI roi = this; Point[][] loc = roi.GetLocationAll(); string[] vals = new string[loc.Length]; //foreach (Point[] pList in loc) Parallel.For(0, loc.Length, i => { Point[] pList = loc[i]; if (pList != null) { foreach (Point p in pList) { vals[i] += p.X.ToString() + "\t" + p.Y.ToString() + "\t"; } } }); return(string.Join("\n", vals)); }
public ROI Duplicate() { ROI newRoi = new ROI(ID, 1, shape, type, turnOnStackRoi); newRoi.Comment = Comment; newRoi.W = W; newRoi.H = H; newRoi.Stack = stack; newRoi.D = d; newRoi.firstTFrame = firstTFrame; newRoi.lastTFrame = lastTFrame; newRoi.firstZFrame = firstZFrame; newRoi.lastZFrame = lastZFrame; newRoi.SetLocationAll(this.GetLocationAll()); return(newRoi); }
private ROI CellToolDKtoROI(CellToolDK.ROI roi) { ROI newRoi = new ROI(roi.getID, 1, roi.Shape, roi.Type, roi.turnOnStackRoi); newRoi.Checked = roi.Checked; newRoi.Comment = roi.Comment; newRoi.Width = roi.Width; newRoi.Height = roi.Height; newRoi.Stack = roi.Stack; newRoi.D = roi.D; newRoi.FromT = roi.FromT; newRoi.ToT = roi.ToT; newRoi.FromZ = roi.FromZ; newRoi.ToZ = roi.ToZ; newRoi.SetLocationAll(roi.GetLocationAll()); return(newRoi); }