Exemple #1
0
        private void FileLoader_DoWork(object sender, DoWorkEventArgs e)
        {
            FileLoadingParams fileLoadingParams = (FileLoadingParams)e.Argument;

            timer.Start();
            GrayBitmap img = new GrayBitmap();
            string     segmentationPoints;

            using (Stream file = fileLoadingParams.FileStream)
                img.Load(file, out segmentationPoints, new ProgressCallback(FileLoader.ReportProgress));
            timer.Stop();

            e.Result = new FileLoadingResult(img, segmentationPoints);
        }
Exemple #2
0
        private void FileLoader_DoWork(object sender, DoWorkEventArgs e)
        {
            FileLoadingParams fileLoadingParams = (FileLoadingParams)e.Argument;

            timer.Start();
            GrayBitmap img = new GrayBitmap();
            string segmentationPoints;
            using (Stream file = fileLoadingParams.FileStream)
                img.Load(file, out segmentationPoints, new ProgressCallback(FileLoader.ReportProgress));
            timer.Stop();

            e.Result = new FileLoadingResult(img, segmentationPoints);
        }