A method for flexible inspection of a sample includes forming an input beam using a beam source, blocking a portion of the input beam using an input mask, and forming a shaped beam from a portion of the input beam. The shaped beam is received at a first portion of an objective lens and focused onto a sample. A reflected beam is collected at a second portion of the objective lens. Scattered light is collected at the first and second portions of the objective lens and at a third portion of the objective lens. The scattered light is received at a dark-field detector module and a portion of the scattered light is directed to a dark-field detector. The dark-field detector module includes an output mask having one or more output apertures that allow at least part of the scattered light that passes through the third portion of the object lens to pass as the portion of the scattered light that is directed to the dark-field detector.