Optimal imaging strategies for three-dimensional nuclear magnetic resonance microscopy