Intensity-based deformable registration with spatial-invariant regularization generally fails when distinct motion exists across different types of tissues. The purpose of this work was to develop and validate a new regularization approach for deformable image registration that is tissue-specific and able to handle motion discontinuities. Our approach was built upon a Demons registration framework, and used the image context supplementing the original spatial constraint to regularize displacement vector fields in iterative image registration process. The new regularization was implemented as a spatial-contextual filter, which favors the motion vectors within the same tissue type but penalizes the motion vectors from different tissues. This approach was validated using five public lung cancer patients, each with 300 landmark pairs identified by a thoracic radiation oncologist. The mean and standard deviation of the landmark registration errors were 1.3 ± 0.8 mm, compared with those of 2.3 ± 2.9 mm using the original Demons algorithm. Particularly, for the case with the largest initial landmark displacement of 15 ± 9 mm, the modified Demons algorithm had a registration error of 1.3 ± 1.1 mm, while the original Demons algorithm had a registration error of 3.6 ± 5.9 mm. We also qualitatively evaluated the modified Demons algorithm using two difficult cases in our routine clinic: one lung case with large sliding motion and one head and neck case with large anatomical changes in air cavity. Visual evaluation on the deformed image created by the deformable image registration showed that the modified Demons algorithm achieved reasonable registration accuracy, but the original Demons algorithm produced distinct registration errors.