Beispiel #1
0
        // Dumps a compairison pair for the technique "DCT" to disk
        public static bool dumpDCTStepsToDiskFor(UnfoldedBindingComparisonPair _pair)
        {
            // Local variables
            Technique t = Technique.createTechniqueDCT();

            string[] pathesSource0 = new string[DCT_PATH_COUNT];
            string[] pathesSource1 = new string[DCT_PATH_COUNT];

            // Create pathes
            pathesSource0[0] = TARGET_FOLDER + string.Format(DCT_PATH_MEANFILTER, 0);
            pathesSource0[1] = TARGET_FOLDER + string.Format(DCT_PATH_RESIZED, 0);
            pathesSource0[2] = TARGET_FOLDER + string.Format(DCT_PATH_DCTMATRIX, 0);
            pathesSource0[3] = TARGET_FOLDER + string.Format(DCT_PATH_DCTIMAGE, 0);
            pathesSource0[4] = TARGET_FOLDER + string.Format(DCT_PATH_DCTIMAGE_SUBSEC, 0);
            pathesSource0[5] = TARGET_FOLDER + string.Format(DCT_PATH_MEDIAN, 0);

            pathesSource1[0] = TARGET_FOLDER + string.Format(DCT_PATH_MEANFILTER, 1);
            pathesSource1[1] = TARGET_FOLDER + string.Format(DCT_PATH_RESIZED, 1);
            pathesSource1[2] = TARGET_FOLDER + string.Format(DCT_PATH_DCTMATRIX, 1);
            pathesSource1[3] = TARGET_FOLDER + string.Format(DCT_PATH_DCTIMAGE, 1);
            pathesSource1[4] = TARGET_FOLDER + string.Format(DCT_PATH_DCTIMAGE_SUBSEC, 1);
            pathesSource1[5] = TARGET_FOLDER + string.Format(DCT_PATH_MEDIAN, 1);

            // First source
            var j0 = new Job <bool?>((JobParameter <bool?> _params) =>
            {
                // Dump to disk
                return(t.dumpIntermediateResultsToDisk(_pair.Source0, pathesSource0));
            },
                                     (JobParameter <bool?> _params) =>
            {
                if (_params.Error != null)
                {
                    MessageBox.Show(_params.Error.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
                                     );

            // Second source
            var j1 = new Job <bool?>((JobParameter <bool?> _params) =>
            {
                // Dump to disk
                return(t.dumpIntermediateResultsToDisk(_pair.Source1, pathesSource1));
            },
                                     (JobParameter <bool?> _params) =>
            {
                if (_params.Error != null)
                {
                    MessageBox.Show(_params.Error.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
                                     );

            // Wait for jobs
            j0.waitForDone();
            j1.waitForDone();

            return(j0.Result.Value && j1.Result.Value);
        }
Beispiel #2
0
        // Dumps a compairison pair for the technique "Wavelet" to disk
        public static bool dumpWaveletStepsToDiskFor(UnfoldedBindingComparisonPair _pair)
        {
            // Local variables
            Technique t = Technique.createTechniqueWavelet();

            string[] pathesSource0 = new string[WAVELET_PATH_COUNT];
            string[] pathesSource1 = new string[WAVELET_PATH_COUNT];

            // Create pathes
            pathesSource0[0] = TARGET_FOLDER + string.Format(WAVELET_PATH_BLURRED, 0);
            pathesSource0[1] = TARGET_FOLDER + string.Format(WAVELET_PATH_KERNEL, 0);
            pathesSource0[2] = TARGET_FOLDER + string.Format(WAVELET_PATH_EDGES, 0);
            pathesSource0[3] = TARGET_FOLDER + string.Format(WAVELET_PATH_BLOCKS, 0);

            pathesSource1[0] = TARGET_FOLDER + string.Format(WAVELET_PATH_BLURRED, 1);
            pathesSource1[1] = TARGET_FOLDER + string.Format(WAVELET_PATH_KERNEL, 1);
            pathesSource1[2] = TARGET_FOLDER + string.Format(WAVELET_PATH_EDGES, 1);
            pathesSource1[3] = TARGET_FOLDER + string.Format(WAVELET_PATH_BLOCKS, 1);

            // First source
            var j0 = new Job <bool?>((JobParameter <bool?> _params) =>
            {
                // Dump to disk
                return(t.dumpIntermediateResultsToDisk(_pair.Source0, pathesSource0));
            },
                                     (JobParameter <bool?> _params) =>
            {
                if (_params.Error != null)
                {
                    MessageBox.Show(_params.Error.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
                                     );

            // Second source
            var j1 = new Job <bool?>((JobParameter <bool?> _params) =>
            {
                // Dump to disk
                return(t.dumpIntermediateResultsToDisk(_pair.Source1, pathesSource1));
            },
                                     (JobParameter <bool?> _params) =>
            {
                if (_params.Error != null)
                {
                    MessageBox.Show(_params.Error.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
                                     );

            // Wait for jobs
            j0.waitForDone();
            j1.waitForDone();

            return(j0.Result.Value && j1.Result.Value);
        }
Beispiel #3
0
        // Dumps a compairison pair for the technique "RADISH" to disk
        public static bool dumpRadishStepsToDiskFor(UnfoldedBindingComparisonPair _pair)
        {
            // Local variables
            Technique t = Technique.createTechniqueRadish();

            string[] pathesSource0 = new string[RADISH_PATH_COUNT];
            string[] pathesSource1 = new string[RADISH_PATH_COUNT];

            // Create pathes
            pathesSource0[0] = TARGET_FOLDER + string.Format(RADISH_PATH_GRAYSCALE, 0);
            pathesSource0[1] = TARGET_FOLDER + string.Format(RADISH_PATH_BLURRED, 0);
            pathesSource0[2] = TARGET_FOLDER + string.Format(RADISH_PATH_RADONMAP, 0);
            pathesSource0[3] = TARGET_FOLDER + string.Format(RADISH_PATH_FEATUREVECTOR, 0);
            pathesSource0[4] = TARGET_FOLDER + string.Format(RADISH_PATH_DCT, 0);

            pathesSource1[0] = TARGET_FOLDER + string.Format(RADISH_PATH_GRAYSCALE, 1);
            pathesSource1[1] = TARGET_FOLDER + string.Format(RADISH_PATH_BLURRED, 1);
            pathesSource1[2] = TARGET_FOLDER + string.Format(RADISH_PATH_RADONMAP, 1);
            pathesSource1[3] = TARGET_FOLDER + string.Format(RADISH_PATH_FEATUREVECTOR, 1);
            pathesSource1[4] = TARGET_FOLDER + string.Format(RADISH_PATH_DCT, 1);

            // First source
            var j0 = new Job <bool?>((JobParameter <bool?> _params) =>
            {
                // Dump to disk
                return(t.dumpIntermediateResultsToDisk(_pair.Source0, pathesSource0));
            },
                                     (JobParameter <bool?> _params) =>
                                     {}
                                     );

            // Second source
            var j1 = new Job <bool?>((JobParameter <bool?> _params) =>
            {
                // Dump to disk
                return(t.dumpIntermediateResultsToDisk(_pair.Source1, pathesSource1));
            },
                                     (JobParameter <bool?> _params) =>
                                     {}
                                     );

            // Wait for jobs
            j0.waitForDone();
            j1.waitForDone();

            return(j0.Result.Value && j1.Result.Value);
        }