Quantification of nematic cell polarity in three-dimensional tissues