domain from boolean mask?


Does anyone know how to define a domain (something like 3DBOX) from a Boolean flag matrix? I want to use the Block Lattice–>Tensor reduction routines, but need to sample a sub-domain that is non-rectangular and cannot be defined via a BOX3D geometry. Instead, my domain of interest is defined from an STL geometry I import earlier into the code. Any thoughts on how to do this? I know the logic is there, I’m just not sure of the syntax.