Ejemplo n.º 1
0
        private static void setLocationFromHistory(ROI roi, string[] vals, int n)
        {
            Point[][] points = new Point[vals.Length - n][];
            for (int i = n, frame = 0; i < vals.Length; i++, frame++)
            {
                string[]     row      = vals[i].Split(new string[] { "\t" }, StringSplitOptions.None);
                List <Point> rowFinal = new List <Point>();
                if (row.Length > 1)
                {
                    for (int x = 0, y = 1; y < row.Length; x += 2, y += 2)
                    {
                        rowFinal.Add(new Point(int.Parse(row[x]), int.Parse(row[y])));
                    }
                }

                points[frame] = rowFinal.ToArray();
            }
            roi.SetLocationAll(points);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }