Registration mask and rigidity penalty

My questions is actually the continuation of elastix group discussion..

Currently I am trying to assess treatment success by registering pretreatment CT and post treatment CT. I want to keep the lesion region undeformed as much as possible while registering other parts with deformable algorithms. Since my algorithm is intensity-based, lesion region in pretreatment CT and treatment region in posttreatment CT are confusing the algorithm.

Currently I am experimenting with TransformRigidityPenalty. But I am also wondering the effect of masking out those regions during registration. I read that TransformRigidityPenalty is calculated on control points not sampled points. So does it mean that even though the region-of-interest is masked out, TransformRigidityPenalty would still force the algorithm to keep that region rigid?

Thank you!