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(); }
public DicomImageObject(params DicomFile[] files) : base(files) { var loader = new DicomImageLoader(); loader.Load(files, this); }