Nonlocal techniques represent the current state of the art in SAR despeckling, providing a good compromise between speckle reduction and preservation of relevant image features. Nonetheless, they are not free from problems, going from the loss of image features to the introduction of their own brand of artifacts, due to the inability to deal equally well with all types of imaged scenes. A possible tool to improve performance is a prior segmentation or classification of the image, so as to adjust the filter parameters to fit the nature of the region under analysis. This work first provides some insight into the potential of classification-based nonlocal filtering by running simulation experiments in a controlled environment. Then proposes a new version of the SAR-BM3D despeckling technique in which each pixel is first classified as homogeneous or not, and then filtered with class-adapted parameters. Although results on real SAR images are still questionable, there is already some significant gain in selected areas that justifies the interest towards this approach.