Adaptive Weighting Based Metal Artifact Reduction in CT Images