grid refinement by bool-mask

Hi, everyone
For some reason I want to use grid refinement on phase boundaries with complex geometries. The example for grid refinement in PALABOS works for only block structure. Is it possible to get access to each lattice node to assign grid refinement or can I assign grid refinement nodes by using a bool mask?

Thanks,
Ning