Ejemplo n.º 1
0
        public UnfoldedBindingComparisonPair cloneWithNewTag(object _tag)
        {
            var item = new UnfoldedBindingComparisonPair(Threshold, Binding0, Binding1, Source0, Source1, DataRADISH, DataDCT, DataWavelet, DataBMB);

            item.Tag = _tag;
            return(item);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
0
        // Constructor
        public StepByStepDCT(UnfoldedBindingComparisonPair _pair)
        {
            InitializeComponent();

            // Set labels to loading
            SS_Label_DCT_Original.Text       = LABEL_LOADING;
            SS_Label_DCT_MeanFilter.Text     = LABEL_LOADING;
            SS_Label_DCT_Resized.Text        = LABEL_LOADING;
            SS_Label_DCT_DCTMatrix.Text      = LABEL_LOADING;
            SS_Label_DCT_DCTImage.Text       = LABEL_LOADING;
            SS_Label_DCT_DCTImageSubSec.Text = LABEL_LOADING;
            SS_Label_DCT_Median.Text         = LABEL_LOADING;

            // Create pop-up window (larger view)
            m_largerImageView              = new StepByStepLargerImage();
            m_popupWindow                  = new Popup(m_largerImageView);
            m_popupWindow.HidingAnimation  = PopupAnimations.None;
            m_popupWindow.ShowingAnimation = PopupAnimations.None;
            m_popupWindow.FocusOnOpen      = false;

            // Add click events to picture boxes
            addLargerImageViewPopupTo(SS_Picture_DCT_Original_0);
            addLargerImageViewPopupTo(SS_Picture_DCT_MeanFilter_0);
            addLargerImageViewPopupTo(SS_Picture_DCT_Resized_0);
            addLargerImageViewPopupTo(SS_Picture_DCT_DCTMatrix_0);
            addLargerImageViewPopupTo(SS_Picture_DCT_DCTImage_0);
            addLargerImageViewPopupTo(SS_Picture_DCT_DCTImageSubSec_0);
            addLargerImageViewPopupTo(SS_Picture_DCT_Median_0);

            addLargerImageViewPopupTo(SS_Picture_DCT_Original_1);
            addLargerImageViewPopupTo(SS_Picture_DCT_MeanFilter_1);
            addLargerImageViewPopupTo(SS_Picture_DCT_Resized_1);
            addLargerImageViewPopupTo(SS_Picture_DCT_DCTMatrix_1);
            addLargerImageViewPopupTo(SS_Picture_DCT_DCTImage_1);
            addLargerImageViewPopupTo(SS_Picture_DCT_DCTImageSubSec_1);
            addLargerImageViewPopupTo(SS_Picture_DCT_Median_1);

            // Set group labels
            SS_Group_DCT_0.Text = string.Format(LABEL_GROUP, 0, _pair.Source0.FilePath);
            SS_Group_DCT_1.Text = string.Format(LABEL_GROUP, 1, _pair.Source1.FilePath);

            // Create job
            new Job <bool?>((JobParameter <bool?> _params) =>
            {
                // Dump pair to disk
                if (!DumpTechniqueStepsToDisk.dumpDCTStepsToDiskFor(_pair))
                {
                    return(false);
                }

                return(true);
            },
                            (JobParameter <bool?> _params) =>
            {
                // Failed?
                if (_params.Error != null)
                {
                    MessageBox.Show(_params.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else if (_params.Result == null || _params.Result == false)
                {
                    MessageBox.Show("Dumping to disk failed!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                // Set image location
                Utility.invokeInGuiThread(this, delegate
                {
                    // Set labels to loading
                    SS_Label_DCT_Original.Text       = LABEL_MEAN_ORIGINAL;
                    SS_Label_DCT_MeanFilter.Text     = LABEL_MEAN_FILTER;
                    SS_Label_DCT_Resized.Text        = LABEL_RESIZED;
                    SS_Label_DCT_DCTMatrix.Text      = LABEL_DCT_MATRIX;
                    SS_Label_DCT_DCTImage.Text       = LABEL_DCT_IMAGE;
                    SS_Label_DCT_DCTImageSubSec.Text = LABEL_DCT_IMAGE_SUBSEC;
                    SS_Label_DCT_Median.Text         = LABEL_MEDIAN;

                    // Source 0
                    SS_Picture_DCT_Original_0.BackgroundImage       = Image.FromFile(_pair.Source0.FilePath);
                    SS_Picture_DCT_MeanFilter_0.BackgroundImage     = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.DCT_PATH_MEANFILTER, 0));
                    SS_Picture_DCT_Resized_0.BackgroundImage        = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.DCT_PATH_RESIZED, 0));
                    SS_Picture_DCT_DCTMatrix_0.BackgroundImage      = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.DCT_PATH_DCTMATRIX, 0));
                    SS_Picture_DCT_DCTImage_0.BackgroundImage       = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.DCT_PATH_DCTIMAGE, 0));
                    SS_Picture_DCT_DCTImageSubSec_0.BackgroundImage = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.DCT_PATH_DCTIMAGE_SUBSEC, 0));
                    SS_Picture_DCT_Median_0.BackgroundImage         = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.DCT_PATH_MEDIAN, 0));

                    // Source 1
                    SS_Picture_DCT_Original_1.BackgroundImage       = Image.FromFile(_pair.Source1.FilePath);
                    SS_Picture_DCT_MeanFilter_1.BackgroundImage     = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.DCT_PATH_MEANFILTER, 1));
                    SS_Picture_DCT_Resized_1.BackgroundImage        = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.DCT_PATH_RESIZED, 1));
                    SS_Picture_DCT_DCTMatrix_1.BackgroundImage      = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.DCT_PATH_DCTMATRIX, 1));
                    SS_Picture_DCT_DCTImage_1.BackgroundImage       = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.DCT_PATH_DCTIMAGE, 1));
                    SS_Picture_DCT_DCTImageSubSec_1.BackgroundImage = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.DCT_PATH_DCTIMAGE_SUBSEC, 1));
                    SS_Picture_DCT_Median_1.BackgroundImage         = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.DCT_PATH_MEDIAN, 1));
                });
            });
        }
Ejemplo n.º 6
0
        // Constructor
        public StepByStepWavelet(UnfoldedBindingComparisonPair _pair)
        {
            InitializeComponent();

            // Set labels to loading
            SS_Label_Wavelet_Original.Text = LABEL_LOADING;
            SS_Label_Wavelet_Blurred.Text  = LABEL_LOADING;
            SS_Label_Wavelet_Kernel.Text   = LABEL_LOADING;
            SS_Label_Wavelet_Edges.Text    = LABEL_LOADING;
            SS_Label_Wavelet_Blocks.Text   = LABEL_LOADING;

            // Create pop-up window (larger view)
            m_largerImageView              = new StepByStepLargerImage();
            m_popupWindow                  = new Popup(m_largerImageView);
            m_popupWindow.HidingAnimation  = PopupAnimations.None;
            m_popupWindow.ShowingAnimation = PopupAnimations.None;
            m_popupWindow.FocusOnOpen      = false;

            // Add click events to picture boxes
            addLargerImageViewPopupTo(SS_Picture_Wavelet_Original_0);
            addLargerImageViewPopupTo(SS_Picture_Wavelet_Blurred_0);
            addLargerImageViewPopupTo(SS_Picture_Wavelet_Kernel_0);
            addLargerImageViewPopupTo(SS_Picture_Wavelet_Edges_0);
            addLargerImageViewPopupTo(SS_Picture_Wavelet_Blocks_0);

            addLargerImageViewPopupTo(SS_Picture_Wavelet_Original_1);
            addLargerImageViewPopupTo(SS_Picture_Wavelet_Blurred_1);
            addLargerImageViewPopupTo(SS_Picture_Wavelet_Kernel_1);
            addLargerImageViewPopupTo(SS_Picture_Wavelet_Edges_1);
            addLargerImageViewPopupTo(SS_Picture_Wavelet_Blocks_1);

            // Set group labels
            SS_Group_Wavelet_0.Text = string.Format(LABEL_GROUP, 0, _pair.Source0.FilePath);
            SS_Group_Wavelet_1.Text = string.Format(LABEL_GROUP, 1, _pair.Source1.FilePath);

            // Create job
            new Job <bool?>((JobParameter <bool?> _params) =>
            {
                // Dump pair to disk
                if (!DumpTechniqueStepsToDisk.dumpWaveletStepsToDiskFor(_pair))
                {
                    return(false);
                }

                return(true);
            },
                            (JobParameter <bool?> _params) =>
            {
                // Failed?
                if (_params.Error != null)
                {
                    MessageBox.Show(_params.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else if (_params.Result == null || _params.Result == false)
                {
                    MessageBox.Show("Dumping to disk failed!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                // Set image location
                Utility.invokeInGuiThread(this, delegate
                {
                    // Set labels to loading
                    SS_Label_Wavelet_Original.Text = LABEL_ORIGINAL;
                    SS_Label_Wavelet_Blurred.Text  = LABEL_BLURRED;
                    SS_Label_Wavelet_Kernel.Text   = LABEL_KERNEL;
                    SS_Label_Wavelet_Edges.Text    = LABEL_EDGES;
                    SS_Label_Wavelet_Blocks.Text   = LABEL_BLOCKS;

                    // Source 0
                    SS_Picture_Wavelet_Original_0.BackgroundImage = Image.FromFile(_pair.Source0.FilePath);
                    SS_Picture_Wavelet_Blurred_0.BackgroundImage  = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.WAVELET_PATH_BLURRED, 0));
                    SS_Picture_Wavelet_Kernel_0.BackgroundImage   = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.WAVELET_PATH_KERNEL, 0));
                    SS_Picture_Wavelet_Edges_0.BackgroundImage    = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.WAVELET_PATH_EDGES, 0));
                    SS_Picture_Wavelet_Blocks_0.BackgroundImage   = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.WAVELET_PATH_BLOCKS, 0));

                    // Source 1
                    SS_Picture_Wavelet_Original_1.BackgroundImage = Image.FromFile(_pair.Source1.FilePath);
                    SS_Picture_Wavelet_Blurred_1.BackgroundImage  = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.WAVELET_PATH_BLURRED, 1));
                    SS_Picture_Wavelet_Kernel_1.BackgroundImage   = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.WAVELET_PATH_KERNEL, 1));
                    SS_Picture_Wavelet_Edges_1.BackgroundImage    = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.WAVELET_PATH_EDGES, 1));
                    SS_Picture_Wavelet_Blocks_1.BackgroundImage   = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.WAVELET_PATH_BLOCKS, 1));
                });
            });
        }
Ejemplo n.º 7
0
        // Updates the control's content with a comparison pair (null to delete content)
        public void setComparisonPair(ViewCrossComparison _hostView, UnfoldedBindingComparisonPair _pair)
        {
            // Local variables
            Job <Image> .delegate_job      func     = null;
            Job <Image> .delegate_job_done funcDone = null;

            // Set host
            m_hostView = _hostView;

            // Lock data
            lock (m_dataLock)
            {
                // Cancel old jobs
                if (m_jobLoadingSource0 != null)
                {
                    m_jobLoadingSource0.cancel();
                    m_jobLoadingSource0 = null;
                }
                if (m_jobLoadingSource1 != null)
                {
                    m_jobLoadingSource1.cancel();
                    m_jobLoadingSource1 = null;
                }

                // Run in GUI thread
                Utility.invokeInGuiThread(this, delegate
                {
                    // Delete images
                    if (m_pictureSource0.BackgroundImage != null)
                    {
                        m_pictureSource0.BackgroundImage.Dispose();
                        m_pictureSource0.BackgroundImage = null;
                    }
                    if (m_pictureSource1.BackgroundImage != null)
                    {
                        m_pictureSource1.BackgroundImage.Dispose();
                        m_pictureSource1.BackgroundImage = null;
                    }

                    // Reset GUI content
                    if (_pair == null)
                    {
                        m_textSource0.Text = m_textSource1.Text = "";
                    }
                    else
                    {
                        m_textSource0.Text = m_textSource1.Text = TEXT_LOADING_IMAGE_SOURCE;
                    }
                });
            }

            // Copy
            m_pair = _pair;
            if (m_pair == null)
            {
                return;
            }

            // Job function
            func = (JobParameter <Image> _params) =>
            {
                // Cancelled?
                if (_params.IsCancellationRequested == true)
                {
                    _params.dropJob();
                }

                // Create bitmap
                return((_params.Data[0] as ImageSource).createSystemImage());
            };

            // Job done function
            funcDone = (JobParameter <Image> _params) =>
            {
                // Lock data
                lock (m_dataLock)
                {
                    // Cancelled?
                    if (_params.IsCancellationRequested == true)
                    {
                        // Delete image
                        _params.Result.Dispose();

                        // Drop
                        _params.dropJob();
                    }

                    // Run in GUI thread
                    Utility.invokeInGuiThread(this, delegate
                    {
                        // Local variables
                        DirectoryInfo dirInfo = new DirectoryInfo((_params.Data[0] as ImageSource).FilePath);

                        // Set image
                        (_params.Data[1] as PictureBox).BackgroundImage = _params.Result;

                        // Set text
                        (_params.Data[2] as TextBox).Text = dirInfo.Parent.Name + "\\" + dirInfo.Name;
                    });
                }
            };

            // Create jobs
            m_jobLoadingSource0 = new Job <Image>(func, funcDone, true, new object[] { _pair.Source0, m_pictureSource0, m_textSource0 });
            m_jobLoadingSource1 = new Job <Image>(func, funcDone, true, new object[] { _pair.Source1, m_pictureSource1, m_textSource1 });

            // Set timings
            setTimingsFor(TechniqueID.RADISH, _pair.Binding0, _pair.Binding1);
            setTimingsFor(TechniqueID.DCT, _pair.Binding0, _pair.Binding1);
            setTimingsFor(TechniqueID.WAVELET, _pair.Binding0, _pair.Binding1);
            setTimingsFor(TechniqueID.BMB, _pair.Binding0, _pair.Binding1);
        }
Ejemplo n.º 8
0
        // Constructor
        public StepByStepRADISH(UnfoldedBindingComparisonPair _pair)
        {
            InitializeComponent();

            // Set labels to loading
            SS_Label_Radish_Original.Text      = LABEL_LOADING;
            SS_Label_Radish_Blurred.Text       = LABEL_LOADING;
            SS_Label_Radish_DCT.Text           = LABEL_LOADING;
            SS_Label_Radish_FeatureVector.Text = LABEL_LOADING;
            SS_Label_Radish_Grayscale.Text     = LABEL_LOADING;
            SS_Label_Radish_RadonMap.Text      = LABEL_LOADING;

            // Create pop-up window (larger view)
            m_largerImageView              = new StepByStepLargerImage();
            m_popupWindow                  = new Popup(m_largerImageView);
            m_popupWindow.HidingAnimation  = PopupAnimations.None;
            m_popupWindow.ShowingAnimation = PopupAnimations.None;
            m_popupWindow.FocusOnOpen      = false;

            // Add click events to picture boxes
            addLargerImageViewPopupTo(SS_Picture_Radish_Original_0);
            addLargerImageViewPopupTo(SS_Picture_Radish_Grayscale_0);
            addLargerImageViewPopupTo(SS_Picture_Radish_Blurred_0);
            addLargerImageViewPopupTo(SS_Picture_Radish_Radon_0);
            addLargerImageViewPopupTo(SS_Picture_Radish_Feature_0);
            addLargerImageViewPopupTo(SS_Picture_Radish_DCT_0);

            addLargerImageViewPopupTo(SS_Picture_Radish_Original_1);
            addLargerImageViewPopupTo(SS_Picture_Radish_Grayscale_1);
            addLargerImageViewPopupTo(SS_Picture_Radish_Blurred_1);
            addLargerImageViewPopupTo(SS_Picture_Radish_Radon_1);
            addLargerImageViewPopupTo(SS_Picture_Radish_Feature_1);
            addLargerImageViewPopupTo(SS_Picture_Radish_DCT_1);

            // Set group labels
            SS_Group_RADISH_0.Text = string.Format(LABEL_GROUP, 0, _pair.Source0.FilePath);
            SS_Group_RADISH_1.Text = string.Format(LABEL_GROUP, 1, _pair.Source1.FilePath);

            // Create job
            new Job <bool?>((JobParameter <bool?> _params) =>
            {
                // Dump pair to disk
                if (!DumpTechniqueStepsToDisk.dumpRadishStepsToDiskFor(_pair))
                {
                    return(false);
                }

                return(true);
            },
                            (JobParameter <bool?> _params) =>
            {
                // Failed?
                if (_params.Error != null)
                {
                    MessageBox.Show(_params.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else if (_params.Result == null || _params.Result == false)
                {
                    MessageBox.Show("Dumping to disk failed!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                // Set image location
                Utility.invokeInGuiThread(this, delegate
                {
                    // Set labels to loading
                    SS_Label_Radish_Original.Text      = LABEL_ORIGINAL;
                    SS_Label_Radish_Blurred.Text       = LABEL_BLURRED;
                    SS_Label_Radish_DCT.Text           = LABEL_DCT;
                    SS_Label_Radish_FeatureVector.Text = LABEL_FEATURE_VECTOR;
                    SS_Label_Radish_Grayscale.Text     = LABEL_GRAYSCALE;
                    SS_Label_Radish_RadonMap.Text      = LABEL_RADON_MAP;

                    // Source 0
                    SS_Picture_Radish_Original_0.BackgroundImage  = Image.FromFile(_pair.Source0.FilePath);
                    SS_Picture_Radish_Grayscale_0.BackgroundImage = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.RADISH_PATH_GRAYSCALE, 0));
                    SS_Picture_Radish_Blurred_0.BackgroundImage   = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.RADISH_PATH_BLURRED, 0));
                    SS_Picture_Radish_Radon_0.BackgroundImage     = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.RADISH_PATH_RADONMAP, 0));
                    SS_Picture_Radish_Feature_0.BackgroundImage   = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.RADISH_PATH_FEATUREVECTOR, 0));
                    SS_Picture_Radish_DCT_0.BackgroundImage       = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.RADISH_PATH_DCT, 0));

                    // Source 1
                    SS_Picture_Radish_Original_1.BackgroundImage  = Image.FromFile(_pair.Source1.FilePath);
                    SS_Picture_Radish_Grayscale_1.BackgroundImage = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.RADISH_PATH_GRAYSCALE, 1));
                    SS_Picture_Radish_Blurred_1.BackgroundImage   = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.RADISH_PATH_BLURRED, 1));
                    SS_Picture_Radish_Radon_1.BackgroundImage     = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.RADISH_PATH_RADONMAP, 1));
                    SS_Picture_Radish_Feature_1.BackgroundImage   = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.RADISH_PATH_FEATUREVECTOR, 1));
                    SS_Picture_Radish_DCT_1.BackgroundImage       = Image.FromFile(DumpTechniqueStepsToDisk.TARGET_FOLDER + string.Format(DumpTechniqueStepsToDisk.RADISH_PATH_DCT, 1));
                });
            });
        }