Background
Quantitative analyses are needed in order to interrogate the mechanisms of mitochondrial transfer. While 2D mitochondrial transfer is quantified using flow cytometry, 3D (in situ) mitochondrial transfer is analyzed using confocal microscopy. The analysis and quantification of these micrographs is time consuming if done by hand. Therefore, it would be advantageous to automate the process as much as possible while still allowing for human interaction.
Aim
Develop an interactive Python code that processes 3D images of mitochondrial transfer and aids visualization of where mitochondrial transfer may occur.
Methods
The main difficulty of this task was my lack of prior experience - I had never coded in Python before! Therefore, I decided to spend the beginning portion of the semester learning the language before tackling the complexities of processing 3D images. Learning was done in three stages - familiarizing with the basic syntax of the language, performing 2D image processing tasks (a vital prerequisite for 3D image processing), and studying the documentation of relevant 3D image Python modules. Eventually, I performed several tasks that aided visualization of mitochondrial transfer.
Task 1 - 3D Cell Segmentation
Segmentation is a technique which denotes each object as a distinct “segment” of an image. This is important because segmentation allows the user to differentiate between areas that are inside and outside of cells, which can then be used to determine if mitochondrial transfer is happening. Segmentation improves processing time since the code only needs to analyze the important parts of an image; the rest can be removed from consideration.
I used the Voronoi-Otsu labeling algorithm because it works equally well in 2D and 3D. Additionally, it can still detect cells in areas with higher noise and lower quality. The end result was distinct color labels being assigned to each individual cell.
Voronoi-Otsu labeling applied to a 3D image of mitochondrial transfer. The top row is a screenshot of the process at z = 0, while the bottom row corresponds to z = 5. The left column represents the original image, the middle column represents the Voronoi-Otsu labels, and the right column represents contour detection corresponding to the labels.
Task 2 - 3D Viewer
The next task was to create a 3D viewer that would aid hand-counting of mitochondrial transfer events caused by IL-1β treatment. The goal was to process a single input image of mitochondrial transfer and produce two output images. Output Image 1 would be a binary thresholded image of the red channel (stained mitochondria). This helps the user to observe the positions of every mitochondria in the image. Meanwhile, Output Image 2 would be the original image with a slightly altered colormap - the green channel (stained chondrocytes) would be converted to gray to increase the contrast of the red mitochondria. This helps the viewer contextualize the positions of the mitochondria in relation to the chondrocytes. Together, these images help the user determine whether mitochondrial transfer is occurring or not.
Example input image of mitochondrial transfer. Mitochondria are stained red and chondrocytes are stained green.
Output images corresponding to the example input image. Output Image 1 (left) is a thresholded, binary image corresponding to the red channel of the input image. Output Image 2 (right) is the input image with the green channel converted to gray.
Task 3 - MSC Removal
The biggest flaw of the 3D viewer from the previous section was that it failed to differentiate between mitochondria inside mesenchymal stem cells (MSC) and mitochondria outside MSCs. Mitochondria inside MSCs are not transfer events. Hence, eliminating those mitochondria from consideration allows for faster detection of mitochondrial transfer because less data needs to be analyzed.
MSCs are large, continuous expanses of red pixels (mitochondria) that are far bigger than any potential mitochondrial transfer event. Hence, MSC can be removed from an image on the basis of size by modifying noise removal functions to do eliminate objects above a certain size limit.
The code processes an input image of mitochondrial transfer and produces two output images. Output Image 1 would be a binary thresholded image of the red channel (mitochondria) with objects above a certain size (MSC) being removed. This would allow the viewer to see the position of every mitochondrion except MSC. Output Image 2 would be a segmented version of the red channel with each detected object given a distinct Voronoi-Otsu color label. This was done to confirm the accuracy of Output Image 1, as the viewer could use Output Image 2 to directly compare which objects were being kept or removed.
Example input image of mitochondrial transfer.
Output images corresponding to the example input image. Output Image 1 (left) is a thresholded, binary image with any object larger than 5 pixels being removed. Output Image 2 (right) is the segmented input image with Voronoi-Otsu labels.
Conclusion
The development of mitochondrial transfer visualization code led to enormous personal growth as a coder. It was incredibly rewarding to iteratively improve programs to be more accurate and more efficient as skill level increased. In spite of limited background knowledge with Python, complex image processing tasks were able to be executed with confidence by the end of the semester.