I want to cluster a rooted tree. The all possible cluster formation can be explained by the following figure. Is there exist any algorithm that can generate all possible cluster as shown from a given tree? 
Note that, each of the clusters must contain the nodes with degree of unity, and there exist atmost one vertex of the subtree, whoose degree is not equal to the degree of the same vertex in the original tree.
Proposed rule set for making a cluster:
The total number of clusters then will be the number of leaf nodes $l$, plus the count of valid pruning options across non-root branch nodes $\{B\}$, plus the pruning options for the root node $r$. It's unclear whether in the case where the root node is a leaf, that node alone is a cluster. The below formula for the count of clusters assumes that it is:
$$l+\sum_{v\in B} \left(2^{\,d(v)-1)}-1\right) + (2^{d(r)}-1)$$
(where $d()$ is the degree of that vertex)