public MultiscaleEnhancementDialog(MainForm mainForm, ViewerForm form) { InitializeComponent(); _mainForm = mainForm; _form = form; _viewer = form.Viewer; _originalBitmap = _viewer.Image.Clone(); int uMaxLevels = Math.Max(form.Image.Width, form.Image.Height); int nRangeMax = (int)Math.Ceiling(Math.Log(uMaxLevels) / Math.Log(2.0)); _numEdgeLevel.Maximum = new decimal(nRangeMax); _numLatLevel.Maximum = new decimal(nRangeMax); _cbFilter.SelectedIndex = 3; }
public BackgroundRemovalDialog(MainForm mainForm, ViewerForm form, bool invert) { InitializeComponent(); _mainForm = mainForm; //cell.Image.Page = cell.ActiveSubCell + 1; _form = form; _viewer = form.Viewer; _cbInvert.Checked = invert; _windowCenter = _form.WindowLevelCenter; _windowWidth = _form.WindowLevelWidth; _originalBitmap = _viewer.Image.Clone(); int uMaxLevels = Math.Max(form.Image.Width, form.Image.Height); int nRangeMax = (int)Math.Ceiling(Math.Log(uMaxLevels) / Math.Log(2.0)); _numEdgeLevel.Maximum = new decimal(nRangeMax); }