예제 #1
0
        private void dcdBtn_Click(object sender, EventArgs e)
        {
            String folderPath = inputFileTxt.Text;

            // Read images
            images = fsr.readFiles(folderPath);
            DCDHandler dcdHandler = (DCDHandler)descFactory.getDescriptorHandler(DescHandlerFactory.Descriptor.DCD);

            if (outDirTxt.Text == null || outDirTxt.Text.Length == 0)
            {
                DialogResult outDirNotSetWarning = MessageBox.Show("Output Directory is not set. Results will be written to input directory. Continue?",
                                                                   "Warning", MessageBoxButtons.YesNo);
                if (outDirNotSetWarning == DialogResult.Yes)
                {
                    FileSystemWriter fsw  = new FileSystemWriter(inputFileTxt.Text + "\\ExistanceResult.txt");
                    FileSystemWriter fsw2 = new FileSystemWriter(inputFileTxt.Text + "\\PropotionResult.txt");
                    writeDCDInfo(dcdHandler, fsw, fsw2);
                }
                else
                {
                    return;
                }
            }
            else
            {
                FileSystemWriter fsw  = new FileSystemWriter(outDirTxt.Text + "\\ExistanceResult.txt");
                FileSystemWriter fsw2 = new FileSystemWriter(outDirTxt.Text + "\\PropotionResult.txt");
                writeDCDInfo(dcdHandler, fsw, fsw2);
            }
        }
예제 #2
0
        private void dcdBtn_Click(object sender, EventArgs e)
        {
            String fileName = inputFileTxt.Text;

            DCDHandler dcdHandler = (DCDHandler)descFactory.getDescriptorHandler(DescHandlerFactory.Descriptor.DCD);

            dcdHandler.calcDescriptorInfo(fileName);

            DCDResult dcdForm = new DCDResult();

            dcdForm.setDCDInfo(fileName, dcdHandler.DominantRGB);
            dcdForm.Show();
        }