Medical image registration based on BSP and quad-tree partitioning