Light-induced molecule reorientation in dye-doped liquid crystals has been applied to nonlinear spatial filtering of periodic patterns. Photoisomerization of azo-dye molecules leads to local alignment changes in the liquid-crystal molecules because of interaction among the molecules. Consequently the polarization of transmitted light is modulated, depending on the induced light intensity. By selection of suitable polarization of the transmitted light self-aligned filtering is realized. Both temporal response and filtering efficiencies have been experimentally investigated.