// Drops MSec public bool drop() { // Clean folder "TempData" DumpTechniqueStepsToDisk.cleanTargetFolder(); return(true); }
// 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)); }); }); }
// 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)); }); }); }
// 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)); }); }); }