Design patterns for hierarchical multiple selection

Given the hypothetical structure:

enter image description here

Representing a group of items that can be classified as type A or B, and each subtype can be classified as type C or D, and within D can be classified type E or F.

Where the user can choose to display All items, All items of type A or type B, any combination of C-F from A + any combination of C-F from B

This will be used as a filter where there are mutually exclusive states (e.g. you can't select ALL and A at the same time, or select A and A/C at the same time) and also non-mutually exclusive states (e.g. you can select A/C and B/C). I want to implement this as a 'toggle map' where if the user selects ALL then every square will be selected (or unselected depending on the existing state). This then also allows users to select different combinations to analyze different subsets of data.

Is this type of user interaction too complex? Is there an alternate design pattern that allowing users to make multiple selections from a hierarchical structure while still able to show the relationship between each of the categories?