The short answer to your question is no, we do not publish an affine transform that puts a Cell Types Database morphology into the CCF.
The longer answer is that you might be able to do it based on information that is available. First, we do publish the CCF coordinate of the cell’s soma. If you go to the Cell Feature Search page of the Cell Types Database and click the link to download cell feature data, you get a CSV file that has the columns
csl__z. For mouse cells, those columns contain the x, y, and z CCF coordinates of the cell’s soma. So you can position the soma in the correct location.
Now, the orientation of the morphology still reflects how it was reconstructed in the slice, so a cell put at that location in the CCF wouldn’t be pointing the right way. However, we did publish the angles need to put the cells upright in Supplementary Dataset 3 of our recent Nature Neuroscience paper. That spreadsheet contains the
upright_angle needed to rotate the cell (around its z-axis) so that pia is upward and white matter is downward, and the
estimated_slice_angle to tilt the cell (around its x-axis) so that the pia/white matter axis is directly along the y-axis of its coordinate system. (The spreadsheet also has an
estimated_shrinkage_factor so you could inflate the cell along its z-axis to adjust for the effects of shrinkage from fixation.)
The last step would be to rotate the morphology once more so that its vertical axis is pointing along the direct path between pia and white matter at that particular location in the CCF. I don’t believe that’s directly available anywhere, but it is possible to calculate from the geometry of the structures.
This all might be outside the scope of your package, but I wanted to lay out a path you might take in case you wanted to give it a shot.