Terahertz active spatial filtering through optically tunable hyperbolic metamaterials