Set up masks for registration metric

Is there any example file/code of how to set up masks for registration metric?

Thanks!

https://itk.org/Doxygen46/html/RegistrationITKv4_2ImageRegistration12_8cxx-example.html