This work proposes an atlas construction method to jointly analyse the relative position and shape of fiber tracts and gray matter structures. It is based on a double diffeomorphism which is a composition of two diffeomorphisms. The first diffeomorphism acts only on the white matter keeping fixed the gray matter of the atlas. The resulting white matter, together with the gray matter, are then deformed by the second diffeomorphism. The two diffeomorphisms are related and jointly optimised. In this way, the, first diffeomorphisms explain the variability in structural connectivity within the population, namely both changes in the connected areas of the gray matter and in the geometry of the pathway of the tracts. The second diffeomorphisms put into correspondence the homologous anatomical structures across subjects. Fiber bundles are approximated with weighted prototypes using the metric of weighted currents. The atlas, the covariance matrix of deformation parameters and the noise variance of each structure are automatically estimated using a Bayesian approach. This method is applied to patients with Tourette syndrome and controls showing a variability in the structural connectivity of the left cortico-putamen circuit.