public SegmentVolume MoveStructure() { var placeholder = SS.AddStructure("CONTROL", "placeholder" + new Random().Next(0, 20)); if (Structure.IsHighResolution) { placeholder.ConvertToHighResolution(); } foreach (var cc in Contours) { var contoursOnPlane = cc.Value; var moved = Move(contoursOnPlane.Select(e => e.ToArray()).ToArray()); foreach (var vector in moved) { placeholder.AddContourOnImagePlane(vector, PlaneToContour(cc.Key)); } } var seg = placeholder.SegmentVolume; SS.RemoveStructure(placeholder); //Contours = OriginalContours; return(seg); }
public SegmentVolume CovertToDefaultAccuracySegment() { if (Structure.IsHighResolution) { var placeholder = SS.AddStructure("CONTROL", "placeholder" + new Random().Next(0, 20)); foreach (var cc in Contours) { var contoursOnPlane = cc.Value; var moved = contoursOnPlane.Select(e => e.ToArray()).ToArray(); foreach (var vector in moved) { placeholder.AddContourOnImagePlane(vector, cc.Key); } } var seg = placeholder.SegmentVolume; SS.RemoveStructure(placeholder); //Contours = OriginalContours; return(seg); } else { return(Structure.SegmentVolume); } }