Image filters
Purpose
|
Image filters can help you get more information from your microscopy image through a variety of methods, such as reducing background, enhancing signal or reducing out of focus signal, sharpening edges, filling in small gaps, and other techniques. |
The image filters can also be batch-applied to many images at once using the Image Filtering function in the Batch Filter tool (available on the Image ribbon).
Procedures
Applying image filters
-
If you have already created a filter sequence you wish to use, see Using filter sequences.
-
If you have not created or do not want to use a filter sequence, follow the steps below:
-
Open the image that you want filter.
-
If you have more than one image open, select the image that you want filter by clicking it in the Image organizer; the selected image will have a blue highlight. The filter will operate on the selected image.
-
To filter several images or more, you may want to determine appropriate filter settings on one or a few images here, then use the Image Filtering function in the Batch Filter tool to filter multiple images with your preferred settings.
-
-
Click Image Filters on the Image ribbon to open the Image Filters window. -
Select the desired filter and adjust filter settings:
-
Select New Filter: Select the desired filter from the dropdown menu.
-
Channels: Check the boxes next to all the channels you want to include in the filtering operation.
All filter settings are channel specific and need to be adjusted for each channel individually.
-
Click on a channel to select it; the channel will be highlighted in blue.
-
(Filter) Settings: If desired, adjust the filter settings for the selected channel. Note that each filter has unique filter settings.
-
Click
-
Click to start the filtering operation and see the results for the current settings for the selected channel.
-
Repeat steps d-f until desired settings are reached for a selected channel.
-
Repeat steps c-f for each channel to be filtered.
-
-
(optional) Select another filter from the Select New Filter dropdown menu and repeat steps 3b-3h.
-
Filters in the Applied Filters list will appear in the order in which the filter operations occur. Some filters need to be applied before others. If you have applied some filters, then add a filter that needs to be applied in between the others, BrightSLICE will revert the image back to its original state and then apply the filters in the required order with previously saved settings.
-
To delete a filter, click the in the Delete column of the Applied Filters list, then click to revert the image.
After applying all desired filters you can save a Filter Sequence enabling you to quickly apply the same filter(s) with the same settings to other images. See Using filter sequences
-
-
or
To save the filtered version of the image, go to File > Save As and click Image or Image Stack, depending on if you want to save a single plane image, a single plane of a multiple-plane image, or an image stack (all planes in a multiple-plane image).Change the filename and/or the file location in the Save As dialog to avoid overwriting the original image file.
The Destriping filter is a beta version and has a different procedure. See Destriping filter procedure (beta)
Using filter sequences (optional)
You can create and save a filter, or set of filters, as a sequence. This enables you to quickly apply the same filter(s) with the same settings to other images.
Creating a filter sequence
-
Follow the Applying image filters protocol above.
-
Once you have added all desired filters and saved their filter settings:
-
Type a name into the Sequence Name text box.
-
Click
-
Applying a filter sequence
To apply a filter sequence to an image that is selected in the Image Organizer:
-
Select the desired sequence from the Select Sequence dropdown menu.
-
Click to add the sequence to the Applied Filters list.
-
To see which filters and settings are included in the selected sequence before opening it, click the ellipses to open the Filter Sequence Details window.
-
If a filter(s) was open in the Applied Filters list, the sequence filter(s) will appear in addition to the filter(s) already populating the list.
-
To remove any unwanted filters from the Applied Filters list, click the in the Delete column.
-
-
Click
-
Click to start the filtering operation and see the results for the current filters and settings.
Deleting a filter sequence
-
Select the desired sequence from the Select Sequence dropdown menu.
-
Click
Filter sequence commands
-
Click to save a new filter sequence.
-
Click to delete a selected sequence.
-
Click to open a selected sequence.
-
Click to see which filters and settings are included in a selected sequence before opening it.
Previewing and comparing different image filter settings using virtual copies
In the Image Organizer, click
Copy to create a virtual copy of a selected image to use as a preview for image filters and/or image histogram adjustments. This enables you to view original and adjusted images side by side, or toggle the visibility between the two if they are in the same XY location. Once you are satisfied with the changes to the virtual copy, you can save it as a new image. This ensures you always have the original image available as a reference and reduces any chance the original image will be overwritten.
Destriping filter procedure (beta)
The Destriping filter and its procedure are beta versions; they are currently being improved and updated. Destriping cannot be included in a filter sequence at this time.
-
Open the image that you want filter.
-
Click Image Filters on the Image ribbon to open the Image Filters window. -
Click in the Beta Filters area at the bottom of the Image Filters window. This opens the Image Destriping dialog.
The first time you select you will be prompted to install the MBF Python Toolkit. This is required to run the Destriping filter.
Note that a Python command window will open on the desktop. This window must remain open during the entire Destriping Filter operation.
-
In the Color channels section of the Image Destriping window, check the box(es) to indicate which color channel(s) you want to include in the filtering operation.
-
Select the Settings you wish to use.
-
In the Parameters area of Image Destriping window, select Horizontal or Vertical from the Direction dropdown menu to match the orientation of the streak artifacts to be removed.
-
Adjust all other Parameters as desired. We recommend using default settings.
-
Click to train a destriping model for the checked channels using the current parameters.
-
Click to apply the trained model to the image and produce a destriped copy. The button relabels to while running so the operation can be canceled.
This command is disabled until the Build Model operation is complete.
-
Click to save the destriped result.
This command is disabled until the Apply operation is complete.
Image-filter descriptions and options
Hot Pixel Removal
Minimizes the appearance of hot (abnormally bright) pixels in images. Hot pixels are distinctive because they appear at the same XY position in every z-plane.
Color Channel
The color channel(s) detected in the image are listed in the Filter Settings section of the Image Filters window.
All filter settings are channel specific and need to be adjusted for each channel individually.
-
Check the boxes to indicate which color channels you want to include in the filtering operation.
-
Click on a channel to select it (blue shading indicates the selected color channel).
-
Adjust settings for the selected channel.
Settings
Use the sliders or type a value into the adjacent box to specify the following settings:
-
Kernel radius (px): Use the slider to choose a radius for the survey area used to identify hot pixels.
-
Threshold factor: Use the slider to choose the factor of estimated image noise. Any pixel with a signal above this threshold value is identified as a hot pixel.
Commands
-
Click to save adjustments to settings.
-
Click to apply the filter to the image.
Outside Eraser
Removes fluorescent objects from the image that are external to the image volume (e.g., contaminants in the media) by finding the boundary between the tissue and the area outside the tissue.
Color Channel
The color channel(s) detected in the image are listed in the Filter Settings section of the Image Filters window.
All filter settings are channel specific and need to be adjusted for each channel individually.
-
Check the boxes to indicate which color channels you want to include in the filtering operation.
-
Click on a channel to select it (blue shading indicates the selected color channel).
-
Adjust settings for the selected channel.
Settings
Use the sliders or type a value into the adjacent box to specify the following settings:
-
Edge scale (µm): Adjust the slider to set the scale for the tissue edges in the image. This value will typically be the 100-300 µm range. Higher values will smooth over finer coves and peninsulas along the tissue boundary.
-
Threshold: Adjust the slider to set the threshold for separation between foreground and background signal intensities; increase the threshold to remove more background.
-
Erosion radius (µm): Use the slider to increase/decrease the amount of edge tissue that will be erased.
-
Outside value: Use the slider to the adjust pixel intensity that will replace the outside area. A value of 0 will create a black outside area. It can be helpful to use a higher value to help visualize where the tissue boundary is while adjusting settings and then set it to 0 after you have finalized other setting values.
-
Segmentation channel: Select the channel that the boundary will be found in. This should be the channel with the densest label. The boundary found in this channel will then be applied to the channels selected for filtering.
Commands
-
Click to save adjustments to settings.
-
Click to apply the filter to the image.
Illumination Correction
Minimizes unexpected counterstain unevenness in fluorescence images caused by tiling artifacts, uneven illumination, and non-uniform staining. This tool is designed for use in color channels with dense fluorescence signals, for example from counterstains like DAPI and fluorescent Nissl that are used for visualization of cytoarchitecture.
How it works: Illumination correction analyzes the variation of fluorescence intensity across the image, then boosts the intensity in dimmer regions and reduces the intensity in brighter regions to make the illumination more uniform.
Illumination correction is designed for fluorescence images; applying this command to other types of images is likely to yield poor results. This command is CPU-intensive.
Color Channel
The color channel(s) detected in the image are listed in the Filter Settings section of the Image Filters window.
All filter settings are channel specific and need to be adjusted for each channel individually.
-
Check the boxes to indicate which color channels you want to include in the filtering operation.
-
Click on a channel to select it (blue shading indicates the selected color channel).
-
Adjust settings for the selected channel.
Settings
Use the sliders or type a value into the adjacent box to specify the following settings:
- Scale slider (Min to Max): Move the slider to control the amount of illumination correction applied to the selected color channel. You can see the results if the Preview checkbox is checked.
-
Blend in dark regions: Click the checkbox to smoothly transition between regions where the illumination is corrected and where it has not been corrected. This may enhance your results for images that contain very dim regions (dark regions) that fall below the minimum fluorescence intensity that is corrected using the illumination correction tool.
Commands
-
Click to save adjustments to settings.
-
Click to apply the filter to the image.
Background Subtraction
Minimizes background in images by estimating and removing background illumination using an adaptive, local adjustment of image contrast.
Note that, in addition to removing background in individual images, this filter can also reduce tiling artifacts seen in large image montages if it is applied to the individual tiles before assembly.
Color Channel
The color channel(s) detected in the image are listed in the Filter Settings section of the Image Filters window.
All filter settings are channel specific and need to be adjusted for each channel individually.
-
Check the boxes to indicate which color channels you want to include in the filtering operation.
-
Click on a channel to select it (blue shading indicates the selected color channel).
-
Adjust settings for the selected channel.
Settings
Use the sliders or type a value into the adjacent box to specify the following settings:
-
Diameter (µm): The physical scale of the foreground objects to preserve. In most cases, this value should be larger than the size of the objects you want to visualize. If this parameter is set too low (small), the centers of larger objects may be removed. If it is set too high, the filtering may not have the desired impact on image quality.
Commands
-
Click to save adjustments to settings.
-
Click to apply the filter to the image.
Tone Mapping
Enhances the visualization of details in both bright and dark regions of the image.
Tone mapping applies local contrast adjustments that make it easier to visualize details in both bright and dark regions of an image simultaneously. It can be useful for exploring large images that exhibit a very high dynamic range between the brightest and darkest parts of the image.
The filter is appropriate for use with bit-depth images (10-bit or greater).
How it works: Tone mapping separates images into a base layer that encodes the large-scale intensity variations and a detail layer that encodes small-scale details. Contrast adjustments are made to the base layer to smooth the large intensity changes, and the result is recombined with the detail layer.
Color Channel
The color channel(s) detected in the image are listed in the Filter Settings section of the Image Filters window.
All filter settings are channel specific and need to be adjusted for each channel individually.
-
Check the boxes to indicate which color channels you want to include in the filtering operation.
-
Click on a channel to select it (blue shading indicates the selected color channel).
-
Adjust settings for the selected channel.
-
Tone mapping can be applied to one or more channels of the image. One common use is to better visualize neurons in tract-tracing experiments where the injection site is very bright compared to the regions of the brain to which the neurons project. In this case, tone mapping could be applied to the color channels used for tract tracing, but not applied to the color channel that labels cytoarchitecture.
Settings
Use the sliders or type a value into the adjacent box to specify the following settings:
-
Spatial scale: The scale at which base-layer smoothing in the spatial domain operates. This should typically be set several times larger than the diameter of the smallest objects visible in the image.
-
Range scale: Set the dynamic-range difference between details in the image to be preserved and background; this affects the base layer. Smaller values help preserve details in local regions with large variations in intensity, but may result in preservation of noise. Setting the value larger will smooth across regions with greater intensity differences, but if set too high may not preserve small or relatively dim details.
-
Contrast : Controls how much of the base-layer dynamic range is preserved. A value of 1 will make no change to the image, preserving more of the details in the original image. Setting a value of 0 will remove all large-scale intensity variation leaving only details behind and revealing more details in darker regions.
-
Rescale dynamic range: Check the box to rescale the intensities in the filtered image to match the dynamic range of the original image. This helps you visualize the result of tone mapping without having to readjust the global contrast controls using the Image adjustment .
Commands
-
Click to save adjustments to settings.
-
Click to apply the filter to the image.
Sharpen Image (Unsharp mask)
Reduces edge blurriness by enhancing edges using the unsharp mask technique.
Notes: Sharpening enhances edges in images using a local adjustment of image contrast. Sharpening can enhance image noise, we recommend applying minimal image sharpening to avoid this.
Changes in image appearance after sharpening are subtle; you may have to zoom in to see the changes.
With RGB images, you must ungroup color channels in the Image Adjustment Panel before applying the filter.
Color Channel
The color channel(s) detected in the image are listed in the Filter Settings section of the Image Filters window.
All filter settings are channel specific and need to be adjusted for each channel individually.
-
Check the boxes to indicate which color channels you want to include in the filtering operation.
-
Click on a channel to select it (blue shading indicates the selected color channel).
-
Adjust settings for the selected channel.
Settings
Use the sliders or type a value into the adjacent box to specify the following settings:
-
Scale (µm): The size of the edges to sharpen. For most images, we suggest starting with 1–2 µm.
-
Amount (%): The magnitude of the image-contrast adjustment.
Scale and Amount settings affect each other; reducing one generally makes it possible to increase the other.
-
Threshold levels: The minimum difference between adjacent brightness levels needed for the filter to make an adjustment. The threshold setting can help you avoid sharpening weak edges and making smooth areas appear speckled.
Commands
-
Click to save adjustments to settings.
-
Click to apply the filter to the image.
Destriping
Reduces stripes created by structures in the light path that absorb or scatter light and cast dark or bright streaks through the image.
How it works: In light sheet microscopy, the illuminating light sheet travels sideways through the sample before reaching each imaging plane. Structures in the light path absorb or scatter light and cast dark or bright streaks running the length of the illumination axis through the image. Destriping, trains a small neural network that recognizes this directional streak pattern in frequency space and removes it while preserving genuine tissue structure. This filter provides controls for training and applying the destriping neural networks.
Color channel
The color channel(s) detected in the image are listed in the Color channels section of the Image Destriping window.
-
Check the box(es) to indicate which color channel(s) you want to include in the filtering operation.
Parameters
-
Direction: Select Horizontal or Vertical from the dropdown menu to match the orientation of the streak artifacts to be removed.
-
Wedge angle (deg): Angular width of the frequency-domain wedge treated as stripe content. Larger values catch more off-axis streaking but may remove real structure.
-
Pooling kernel: Size of the max-pooling kernel used to isolate stripe structure from the image before filtering.
-
Guided filter kernel: Kernel size for the guided filter that reconstructs the final full-resolution image. This controls the balance between detail preservation and the smoothing of artifact edges.
We recommend using the default values for the following parameters:
-
Slice count per stack: Number of representative z-slices sampled from the stack to build the training set.
-
Epoch per slice: Number of training passes run on each sampled slice within a batch.
-
Batch epoch count: Number of weight-update steps performed per training batch.
-
Batch count: Number of separate training batches (each with a fresh slice sample) run when building the model.
-
Training sample: Strategy used to select training slices and regions.
Settings
-
X,Y resolution: Select the desired image-pyramid level (e.g. 1/2 scale) to use for training and processing. You will want to balance desired image quality with operation time and image file size. A lower resolution may decrease image quality but will increase the speed of the operation and produce a smaller image file.
Note that running the destriping filter at full resolution can take a long time. Therefore, the default X,Y resolution setting is 1/2.
-
Current plane: Check the box to perform destriping on the single image plane currently visible in the main window.
Commands
-
Click to train a destriping model for the checked channels using the current parameters.
-
Click to apply the trained model to the image and produce a destriped copy. The button relabels to while running so it can be canceled.
This command is disabled until the Build Model operation is complete.
-
Click to save the destriped result.
This command is disabled until the Apply operation is complete.
-
Click to close the dialog without applying the filter.