Example #1
0
        private void agisoftDelighterRemoveCastShadowsLogtxtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter = "Delighter Log File|*.txt|Log File|*.log";
            openFileDialog.Title  = "Open Delighter Remove Cast Shadows Log file";
            openFileDialog.ShowDialog();

            if (openFileDialog.FileName != "")
            {
                this.profiler.AddMarkers(MarkerBuilder.FromDelighterRemoveCastShadowsLogFile(openFileDialog.FileName, this.profiler.StartTime, log));
                UpdateView(true);
            }
        }
Example #2
0
        public static List <Marker> FromDelighterRemoveShadingLogFile(string filename, DateTime startTime, Log log)
        {
            log.AddLine("Adding Markers from Delighter Remove Shading Log File...");

            List <string> textData = MarkerBuilder.LoadDataAsStringList(filename);
            List <Marker> markers  = new List <Marker>();

            markers.AddRange(ProcessStep(textData, "Remove Shading", "RemoveLightingInteractive: ", "(exit code 1)", startTime, log));
            markers.AddRange(ProcessStep(textData, "Calculating Angular Data", "Calculating angular data...", "Angular data calculated in ", startTime, log));
            markers.AddRange(ProcessStep(textData, "Calculating Scale", "Calculating scale...", "Scale calculated in ", startTime, log));
            markers.AddRange(ProcessStep(textData, "Suppressing Highlights", "Suppressing highlights...", "Highlights suppressed in ", startTime, log));
            markers.AddRange(ProcessSingleLine(textData, "Calculating Ambient Occlusions", "Calculating ambient occlusion...", startTime));

            return(markers);
        }
Example #3
0
        private void agisoftMetashapeLogFiletxtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //load a metashape log file
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter = "Metashape Log File|*.txt|Log File|*.log";
            openFileDialog.Title  = "Open Metashape Log file";
            openFileDialog.ShowDialog();

            if (openFileDialog.FileName != "")
            {
                this.profiler.AddMarkers(MarkerBuilder.FromMetashapeLogFile(openFileDialog.FileName, this.profiler.StartTime, log));
                UpdateView(true);
            }
        }
Example #4
0
        private void jPMImportToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter = "jPerf Marker File|*.jpm|JSON File|*.json";
            openFileDialog.Title  = "Open Marker file";
            openFileDialog.ShowDialog();

            if (openFileDialog.FileName != "")
            {
                this.profiler.AddMarkers(MarkerBuilder.FromMarkerFile(openFileDialog.FileName, this.profiler.StartTime));
                //this.profiler.AddMarkerFile(TextData, log);
                UpdateView(true);
            }
        }
Example #5
0
        public static List <Marker> FromDelighterRemoveCastShadowsLogFile(string filename, DateTime startTime, Log log)
        {
            log.AddLine("Adding Markers from Delighter Remove Cast Shadows Log File...");

            List <string> textData = MarkerBuilder.LoadDataAsStringList(filename);
            List <Marker> markers  = new List <Marker>();

            markers.AddRange(ProcessStep(textData, "Remove Cast Shadows", "RemoveLightingInteractive: ", "(exit code 1)", startTime, log));
            markers.AddRange(ProcessStep(textData, "Repairing Atlas", "Repairing atlas...", "Atlas repaired in ", startTime, log));
            markers.AddRange(ProcessStep(textData, "Baking matt", "Baking matting...", "Matting baked in ", startTime, log));
            markers.AddRange(ProcessStep(textData, "Baking Shadow Masks", "Baking shadow masks...", "Shadow masks baked in ", startTime, log));
            markers.AddRange(ProcessStep(textData, "Inpainting Penumbra", "Inpainting penumbra...", "Penumbra inpainted in ", startTime, log));

            markers.AddRange(ProcessStep(textData, "Supressing Unknown Colors", "Suppressing unknown colors...", "Unknown colors suppressed in ", startTime, log));

            return(markers);
        }
Example #6
0
        public static List <Marker> FromMarkerFile(string filename, DateTime startTime)
        {
            string textData = MarkerBuilder.LoadData(filename);

            List <Marker> markers = new List <Marker>();

            dynamic jsonData = JsonConvert.DeserializeObject <dynamic>(textData);

            foreach (dynamic marker in jsonData)
            {
                DateTime time = DateTime.ParseExact((string)marker.time, "yyyy-MM-dd HH:mm:ss", new System.Globalization.CultureInfo("en-US"));
                if (time >= startTime)
                {
                    markers.Add(new Marker((string)marker.title, time.Subtract(startTime).TotalMilliseconds));
                }
            }
            return(markers);
        }
Example #7
0
        public static List <Marker> FromMetashapeLogFile(string filename, DateTime startTime, Log log)
        {
            log.AddLine("Adding Markers from Metashape Log File...");

            List <string> textData = MarkerBuilder.LoadDataAsStringList(filename);
            List <Marker> markers  = new List <Marker>();

            markers.AddRange(ProcessStep(textData, "Build Points", "Matching photos...", "(exit code 1)", startTime, log));
            markers.AddRange(ProcessStep(textData, "Build Dense Cloud", "BuildDenseCloud: ", "(exit code 1)", startTime, log));
            markers.AddRange(ProcessStep(textData, "Build Mesh", "BuildModel: ", "(exit code 1)", startTime, log));
            markers.AddRange(ProcessStep(textData, "Set Tree", "Tree depth:", "Tree set in ", startTime, log));
            markers.AddRange(ProcessStep(textData, "Laplacian Constraints", "Leaves/Nodes: ", "Laplacian constraints set in ", startTime, log));
            markers.AddRange(ProcessStep(textData, "Linear System", "Depth[0/", "Linear system solved in ", startTime, log));
            markers.AddRange(ProcessStep(textData, "Build Texture", "BuildTexture: ", "(exit code 1)", startTime, log));

            markers.AddRange(ProcessSingleLine(textData, "Extracting faces", "faces extracted in ", startTime));
            markers.AddRange(ProcessSingleLine(textData, "Decimating mesh", "Decimating mesh...", startTime));
            markers.AddRange(ProcessSingleLine(textData, "Calculate Colors", "calculating colors...", startTime));

            return(markers);
        }