Ejemplo n.º 1
0
        private void parseData()
        {
            string data_file_content = DataStorageManager.ReadScanData(file_path);
            List <SingleScanData> multi_scan_data_list = ScanDataEncoder.Decode(data_file_content);

            Point3D[]      point_arr  = SensorOutputParser.Parse3DPoints(multi_scan_data_list.ToArray());
            List <Point3D> list_point = new List <Point3D>();

            foreach (Point3D point in point_arr)
            {
                if (point.Z >= -330 && point.Z <= 270)
                {
                    list_point.Add(point);
                }
            }
            point_data = list_point.ToArray();
        }
Ejemplo n.º 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();
        }