A novel framework for image filtering based on regression is presented. Regression is a supervised technique from pattern recognition theory in which a mapping from a number of input variables (features) to a continuous output variable is learned from a set of examples from which both input and output are known. We apply regression on a pixel level. A new, substantially different, image is estimated from an input image by computing a number of filtered input images (feature images) and mapping these to the desired output for every pixel in the image. The essential difference between conventional image filters and the proposed regression filter is that the latter filter is learned from training data. The total scheme consists of preprocessing, feature computation, feature extraction by a novel dimensionality reduction scheme designed specifically for regression, regression by k-nearest neighbor averaging, and (optionally) iterative application of the algorithm. The framework is applied to estimate the bone and soft-tissue components from standard frontal chest radiographs. As training material, radiographs with known soft-tissue and bone components, obtained by dual energy imaging, are used. The results show that good correlation with the true soft-tissue images can be obtained and that the scheme can be applied to images from a different source with good results. We show that bone structures are effectively enhanced and suppressed and that in most soft-tissue images local contrast of ribs decreases more than contrast between pulmonary nodules and their surrounding, making them relatively more pronounced.