Microstructure characterization of titanium dioxide nanodispersions and thin films for dye-sensitized solar cell devices