We introduce an approach which allows a detailed structural and quantitative analysis of multipartite entanglement. The sets of states with different structures are convex and nested. Hence, they can be distinguished from each other using appropriate measurable witnesses. We derive equations for the construction of optimal witnesses and discuss general properties arising from our approach. As an example, we formulate witnesses for a 4-cluster state and perform a full quantitative analysis of the entanglement structure in the presence of noise and losses. The strength of the method in multimode continuous variable systems is also demonstrated by considering a dephased GHZ-type state.