Hidden Order and Dimensional Crossover of the Charge Density Waves in TiSe2