$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
Three-dimensional (3D) organoid culture has proven superior to two-dimensional (2D) cell culture in mimicking in vivo biology1,2. Organoids have become indispensable in cancer research for screening for effective treatments and for gaining insights into disease progression3,4,5,6. While it is well known in cancer biology that distinctions in morphology correlate with distinct biological behavior of cells and tissues, the field relies on traditional shape metrics that are limited in scope. This study describes a novel spatial algorithm that objectively quantifies subtle morphological features with unprecedented precision, surpassing traditional approaches such as area, volume, and surface area.
The linearized compressed polar coordinates (LCPC) transform was invented to objectively and quantitatively describe complex morphologies observed in tissue histopathology, with the aim of enhancing the grading of colon polyps7. The desire to then expand this approach to capture macroscopic MRI-based spatial features in brain pathologies, such as bipolar disorder and Alzheimer’s disease, led to augmentations that enhanced it even further. This study describes the step-by-step protocol and best practices for applying two versions of the LCPC transform: the parallel grid system and the radial grid system, both of which have open-source scripts and tutorial videos.
Aside from traditional geometric methods, there exist multiple abstractions that have been effective for measuring the complex shapes of cells and organs. These include measuring eccentricity, skewness, contrast, and kurtosis, along with Zernike moments for capturing circularity, asymmetry, edge irregularity, and global contour structure8,9,10. Fractal analysis has also been useful to reduce complex contours into scalar values, such as Fractal Dimension, which measures how irregular the contour is, and lacunarity, which measures how heterogeneously irregular gaps appear in the contour11,12. For measuring texture, the Gray Level Co-occurrence Matrix (GLCM) method is popular for measuring contrast, energy, homogeneity, correlation, and entropy13,14. While all of these methods are beneficial, none of them were designed to capture spatial context, such as the direction of gravity, left- vs. right-handedness, or the location of the central support structure that influences the direction of shape change. Furthermore, many of them produce a single scalar value or just a handful of scalar values to represent spatial information, which is why the cited studies often use them in combination to assess complex shapes.
The LCPC transform was designed to produce many features from one measurement and to allow the addition of spatial markers that encode spatial context into the shape, such as the direction of gravity. The closest method to the LCPC transform7 was published a year afterwards15, sharing the same core idea as a starting point: apply the Fourier transform to cell contours to measure shape in the form of a frequency spectrum. However, the LCPC transform was independently developed to be applied via distinct grid systems that were meant to be used in conjunction with knowledge of the spatial context outside of the shape being measured. Furthermore, the inventor of the LCPC transform explains in this manuscript that the resulting frequency spectrum contains vast amounts of hidden spatial information. Supplementary File 1 contains an extensive discussion of spatial contexts in biology that are often overlooked when using the cited methods and how the LCPC transform can be applied to capture this context. For readers whose shape data shows no difference between control vs. experimental groups, whether or not their eyes can see a difference in the shapes, or whose shape data shows very little difference, even though they suspect that there should be a bigger difference, they should try the LCPC transform.
The LCPC transform provides an unprecedented level of precision in measuring spatial information because it represents shapes in multiple dimensions. Unlike traditional methods, like area and volume, which yield only one scalar value per shape (i.e., 25 cm2), the results of the LCPC transform can yield multiple indices, each correlating with a different morphological aspect of a shape (i.e., roundness vs. sharpness of corners, smoothness vs. jaggedness of edges). The LCPC transform describes a 2D shape by overlaying a grid of straight lines that intersect its contour. Each grid system has an origin (Figure 1) or a baseline (Figure 2) from which to measure linear distance. Refer to Figures 1B and 2B for simplified flowcharts describing the algorithm. Every point of intersection between the gridlines and the shape's contour is detected. The distance of each intersection is then calculated relative to a baseline or origin. In this way, the LCPC transform converts 2D shapes into a series of consecutive x-y coordinate pairs. The x-coordinate represents the position of the gridline from zero to infinity, while the y-coordinate represents the distance of the intersection to the baseline or origin. In this form, which is a discrete sinusoid wave, the Fast Fourier transform (FFT) is then applied to convert the data from the “position domain” to the frequency domain. If the x-coordinate represented time, then the “position domain” would be equivalent to the “time domain” in the standard applications of the FFT.
While the radial grid system measures the distance of each intersection from the origin of the radial grid (Figure 1A), the parallel grid system always measures the distance of intersections with reference to an imaginary line at the left of the shape (Figure 2A). The open-source script determines the position of this imaginary line by finding the left-most pixel of the contour and then moving 10 pixels to the left of this position. Here, the x-coordinate of this position becomes the reference line from which all intersections are calculated. This 10-pixel rule is arbitrary, but it is why all contours analyzed by the open-source script for the parallel grid system must have at least 15 pixels of white space on all four sides.
For 2D shapes with folds or multiple layers, gridlines may intersect the contour more than once. In this case, the distances of all intersections along a gridline are summed to a single value. Thus, each gridline has only one x-coordinate and one y-coordinate. This summation is represented by the term “compressed” in the name LCPC transform. The rendering of a non-linear 2D shape into a discrete sinusoid wave is represented by the term “linearized” in the algorithm’s name. Lastly, the term “polar coordinates” is in the algorithm’s name because the first grid system conceptualized was a 180-degree radial grid of polar coordinates7. Even after realizing that polar and Cartesian coordinates are interchangeable, the algorithm's name was kept as is. The acknowledgments section describes the personal reasons that motivated the invention and augmentation of the LCPC transform.
Protocol 1 was the sequence for obtaining the data shown in Figure 3B, while Protocol 2 was the sequence for obtaining the data shown in Figure 3C–D. The steps in these protocols are implemented in individual Python scripts available in the GitHub repository “Pre-Processing-Tools-for-LCPC-Transform”16. Protocol 1 is an example of the pre-processing steps to derive “pure shape” in preparation for the LCPC transform. Protocol 2 is an example of pre-processing steps to measure shapes “at scale”, meaning at their original scales relative to each other.
Segmentation can be done manually in image processing software, such as Mac’s Preview or Microsoft’s Paint, or using threshold-based methods. If done manually, one of the following four colors should be chosen: blue, green, pink/magenta, or red. The GitHub repository called “Pre-Processing-Tools-for-LCPC-Transform”16 contains a folder called “color extraction scripts”. This folder contains four Jupyter Notebook files with Python code that extract the four aforementioned colors and convert them into blue masks on a white background. This process can also be performed by thresholding the outline color in an image processing software such as Fiji/ImageJ. For images that contain contours with touching borders or overlapping edges (e.g., a Venn Diagram), they will need to be separated using image processing software, so that they become independent objects in the composite mask image containing multiple organoid contours. This does not apply to images that contain only one organoid or multiple organoids that don’t touch each other.