Purpose. We report the initial implementation of an algorithm that automatically plans screw trajectories for spinal pedicle screw placement procedures to improve the workflow, accuracy, and reproducibility of screw placement in freehand navigated and robot-assisted spinal pedicle screw surgery. In this work, we evaluate the sensitivity of the algorithm to the settings of key parameters in simulation studies. Methods. Statistical shape models (SSMs) of the lumbar spine were constructed with segmentations of L1-L5 and bilateral screw trajectories of N=40 patients. Active-shape model (ASM) registration was devised to map the SSMs to the patient CT, initialized simply by alignment of (automatically annotated) single-point vertebral centroids. The atlas was augmented by definition of "ideal/reference" trajectories for each spinal pedicle, and the trajectories are deformably mapped to the patient CT. A parameter sensitivity analysis for the ASM method was performed on 3 parameters to determine robust operating points for ASM registration. The ASM method was evaluated by calculating the root-mean-square-error between the registered SSM and the ground-truth segmentation for the L1 vertebra, and the trajectory planning method was evaluated by performing a leave-one-out analysis and determining the entry point, end point, and angular differences between the automatically planned trajectories and the neurosurgeon-defined reference trajectories. Results. The parameter sensitivity analysis showed that the ASM registration algorithm was relatively insensitive to initial profile length (PLinitial) less than ∼4 mm, above which runtime and registration error increased. Similarly stable performance was observed for a maximum number of principal components (PCmax) of at least 8. Registration error ∼2 mm was evident with diminishing return beyond a number of ITERations, NITER, ∼2000. With these parameter settings, ASM registration of L1 achieved (2.0 ± 0.5) mm RMSE. Transpedicle trajectories for L1 agreed with reference definition by (2.6 ± 1.3) mm at the entry point, by (3.4 ± 1.8) mm at the end point, and within (4.9° ±2.8°) in angle. Conclusions. Initial results suggest that the algorithm yields accurate definition of pedicle trajectories in unsegmented CT images of the spine. The studies identified stable operating points for key algorithm parameters and support ongoing development and translation to clinical studies in free-hand navigated and robot-assisted spine surgery, where fast, accurate trajectory definition is essential to workflow.