Thresholding method can't segment the dicom precisely, and I guess machine learning may do a good job. It seems that there's no well open sourced repository using machine learning to do the segmentation. It's not difficult to breakthrough and the repository will win much more stars if done this. I'm trying to do so.