Exemple #1
0
        public static async Task <DicomImageObject> LoadDicomImageAsync(string[] fileNames, IProgress <double> progress)
        {
            var files = await getFilesAsync(fileNames);

            var loader = new DicomImageLoader();
            var img    = new DicomImageObject();

            loader.Load(files, img, progress);
            return(img);
        }
        private async void glControl_Load(object sender, EventArgs e)
        {
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
            GL.Enable(EnableCap.Texture2D);

            _dicomImageLoader = new DicomImageLoader();

            _imageProvider = new Dictionary <string, Image>();

            _image = await _dicomImageLoader.LoadDcmImage();

            _imageProvider.UpsertOriginalImage(_image);

            _imageLoadingState = ImageLoadingState.Loaded;

            this.Invoke(new MethodInvoker(glControl.Refresh));

            glControl.SwapBuffers();
        }
Exemple #3
0
        public DicomImageObject(params DicomFile[] files) : base(files)
        {
            var loader = new DicomImageLoader();

            loader.Load(files, this);
        }