ColocZStats: a z-stack signal colocalization extension tool for 3D slicer

Confocal microscopy has evolved to be a widely adopted imaging technique in molecular biology and is frequently utilized to achieve accurate subcellular localization of proteins. Applying colocalization analysis on image z-stacks obtained from confocal fluorescence microscopes is a dependable method of revealing the relationship between different molecules. In addition, despite the established advantages and growing adoption of 3D visualization software in various microscopy research domains, there have been few systems that can support colocalization analysis within a user-specified region of interest (ROI). In this context, several broadly employed biological image visualization platforms are meticulously explored in this study to understand the current landscape. It has been observed that while these applications can generate three-dimensional (3D) reconstructions for z-stacks, and in some cases transfer them into an immersive virtual reality (VR) scene, there is still little support for performing quantitative colocalization analysis on such images based on a user-defined ROI and thresholding levels. To address these issues, an extension called ColocZStats (pronounced Coloc-Zee-Stats) has been developed for 3D Slicer, a widely used free and open-source software package for image analysis and scientific visualization. With a custom-designed user-friendly interface, ColocZStats allows investigators to conduct intensity thresholding and ROI selection on imported 3D image stacks. It can deliver several essential colocalization metrics for structures of interest and produce reports in the form of diagrams and spreadsheets.


DESCRIPTION OF MRML FILES
All loaded data in 3D Slicer can be stored in a data repository called the 'MRML scene' (MRML stands for 'Medical Reality Modeling Language').All those graphical representations and statistical coefficients generated by ColocZStats, as shown in sections 4.6 and 4.8 of the article, can be obtained by loading corresponding files with the '.mrml' file extension into the current stable version of 3D Slicer (V5.6.2).In the supplementary materials, there are three folders containing MRML files, each of which is archived within a separate zip file.
Specifically, the MRML file stored in 'Scenario 1.zip' can be utilized to generate all result illustrations and statistical coefficients corresponding to section 4.6 in the article.The MRML files saved in 'Scenario 2.zip' can be used to produce the relevant illustrations presented in the first two rows of Figure 8 in Section 4.8.The MRML files saved in 'Scenario 3.zip' can be used to produce the relevant illustrations presented in the last two rows of Figure 8 in Section 4.8.
Additionally, an example results spreadsheet (Sample Image Stack Statistics.xlsx) is included in the supplementary materials, and Figure S1 showcases all of its sub-sheets.Among them, Figure S1D displays some crucial information related to the defined ROI.The information is automatically and selectively extracted from a JSON file containing all details of the ROI node, and the JSON file is for reloading the ROI box.By invoking the 3D Slicer's built-in exporting method for such JSON files in ColocZStats' background process, the JSON file will also be automatically saved after each calculation.Notably, the JSON file can also be saved as one of the batch files produced by clicking the 'SAVE' button of 3D Slicer.All the files included in scenario zips are the batch files generated this way, and the MRML files refer to all the other batch files in their respective folder for reloading operation scenarios.
Moreover, the generated 2D histograms will be automatically saved as static images and as corresponding HTML files, which include several interactive options for viewers to examine the data in greater detail.As shown in Figure S2, viewers can select the 'magnifier' option on the right to zoom into the 2D histogram iteratively, getting to an ever closer look at the data, and this may reveal items with different values (and correspondingly different colors) after zooming in.
The example HTML file has been saved in an individual zip file (Sample 2D Histogram HTML.zip) and is provided in the supplementary materials, whereas the sample image z-stack and scenario files can be found at the Zenodo repository 10.5281/zenodo.13219935

STEPS TO LOAD MRML FILES
Before loading any MRML files into 3D Slicer 5.6.2, a necessary step is installing ColocZStats.For detailed instructions on how to install ColocZStats, please see its repository homepage on GitHub.
Taking 'Scenario 1.zip' as an example, please follow the steps below to load the MRML files: 1.Unzip 'Scenario 1.zip' to get a folder with the same name.2.Please follow the numerical order as indicated in Figure S3 to load the 'Scenario 1.mrml' file from the folder obtained in the first step into the scene.
Upon loading any unzipped MRML files into 3D Slicer, all of its corresponding GUI elements and volume renderings will appear.Following this, please use the control panel of ColocZStats to select the channels and threshold ranges to be analyzed.Then, click the 'Compute Colocalization' button to generate the corresponding Venn diagrams, 2D histograms, and coefficient results described in the article's respective sections.Simultaneously, all the generated diagrams and results spreadsheet will be automatically saved to the 'Default scene location' of 3D Slicer.Figure S4 illustrates how to specify the 'Default scene location' in 3D Slicer.By default, the 'Default scene location' is the installation location of 3D Slicer.

COMPUTER REQUIREMENTS AND PERFORMANCE ANALYSIS
ColocZStats can be used with a variety of computer systems.To illustrate the performance under different computer systems, we selected a portable platform (laptop) and a desktop platform.Then, we selected several image stacks of different sizes to evaluate the computation time under both platforms.
The configuration details of the two computer systems we used are summarized in table S3.
We first selected six image stacks of different sizes for the test of computation time.Subsequently, we installed the same version of 3D Slicer and ColocZStats on the two computer systems.Each stack was Table S3.Configuration Details Summary then sequentially imported into ColocZStats on each device.Following this, we recorded the computation time for each stack in ColocZStats on each device for all possible channel selection cases.Notably, these stacks each contain at least three channels.For stack, four channel selection cases are included in this description for demonstration purposes: Channel 1&2&3 selected; Channel 1&2 selected; Channel 1&3 selected; and Channel 2&3 selected.As a result, four corresponding line charts were generated.Additionally, for each channel selection case, all stacks were analyzed entirely under the full threshold ranges of their selected channels.Figure S5 illustrates the resulting line charts showing the computation times for analyzing all test stacks on each device with each channel selection case.The above tests show that the computation time may vary depending on the size of the loaded image stack, the number of voxels within the ROI box, or the specific computer configuration.For stacks within 1GB in size, when the entire stack is selected and the threshold ranges for each channel are set to the full range, obtaining all result illustration diagrams and spreadsheets generally takes a few seconds to a few minutes.All the test z-stacks used here can be found at the same Zenodo repository 10.5281/zenodo.13219935.

Figure S1 .Figure S2 .Figure S3 .Figure S5 .
Figure S1.All of the sub-sheets in each spreadsheet result from each single computation.(A) The selected channels and their respective threshold ranges.(B) The timestamp of this computation.(C) The custom annotation for the specified image stack.(D) The related information of the defined ROI for this computation.(E) The PCCs for all possible pairwise combinations of the selected channels.(F) All the resulting intersection coefficients.(G) All the resulting 2D histograms, with each histogram illustrating a pair of channels.(H) The resulting illustration embedded with the Venn diagram and all coefficient results.

Table S2 .
Metadata Information of Stacks in the Article