By analyzing the subset averaged median (SAM) filter based on threshold decomposition, we show that the class of SAIM filters is identical to the class of extended threshold Boolean filters (ETBF's) with the extended self-dual property. This result indicates that the class of SAM filters encompasses a variety of digital filters such as linear finite impulse response (FIR), weighted median, symmetric L-filters, and any filter defined by a linear combination of these filters. A procedure for determining an optimum SAM filter in the mean square error (MSE) sense is developed. It is shown that the optimization of SAM filters may result in a FIR Wiener filter when the input is Gaussian and in a median-type filter for non-Gaussian inputs.