This paper presents a new algorithm for the denoising of images corrupted with random-valued impulse noise (RVIN). It employs a switching approach that identifies the noisy pixels in the first stage and then estimates their intensity values to restore them. Local statistics of the textons in distinct orientations of the sliding window are exploited to identify the corrupted pixels in an iterative manner; using an adaptive threshold range. Textons are formed by using an isometric grid of minimum local distance that preserves the texture and edge pixels of an image, effectively. At the noise filtering stage, fuzzy rules are used to obtain the noise-free pixels from the proposed tri-directional pixels to estimate the intensity values of identified corrupted pixels. The performance of the proposed denoising algorithm is evaluated on a variety of standard gray-scale images under various intensities of RVIN by comparing it with state-of-the-art denoising methods. The proposed denoising algorithm also has robust denoising and restoration power on biomedical images such as, MRI, X-Ray and CT-Scan. The extensive simulation results based on both quantitative measures and visual representations depict the superior performance of the proposed denoising algorithm for various noise intensities.