This document proposes a new algorithm called 3D continuous dynamic programming (3DCDP) for segmentation-free registration and optimal matching of 3D voxel patterns. 3DCDP allows for matching of full voxels inside 3D objects, not just surfaces. It matches a reference 3D image to parts of an input image in a segmentation-free manner. The algorithm extends 2D continuous dynamic programming to 3D by combining three 2DCDP planes. Experiments show it can accurately match a reference image embedded within an input image.