In this paper we proposed a new framework for obtaining the spongy and cortical bones from the MRI data. The method focuses on the accurate extraction of the edges of the target tissues, which is the main drawback of the previous works. This framework first limits the searching area for the bone voxels from the whole data to a small strip around the edges of the cortical and spongy bones then applies a very accurate segmentation on the searching area using the newly developed deformable kernel Fuzzy C-Means (DKFCM) algorithm, which is proposed in this paper. Comparing the results of this work with previous segmentation methods on a testing dataset consisting of 10,485,760 voxels demonstrates the superiority of the proposed method especially on the edges of the spongy and cortical bone.