A micromagnetic Green-function approach is used to investigate the effect of nanojunctions, constraints, and other obstacles on spin-dependent conduction. Depending on geometry, the determination of the spin structure involves several types of Bessel functions. A common feature of the Green functions is the involvement of the domain-wall width of the main phase, which can be interpreted as the decay length of the magnetization perturbation away from the junction. This length is typically on the order of 10 nm and independent of the strength of the perturbation. Only the magnitude of the magnetization perturbation depends on the strength of the inhomogenity. A particular feature of the considered structures is that the total spin-dependent scattering cross section, as estimated from the squared magnetization gradient, exhibits a characteristic real-structure dependent maximum as a function of the boundary phase or junction dimensions.