private void OkButton_Click(object sender, EventArgs e)
 {
     DialogResult = DialogResult.OK;
     param        = new OffsetAlgorithmParams
     {
         SmallMedianFilterSize = (int)SmallMedFilterUpDown.Value,
         LargeMedianFilterSize = (int)LargeMedFilterUpDown.Value
     };
 }
 public OffsetParamsForm()
 {
     InitializeComponent();
     param = null;
 }