corrected some bugs and added the code to extract a patch around the feature in 3D.