public void LoadTomogram(string path) { if (string.IsNullOrEmpty(path)) { return; } if (TomogramTexture != null) { TomogramTexture.FreeBuffers(); } // Make null and go through temp so subsequent parameter updates don't cause a viewport redraw. TomogramTexture = null; VolumeTexture Temp = VolumeTexture.FromMRC(path); PathTomogram = path; MainWindow.Options.PixelScale = Temp.Scale; TomogramTexture = Temp; TomogramTexture.UpdateBuffers(); Viewport.Redraw(); }
public void LoadTomogram(string path) { if (string.IsNullOrEmpty(path)) return; if (TomogramTexture != null) TomogramTexture.FreeBuffers(); // Make null and go through temp so subsequent parameter updates don't cause a viewport redraw. TomogramTexture = null; VolumeTexture Temp = VolumeTexture.FromMRC(path); PathTomogram = path; MainWindow.Options.PixelScale = Temp.Scale; TomogramTexture = Temp; TomogramTexture.UpdateBuffers(); Viewport.Redraw(); }