Nonlinear partition-based filters for signal restoration