Length measurement and spatial orientation reconstruction of single nanowires