예제 #1
0
        // add for testing purpose
        public DataRepresentChart(Point3D[] points)
        {
            InitializeComponent();

            ContainerStackProfiler csp = new ContainerStackProfiler(points);

            Point3D[] result_points = csp.GetMiddleStackProfile();
            //Point3D[] result_points = csp.GetSideStackProfile(true);

            foreach (Point3D point in points)
            {
                chart1.Series["Series1"].Points.AddXY(point.X, point.Y);
            }
        }
예제 #2
0
        // add for testing purpose
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            //scan_data_1457689858
            string file_path         = @"../../ScanData/scan_data_1459942184.txt";
            string data_file_content = DataStorageManager.ReadScanData(file_path);
            List <SingleScanData> multi_scan_data_list = ScanDataEncoder.Decode(data_file_content);

            Point3D[] list_point = SensorOutputParser.Parse3DPoints(multi_scan_data_list.ToArray());

            //profiling the middle container profile
            ContainerStackProfiler csp = new ContainerStackProfiler(list_point.ToArray());

            Point3D[] middle_stack_profile_points = csp.GetMiddleStackProfile();
            Point3D[] left_stack_profile_points   = csp.GetSideStackProfile(false);
            Point3D[] right_stack_profile_points  = csp.GetSideStackProfile(true);

            ViewPortManager.GetInstance.DisplayContainerStack(middle_stack_profile_points, ConfigParameters.MIDDLE_STACK_CONTAINER_LENGTH);
            ViewPortManager.GetInstance.DisplayContainerStack(left_stack_profile_points, ConfigParameters.LEFT_STACK_CONTAINER_LENGTH);
            ViewPortManager.GetInstance.DisplayContainerStack(right_stack_profile_points, ConfigParameters.LEFT_STACK_CONTAINER_LENGTH);

            //(new DataRepresentChart(list_point.ToArray())).Show();
        }