We present two theoretical schemes for spin filters in one-dimensional semiconductor quantum wires with spatially modulated Rashba spin-orbit coupling (SOC) as well as weak magnetic potential. For case I, the SOC is periodic and the weak magnetic potential is applied uniformly along the wire. Full spin polarizations with opposite signs are obtained within two separated energy intervals. For case II, the weak magnetic potential is periodic while the SOC is uniform. An ideal negative/positive switching effect for spin polarization is realized by tuning the strength of SOC. The roles of SOC, magnetic potential, and their coupling on the spin filtering are analyzed. Since spin states can be manipulated efficiently through spin-orbit couplings (SOCs) [9], one may carry out allelectric spin-based devices in SOC systems without the need of external magnetic field and magnetic materials. For example, when the transport occurs in multichannel regime, Rashba SOC [10] in two-terminal quantum wires can polarize the electron beams [11]. This behavior may be an alternative route for all-electric spin filters. However, for the view of the spintronic device performance, the single-channel devices are more desirable because they suffer from much less spin relaxation [12], which does harm to most spintronic devices. At the same time, single-channel sample is helpful for the miniaturization of the functional elements in devices. Thus, we focus our attention on one-dimensional quantum wires in the present work. Due to the time-reversal symmetry, the SOC alone in single-channel wires proves unable to generate any spin polarization [13], which means that spin filtering can not be realized through only SOC mechanism in single-channel wires. Because a weak magnetic field can break the time reversal symmetry [14], it is full of possibility to build spin filters in single-channel SOC systems with weak magnetic modulation by designing certain models.In the present work, we propose theoretical schemes for spin filters in one-dimensional quantum wires through modulations of both magnetic potentials and Rashba