5. Custom masks explained
The mask feature is optional. It allows the application of masks to define which parts of the sections to include in the analysis. The mask is applied in addition to, and not instead of, the reference atlas maps. This is useful for investigating expression differences in the right and left hemisphere as a mask can be applied to differentiate the two sides. It is also useful for defining areas to exclude from the analysis (for example, in the case of hemibrain sections).
Create binary masks (black and white) in PNG format with an application such as QuickMask, NIH ImageJ, Adobe Photoshop or GIMP. These should have the same proportions as the segmentations but are typically smaller in size.
QuickMask is a desktop tool for automatically generating masks to differentiate the right and left hemisphere based on a QuickNII or VisuAlign registration. Peliminary versions of the QuickMask tool are available for download on the respective NITRC pages for the tools.
To use the mask feature, select “yes”. This brings up a “custom mask folder” and “Custom mask colour” option.
Name these with the unique ID for the section and a “_mask” extension. File name example: Bxb_hgt_s002_mask
Navigate to this folder containing the masks.
Click on the field for the “Custom mask colour”. Select the colour in the mask that corresponds to the ROI to include in the analysis. For example, for an analysis of the left hand side of an image with the mask shown here, specify black (RGB code: 0,0,0).
5.1. QuickMask application
QuickMask is a simple tool for generating masks that are compatible with the Nutil software.
There are two versions of QuickMask. They work in the same way.
QuickMask: generates masks that reflect the linear registration performed with QuickNII (download on the nitrc page for QuickNII).
QuickMask-NL: generates masks that reflect the nonlinear adjustments applied with VisuAlign (download on the nitrc page for VisuAlign).
Open the QuickMask tool.
Use the “pick JSON” button to navigate to the QuickNII JSON or VisuAlign JSON for your image series (the file that contains the registration information).
For left-right hemisphere masks, enter the following X, Y and Z coordinated in QuickMaskNL.
Top left: 227, 32.2, 292.8. Top right: 227, 367.9, 291.8 Bottom left: 227, 34.5, 48.7
Alternatively, enter the following coordinate string in the box at the bottom of the interface: 227 32.2 292.8 227 367.9 291.8 227 34.5 48.7
Use the “Destination” button to navigate to the folder where you want your masks to be saved.
Press Go. The masks are automatically generated for all the section images in the series. The masks have the original image file name with a _mask extension.