Semiclassical quantization and extraction of eigenfunctions using arbitrary trajectories