Sometimes when imaging we purposely leave space between spots to save time or maybe there is a gap in your image from an instrument glitch. In either case, the cell space image will contain regions of null data, and often we would like to replace those missing parts to make a better looking image. Read on to find out more about how you can do just that with iolite’s (v4.5.2+) new Replace Null imaging filter.
How it works
Consider the following matrix of dots (not to be confused with an image!) where the red dots represent good data and the black circle represents a missing or null bit of data in the image’s matrix.
There are, of course, a number of ways we might calculate the values for our missing dot. The simple approach taken by this filter is to consider a shape surrounding the missing data and use the non-null data in that region to compute the value, but how large should the region be? What shape should it be? How should the value be calculated? How do we handle edge cases? All of these things can be controlled by the user in the filter’s settings widget shown below.
- Method This controls whether the value will be computed as a mean, median, or weighted mean.
- Shape This controls the shape of the region around the null data to be used in the calculation, currently one of: circle, square, or diamond.
- X, Y These parameters control the size of the region in pixels (so be mindful of your pixels per spot size). In the dot images above, the region would have X = 3 and Y = 5.
- Replace finite? This controls whether finite data will also be replace, effectively smoothing the entire thing.
- Only surrounded? This controls whether to replace null data only when it is surrounded by good data. To be considered as surrounded the region must not have any completely null halves. In the right dot image above, the right half of the region is completely null, and therefore this data point would not be replaced.
Now let’s consider some examples!
Missing line
The first example we will consider is that of a missing line of data. Shown below is a series of images with no filter on the left, and the null replacement filter with “only surrounded” off and on in the middle and right, respectively.
This sequence demonstrates how by replacing null data that is not surrounded we grow our image by filling in the data around the perimeter. By limiting our filter to only replace surrounded data we achieve the desired effect. For this example, I wanted to use the data above and below the missing line so I used X=1 and Y slightly greater than the pixels per spot.
Grid of spots
Next we will look at an example where a series of spots were patterned over an area. If we were to image this dataset in cell space without filtering, it looks as shown below on the left.
In this case, I played around with the settings quite a bit and ended up using a region a bit more than 2x the pixels per spot with a weighted mean.
And that’s it!
Click here to discuss.