Calculation of local Moran’s I in darkfield (a-j) and brightfield (k-t) light micrographs.

a, Large magnification fluorescent immunostaining for Kv4.2 in the VPM nucleus. b, A 6×6 pixel segment of the image shown in a. The squares represent the pixels with grayscale values. c, Normalized intensity values (zi). The purple framed area demonstrates the convolution step of calculations (see also methods step 1-3). d, A first-order convolution matrix (weight matrix, wij) was used for this calculation. e, Weighted intensity values (wijzj). f, Lagged gray values. g, Local Moran’s I (Ii) values. h, Pseudosignificance values for each pixel. i, Masking the non-significant pixels (middle gray tone without numbers) resulted in two groups of pixels, where the intensity values significantly differ from a random distribution. j, Considering the intensity values, the upper pixel group is interpreted as an object (red), the lower one as background (blue), and the grey field between them represent an area where the pixel intensities could come from a random distribution (interpreted as noise). k-t, The same as a-j, but the calculations are shown on a bright field image. In this case, the low-intensity pixels representing the object are labeled with blue (t) high-intensity pixels (background) with red. Scale bars: a: 5 μm, k: 10 μm.

Comparison of TBM and Moran’s image selection on artificial objects.

a, A series of artificial objects with different diameters (white circle on black background) was defined, and varying levels of noise were added (first row). b-c, The objects are segmented using the threshold (b) and Moran’s I method (c). Red, true positive (TP) pixels; cyan, false positive (FP); black, true negative; black true and false negative. d, Pixel intensity values along the sampling lines at the three noise levels. Grey rectangles indicate the threshold level. Portions of the graph’s line are color-coded (red: true positive, cyan: false positive, black: negative). e-f, Average TPR and FPR values of Moran’s and TBM at different noise levels from 100 random samples. Individual data points are shown separately at a different scale (f).

Comparison of threshold-based, and Moran’s image selection on natural objects.

a, High-resolution confocal image (single optical plane) of Kv4.2 immunostaining in the VB complex of the mouse thalamus at three added noise levels (0, 80, 160). b, Majority projection of segmentation of the same images by expert human observers (n=23, see methods). Pixels selected by the majority of observers are defined as ground truth. c, Threshold-based segmentation with the best TPR/FPR values. d, Moran’s based segmentation using matrix size 4. e, Pixel intensity values along the sampling lines at the three noise levels. Grey areas indicate threshold levels. Portions of the graph’s line are color-coded (red: true positive, cyan: false positive, black: negative). f, TPR and FPR values of Moran’s and TBS at different noise levels. The threshold curve (dotted, blue line) is computed using 254 threshold levels, some of which are labeled (blue circles). Filled blue circle, optimal threshold value. Orange triangle, TPR/FPR values of Moran’s based segmentation using different matrix sizes. The size of the matrices are shown by numbers. Red filled triangle, optimal Moran’s order. Orange and blue arrows indicate the distance of the optimal points from the theoretical best point (maximal TPR, zero FPR). Scale bar a: 10 μm.

High-resolution localization of Kv4.2 subunit in the VPM nucleus of the thalamus

a, High-resolution light micrograph of a VPM neuron immunolabeled for the Kv4.2 subunit displaying intense immunopositive puncta (white arrows) along its proximal dendrites. b, An electron micrograph showing Kv4.2 immunolabeling in the VPM using the preembedding immunogold technique. A proximal dendrite, identified by its large diameter (d), has more silver intensified gold particles (white arrowheads) than thin dendrites (d2, d3). Arrows, synapses; arrowheads, puncta adhaerentia. c, Accumulation of gold particles in small dendritic appendages (asterisks). d, Quantitative analysis revealed an approximately three-fold higher density of gold particles along the membrane in large (>1.2 µm) compared to small dendrites (left y-axis, gray bars). The histogram also shows the ratio of large excitatory terminals with round vesicles (RL) innervating each dendritic category (right y-axis, white bars). e, Freeze-fracture replica labeling of the protoplasmic-face membrane segment of a large thalamocortical cell dendrite in VPM is shown with intense immunogold labeling for the Kv4.3 subunit. The dendrite is surrounded by a large axon terminal (yellow). Boxed areas are shown at higher magnifications in f, g, and h. f-h, Membrane area in the vicinity of the axon terminal contains a high density of gold particles (f), whereas a neighboring area (g) has very few gold particles, indicating an inhomogeneous distribution of the Kv4.3 subunit. Note the intense immunogold labeling around a cross-fractured dendritic appendage (h). Black arrows, synapses; black arrowheads, puncta adherentia. Scale bars: a: 10 μm, b: 1 μm, c: 0.5 μm, e, 1 µm, f-h, 200 nm.

Delineation of functionally relevant Kv4.2 ion channel clusters by Moran’s method

a, High magnification confocal image of Kv4.2 immunostaining in the VPM of mouse thalamus. b, Segmentation of Kv4.2 immunopositive objects by Moran’s (magenta outlines). c, Segmentation of immunonegative areas by Moran’s (white outlines). d, Confocal image of vGluT2 immunostaining (green channel) of the same section shown in a. e, Kv4.2 ion channel clusters which overlap with vGluT2-positive terminals (cyan outlines). f, Kv4.2 ion channel clusters which do not overlap with vGluT2-positive terminals (yellow outlines). Blue arrows, Kv4.2 clusters overlapping with vGluT2 terminals; yellow arrows, Kv4.2 clusters non-overlapping with vGluT2 terminals (holds for a-f). g, Histograms of the colocalizing and non-colacalizing Kv 4.2 immunopositive boutons pooled from three animals segmented by Moran’s method and binned by area (left) and intensity (right). Yellow bars, Kv4.2 objects non-overlapping with vGluT2; cyan bars, Kv4.2 objects overlapping with vGluT2. h, Scatterplot of area vs staining intensity from three different animals. Yellow dots, Kv4.2 objects non-overlapping with vGluT2; cyan dots, Kv4.2 objects overlapping with vGluT2. i, j Silver particles (black arrowheads) indicating Kv4.2 immunoreactivity are localized on dendritic appendages (asterisks) and dendritic shafts (d) contacted by vGluT2-positive terminals (b, DAB positive) in the VPM. The plasma membrane of the same dendrites that are not contacted by vGluT2 positive terminals (white arrowheads) contains very few particles for the Kv4.2 subunit. Scale bars: a-f: 5 μm i: 1 μm, j: 0.5 μm

Effect of threshold level on object detection.

a, High power confocal image of Kv4.2 immunostaining in the ventrobasal complex of the mouse thalamus. b-d, Segmented objects (purple) of the same picture at three different threshold levels. e-g, Number of objects (e, No), average area of selected objects (f) and average pixel intensity values of the selected objects (g). Note the large difference in every measure depending on the threshold level. Scale bar a: 5 μm.

Defining optimal Moran’s matrix

a, Sizes of convolution matrices with different order (1, 2, 3; orange squares around the central pixel) with artificial objects (white) of different sizes (4 and 8 pixels in diameter) used in Moran’s tests. b, Optimal order number in relation to the object size (4-64) at different noise levels. To determine the optimal Moran’s order, we examined the quality of detection of objects with variable object sizes (diameter 4-64 pixels) at different noise levels. The optimal order was plotted against the object size. The points were fitted on a line with a slope of approximately 0.25, independent of the noise level.

The effect of Moran’s order on the quality of detection using variable object sizes and different noise levels.

a, One image out of the 100 containing randomly placed artificial objects with diameters ranging from 4-64 pixels. b, The same image with added noise. c, Objects selected by Moran’s method with a 16th order convolution matrix. d, The same selection pseudocolored with red (true positive) and cyan (false positive). e, Similar objects were investigated at different noise levels and with different orders of Moran’s test. Note the increase of false positive rates at high noise levels and higher Moran’s order. Yellow and white arrows indicate small objects that became undetected at higher Moran’s order. f, Effect of matrix size on the quality of detection (in a TPR/FPR space) in images containing 100 objects with variable size at three different noise levels. g, Zoomed in version of the plot shown in f. Numbers indicate the matrix size.

Comparison of the vector length at various noise levels (20-240) from the theoretical best (0, 1 point in the TPR/FPR space) to the closest point of the TPR/FPR curve in case of the TBS and Moran’s methods using images containing randomly placed artificial objects with diameter ranging from 4-64 pixels. Blue: TBM, red: Moran’s method.

The bins of the x-axis (1-13) indicate different x-values for the two methods (see the table at the bottom) for comparisons. Threshold levels vary between 10-250 for TBS (blue bars), Moran’s orders between 1-64 (orange bars). Shorter vector length indicates better performance. Note that between 60 and 160 noise levels the exact value of Moran’s order does not affect the quality of detection and all Moran’s values are below the TBS values.

Definition of ground truth on natural images

a-c) Micrograph of fluorescently labeled Kv4.2 ion channel clusters with added noise (a, b, c, noise level 160, 80, 0, respectively) in the order in which they were presented to the human observes. d-f) Selection of objects by 23 observers who were blind to the nature in the same images. Gray pixels were selected by less than half of the participants (n=23), the pseudocolored pixels were selected by more than half and were referred as “ground truth” in this study. g-j) Selection of objects within the framed areas (magenta rectangles in a-c) by each of the 23 human observer. Each observer outlined first the noisiest image (g, rectangle in a), then the less noisy one (h, rectangle in b), finally the original input image (I, rectangle in c). Scale bar c: 10 μm.

Effect of convolution matrix size on the visual results.

Natural image (Kv4.2 immunoreactive boutons) at three different noise levels (0, 80, 160). The putative objects were detected with different convolution matrices (1st, 3rd, 10th order). The sizes of matrices are displayed on one of the boutons for the sake of comparison. Red: true positive pixels, cyan: false positive pixels. Scalebar 10 μm.