The code for segmenting the thalamic nuclei is available as part as the development version of FreeSurfer (see description here).

As part of BUNGEE-TOOLS, we have made improvements to the code for longitudinal segmentation in FreeSurfer (here).

Code for refining registrations in a stack of histological sections using an MRI scan as reference can be found [here].

Code for "A multimodal computational pipeline for 3D histology of the human brain" can be found in [this respository].