public MatrixErrorFilterDialog(MatrixErrorFilter existingModule)
            : base(existingModule)
        {
            module = modifiedModule as MatrixErrorFilter;
            if (module == null) {
                modifiedModule = new MatrixErrorFilter();
                module = modifiedModule as MatrixErrorFilter;
            }

            matrixPanel = new ErrorMatrixPanel((uint)module.Matrix.Height,
                (uint)module.Matrix.Width);
            matrixPanel.Matrix = module.Matrix;

            table = new Table(2, 1, false)
                { ColumnSpacing = 5, RowSpacing = 5, BorderWidth = 5 };
            table.Attach(new Label("Error matrix:") { Xalign = 0.0f },
                0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Shrink, 0, 0);
            table.Attach(matrixPanel, 0, 1, 1, 2,
                AttachOptions.Fill | AttachOptions.Expand,
                AttachOptions.Fill | AttachOptions.Expand, 0, 0);
            table.ShowAll();
            VBox.PackStart(table);
        }
 /// <summary>
 /// Create an perturbed error filter over an existing matrix error
 /// filter.
 /// </summary>
 /// <remarks>
 /// Noise amplitude is at its maximum value by default.
 /// </remarks>
 /// <param name="childFilter">Child filter to be perturbed</param>
 public PerturbedErrorFilter(MatrixErrorFilter childFilter)
 {
     PerturbationAmplitude = 1.0;
     ChildFilter = childFilter;
 }