• Advanced Photonics Nexus
  • Vol. 4, Issue 3, 037001 (2025)
Radu Hristu1, Farzad Fereidouni2, Stefan G. Stanciu1,3, Lucian G. Eftimie4,5..., Oana C. Voinea6,7, Danielis Rutkauskas8, Laura Sironi9, Giuseppe Chirico9, Denis E. Tranca1, Remus R. Glogojeanu5, Alberto Diaspro10,11 and George A. Stanciu1,*|Show fewer author(s)
Author Affiliations
  • 1National University of Science and Technology Politehnica Bucharest, Center for Microscopy-Microanalysis and Information Processing, Bucharest, Romania
  • 2Emory University School of Medicine, Department of Pathology and Laboratory Medicine, Atlanta, Georgia, United States
  • 3National University of Science and Technology Politehnica Bucharest, CAMPUS Research Institute, Bucharest, Romania
  • 4Central Military Emergency University Hospital “Dr. Carol Davila”, Department of Pathology, Bucharest, Romania
  • 5National University of Physical Education and Sports, Faculty of Physical Therapy, Bucharest, Romania
  • 6Cantacuzino National Medical-Military Institute for Research and Development, Bucharest, Romania
  • 7“Carol Davila” University of Medicine and Pharmacy, Pathology Department, Faculty of Medicine, Bucharest, Romania
  • 8Center for Physical Sciences and Technology, Vilnius, Lithuania
  • 9Università Degli Studi di Milano-Bicocca, Physics Department, Milan, Italy
  • 10Istituto Italiano di Tecnologia, Nanoscopy and NIC@IIT, Genoa, Italy
  • 11University of Genoa, Department of Physics, Genoa, Italy
  • show less
    DOI: 10.1117/1.APN.4.3.037001 Cite this Article Set citation alerts
    Radu Hristu, Farzad Fereidouni, Stefan G. Stanciu, Lucian G. Eftimie, Oana C. Voinea, Danielis Rutkauskas, Laura Sironi, Giuseppe Chirico, Denis E. Tranca, Remus R. Glogojeanu, Alberto Diaspro, George A. Stanciu, "CollagenFitJ, a FIJI plugin for the quantification of collagen in polarization-resolved second harmonic generation image sets," Adv. Photon. Nexus 4, 037001 (2025) Copy Citation Text show less

    Abstract

    Collagen characterization is crucial for disease diagnostics, prevention, and understanding, with growing focus on quantitative analysis at tissue and fibril levels. Numerous models have been developed to quantify structural changes in collagen linked to various pathologies. However, many approaches remain limited to conceptual descriptions or rely on custom software, often requiring programming skills, which restricts their clinical application and potential impact. We introduce CollagenFitJ, a plugin for the open-source software platform ImageJ/FIJI, which represents a widely used microscopy image analysis tool. CollagenFitJ makes use of the cylindrical symmetry model for collagen to enable facile quantitative assessment of polarization-resolved second harmonic generation microscopy image stacks. The plugin’s main outputs are collagen structure-related maps (e.g., orientation and anisotropy of collagen fibrils within the focal volume), which can be accompanied by distribution and randomness maps for a series of structure-related parameters. We describe and validate the use of CollagenFitJ on images acquired on rat-tail tendons, collagen capsules surrounding human thyroid nodules, and mouse colon tumors, using both scanning and widefield second harmonic generation microscopy datasets. The plugin was designed to be user-friendly, requiring little to no experience in image processing and coding to facilitate access for life scientists, medical staff, and microscopy practitioners with limited coding skills or time availability required for coding.

    1 Introduction

    Collagen is the most abundant protein in the human body and the main component of the extracellular matrix,1 playing essential structural2 and regulatory roles3,4 in tissue organization, development, and disease. Given its importance, various imaging techniques have been employed to assess collagen structure and behavior. Although the usefulness of non-optical methods for collagen assessment (e.g., ultrasound imaging,5 magnetic resonance imaging,6 and positron emission tomography7) cannot be disputed, optical methods are typically non-ionizing and safer than other medical imaging approaches and offer the best spatiotemporal resolution for non-invasive imaging of collagen.

    Among the optical imaging methods, second harmonic generation (SHG) microscopy, has emerged as a powerful, label-free method for visualizing fibrillar collagen, with polarization-resolved SHG (PSHG) microscopy enabling quantitative characterization of collagen microstructure. SHG imaging operates on the principle that when a high-intensity laser pulse illuminates a non-centrosymmetric structure, two incident photons combine to generate a new photon with exactly twice the energy of each original photon. With SHG microscopy variants based on laser beam scanning being already established as powerful biomedical imaging methods,813 widefield SHG microscopy is currently gaining momentum in achieving similar popularity.14,15 By analyzing polarization-dependent SHG image stacks,8,16 PSHG microscopy provides insights into fibril orientation1719 and anisotropy,2022 facilitating the study of collagen remodeling in pathological conditions such as fibrosis,23 cancers (e.g., thyroid,24 ovarian,25 breast,26 and lung27), and connective tissue disorders.8

    Although PSHG microscopy offers valuable structural information, extracting quantitative parameters from PSHG image sets requires theoretical models for collagen17 and specialized fitting algorithms to determine ratios between non-zero coefficients of the second-order nonlinear susceptibility tensor χ(2), which governs the SHG phenomenon. The analysis of these ratios provides information on the molecular organization of collagen at a pixel level, which enables the identification of extracellular matrix remodeling associated with a plethora of diseases.28,29 Earlier approaches based on the nonlinear least square method30 were computationally expensive, requiring several hours to analyze a single image. More recent Fourier-based31 and linear least squares32 methods significantly reduced processing time to <1  s. However, these implementations have remained largely inaccessible to researchers without programming expertise, limiting their broader adoption in the life sciences community.

    To bridge this gap, we introduce CollagenFitJ, a user-friendly FIJI33 plugin using the single-axis molecule model34,35 for collagen, and designed for quantitative PSHG image analysis. Built on the Fast Fourier PSHG (FF-PSHG) approach,31 CollagenFitJ streamlines the extraction of collagen biophysical parameters such as fibril orientation and χ(2) tensor element ratios, as well as parameters assessing the fitting quality. Finally, dispersion and randomness maps of the collagen structure-related parameters are generated for local statistical assessment of the results.

    By integrating this method into FIJI, we eliminate the need for custom MATLAB31 or Python36 scripts, making PSHG analysis more accessible to end-users with limited coding skills or time availability. Unlike previous PSHG analysis tools that require significant technical expertise, CollagenFitJ is easily installable, fully compatible with ImageJ macros, and adaptable for diverse experimental designs. The plugin provides an intuitive, modular workflow that allows users with minimal programming experience to perform quantitative analyses, export data for further processing, and generate collagen structure-related maps for statistical assessment. This work aligns with ongoing efforts37 to establish standardized bioimage analysis frameworks, promoting reproducibility and collaboration in biomedical imaging research.

    2 Methods

    2.1 Employed Biophysical Model for Collagen

    The collagen model used in the CollageFitJ plugin is the single-axis molecule model, which was described in previous works.34,35 The model describes the dependence of the collagen SHG intensity on the polarization orientation of the excitation beam (α), on the in-plane orientation of collagen (φ), and on the nonlinear susceptibility tensor (χ(2)) elements. The model assumes cylindrical symmetry for the collagen fibrils along their main axis and in-plane orientation with respect to the imaging plane. Under these assumptions, the SHG intensity dependence can be expressed as ISHG=I0·{χ152·sin2[2(φα)]+[χ31·sin2(φα)+χ33·cos2(φα)]2},where I0 is a multiplication factor which depends on the excitation beam intensity as influenced by the imaging setup, and χ15, χ31, and χ33 are the only nonzero elements of the χ(2) tensor.

    Another form of the model expressed in Eq. (1) was found to be more suitable for fitting the experimental PSHG images using a Fourier series expansion ISHG=I0·{c0+c1cos[2(φα)]+c2cos[4(φα)]},where the coefficients c0, c1, and c2 are related to the parameters χ15, χ31, and χ33.31 For fitting the collagen model described by Eq. (2), Amat-Roldan et al.31 proposed the FF-PSHG analysis. For each pixel in a PSHG image stack [Fig. 1(a)], this method processes the polarization-dependent SHG intensity in the Fourier space by computing the discrete Fourier Transform (DFT) coefficients. The DFT coefficients are further used to determine the Fourier series coefficients ci in each pixel, which in turn are used to calculate the χ(2) tensor elements ratios χ31/χ15, χ33/χ15, and χ33/χ31.

    Exemplary raw PSHG dataset obtained using a laser-scanning PSHG microscope on rat tail tendon and typical outputs from CollagenFitJ. (a) A typical PSHG dataset acquired at polarization angles in steps of 20 deg from 0 to 180 deg. (b) Collagen structure-related images generated using the single-axis molecular model for collagen: FI, CHI3115, CHI3315, CHI3331, and THETA. (c) Fitting assessment images: ERR, SNR, and R2. (d) Dispersion and randomness maps (SD, MAD, and ENT images) displayed only for the FI image, computed using a circular mask with a radius of 5 and a window size of 11.

    Figure 1.Exemplary raw PSHG dataset obtained using a laser-scanning PSHG microscope on rat tail tendon and typical outputs from CollagenFitJ. (a) A typical PSHG dataset acquired at polarization angles in steps of 20 deg from 0 to 180 deg. (b) Collagen structure-related images generated using the single-axis molecular model for collagen: FI, CHI3115, CHI3315, CHI3331, and THETA. (c) Fitting assessment images: ERR, SNR, and R2. (d) Dispersion and randomness maps (SD, MAD, and ENT images) displayed only for the FI image, computed using a circular mask with a radius of 5 and a window size of 11.

    Using FF-PSHG analysis, the CollagenFitJ plugin can compute not only the ratios of the χ(2) tensor elements but also the in-plane orientation of collagen (φ), and the orientation of the hyperpolarizability tensor’s dominant axis (θe), which was previously associated with the helical pitch angle of the collagen triple helix. The helical pitch angle can be derived from the ratios of the χ(2) tensor elements as follows:34cos2θe=χ33/χ312+χ33/χ31.

    Most importantly, by exploiting the specifics of the single-axis molecule model for collagen, the CollagenFitJ plugin can generate five collagen structure-related images (Fig. 1): FI, CHI3115, CHI3315, CHI3331, and THETA. Each pixel in these images corresponds to the values for the in-plane collagen orientation (φ), the χ(2) element ratios χ31/χ15, χ33/χ15, and χ33/χ31, and the helical pitch angle (θe), respectively. Pixels in which fitting was not performed are assigned NaN values in all images.

    2.2 Fitting Process Assessment

    The same pixel-wise procedure applied for fitting the experimental data with the collagen model is used for the fitting assessment. For this, the plugin generates three fitting assessment images, where each pixel contains information regarding the fitting quality.38

    One fitting assessment image is generated using the coefficient of determination (R2), R2=1SSRTSS.Here, SSR is the sum of squared residuals and is computed as SSR=i=1N(xiyi)2, whereas TSS is the total sum of squares: TSS=i=1N(xix¯)2. Here, N is the size of the input polarization-dependent image stack, xi is the pixel value in the ith SHG image in the stack, and yi is the predicted pixel value using Eq. (1) and the results retrieved by the fitting algorithm.

    R2 values computed for each pixel are used to obtain the R2 image [Fig. 1(c)]. Values closer to unity indicate a better fit.

    The second fitting assessment image is created using an experimental error based on the model in Eq. (2), where only coefficients c0, c1, and c2 have biophysical significance. Therefore, the other coefficients, which can be computed from the DFT coefficients, are treated as noise39 because they do not contribute to the calculation of collagen parameters. The experimental error is thus defined as error=mean(c3,..)mean(c0,c1,c2).For pixels located outside collagen areas, the error is near unity, whereas pixels with a strong SHG signal from collagen will have error values close to zero. The ERR image is created by computing these error values on a pixel-by-pixel basis [Fig. 1(c)].

    The third assessment image is generated using the same assumption that only a part of the DFT coefficients contains meaningful information from a biophysical point of view. A signal-to-noise ratio (SNR) can be calculated for each pixel by considering that the signal power corresponding to each spectral DFT component (Fi) can be expressed as PFi=|Fi|2.Given the symmetrical nature of the Fourier Transform and treating spectral Fourier components without biophysical significance as noise, the SNR is calculated as40SNR[dB]=10log10i=12|Fi|2i=36|Fi|2.The SNR image is thus generated based on the pixel-by-pixel computation of the signal-to-noise ratio [Fig. 1(c)].

    For all fitting assessment images, pixels where fitting was not conducted are assigned a NaN value.

    Because the pixel values in all fitting assessment images (ERR, SNR, and R2) provide information on both fitting quality and collagen presence, these images can be used to segment collagen and create binary masks of collagen regions (Fig. 2).

    Examples of binary collagen masks created for the same PSHG image set as in Fig. 1(a) using the fitting assessment images (ERR, SNR, and R2) by applying different threshold values: 0.1 for ERR, 7 for SNR, and 0.8 for R2 (step 11A in the Supplementary Material). In addition, a custom mask was generated by segmentation of collagen in the average image derived from the entire PSHG stack (step 11B in the Supplementary Material).

    Figure 2.Examples of binary collagen masks created for the same PSHG image set as in Fig. 1(a) using the fitting assessment images (ERR, SNR, and R2) by applying different threshold values: 0.1 for ERR, 7 for SNR, and 0.8 for R2 (step 11A in the Supplementary Material). In addition, a custom mask was generated by segmentation of collagen in the average image derived from the entire PSHG stack (step 11B in the Supplementary Material).

    2.3 Local Statistics Images

    Dispersion and randomness in SHG images were previously used as quantitative methods to characterize the collagen architecture in the tissue.24,27,41 The dispersion of a set of values can be estimated by standard deviation (SD) and median absolute deviation (MAD). Although SD measures the dispersion of a dataset relative to its mean, MAD is defined as the median of the absolute deviations from the median. With normally distributed values SD is commonly used to assess the spread, whereas for other distributions, MAD is more robust, being less sensitive to outliers than SD.42

    Entropy (ENT) measures randomness, with higher values indicating greater randomness. The entropy of an image can be calculated as follows: entropy=i=1np(xi)·log2[p(xi)],where p(xi) is the occurrence rate for a particular pixel value xi in the image.

    We use these three statistics to create the SD, MAD, and ENT images, which provide local dispersion and randomness information by calculating the standard deviation, mean absolute deviation, and entropy within circular kernels. ImageJ’s circular masks (defined by radius and size) include 99 different circular kernels for this purpose.

    2.4 Nonlinear Optical Imaging

    Images were acquired with scanning38 and widefield43 SHG microscope systems with input laser polarization control for image sets acquisition. PSHG image sets were acquired on collagen-rich samples: (i) rat-tail tendon,19 a widely used model for benchmarking SHG image analysis methods; (ii) human-origin tissue slides prepared as per standard histology protocol, stained with H&E,24,44 or left unstained;44,45 and (iii) tumoral tissue imaged in vivo.19

    A typical raw polarization-dependent dataset can be seen in Fig. 1(a). The dataset was acquired using a Leica TCS SP laser scanning confocal microscope adapted for nonlinear imaging. The excitation source was a Ti:Sapphire laser (Coherent Chameleon Ultra II) emitting at 870 nm, with a pulse width of 140 fs and a repetition rate of 80 MHz. During scanning, laser beam power levels were kept below 15 mW, measured at the objective focus. The excitation laser beam was linearly polarized using a combination of an achromatic quarter-wave plate (AQWP05M-980, Thorlabs) and an achromatic half-wave plate (AHWP05M-980, Thorlabs), both mounted on motorized rotation stages (PRM1/MZ8, Thorlabs) and placed in the laser beam path before the microscope. A polarimeter (PAX1000IR1, Thorlabs) was used to verify the purity of the linearly polarized laser beam, ensuring an absolute ellipticity of less than 0.3 deg and power variations within 7%. A 40× magnification, 0.75 numerical aperture (NA) objective was used to focus the excitation laser beam. The forward-generated SHG signal was collected using a 0.9 NA condenser lens and was spectrally separated from the excitation beam by a combination of a short-pass filter (FF01-750/SP-25, Semrock) and a bandpass filter (FB430-10, Thorlabs) placed in the forward detection path.

    All the images underlying the figures featured in this article are available in a public repository at 10.17605/OSF.IO/F3QA9. Additional sample images for tissue sections prepared as per standard histology protocol, stained with H&E or left unstained, can also be found in a public repository, linked to the curated PSHG-TISS dataset.38

    3 Results

    3.1 Experimental Design

    The PSHG image sets can be acquired with multiphoton microscopes featuring polarization control for the input laser beam.19,38 Datasets collected with widefield SHG systems15 with input laser polarization control represent a good match as well for CollagenFitJ. For a laser scanning SHG microscope, to efficiently configure the image acquisition protocol, the reader is advised to consult Chen et al.9 Furthermore, valuable aspects of the precise laser beam polarization control are provided by Romijn et al.46 Images in all formats readable by ImageJ/FIJI can be used with our plugin, but lossless file formats (e.g., .tiff) are recommended for reliable quantitative analysis. The PSHG microscope can either provide PSHG image stacks, which can be readily processed by the CollagenFitJ plugin (workflow A, see final paragraph of this section), or standalone images for each input polarization, which can be easily converted in stacks using ImageJ (workflow B, see final paragraph of this section). The plugin can handle images with standard dimensions (e.g., 512×512, 1024×1024, and 2048×2048). Depending on the computer’s performance and available memory, we recommend processing widefield PSHG stacks in regions of interest rather than all at once. For image mosaics that cover large areas or the entire tissue sample, it is advisable to process the individual tiles with CollagenFitJ before assembling the complete mosaic.

    The method described here features three distinct workflows, each with its own outputs and capable of being executed separately based on user needs: workflow A (using only the CollagenFitJ plugin), workflow B (utilizing the CollagenFitJ macro along with the integrated plugin and an optional macro for image adaptation for classification tasks), and workflow C (employing either the CollagenFitJ plugin or macro with a data export macro). The workflows are detailed below, and the step-by-step instructions for installing and operating the plugin are provided in the Supplementary Materials, Sec. 1.

    Workflow A: To begin, the CollagenFitJ plugin must be installed and run within the FIJI environment (steps 1 to 2); in our case, we used ImageJ version 1.54b for plugin development and validation. Once installed, the plugin can be used independently by processing a polarization-dependent image stack (steps 8 to 10). The plugin will generate a set of eight 32-bit images: five related to collagen structure and three for fitting assessment. The collagen structure-related images include: FI.tif, CHI3115.tif, CHI3315.tif, CHI3331.tif, and THETA.tif, representing the in-plane collagen orientation angle (φ), the χ(2) tensor element ratios χ31/χ15, χ33/χ15, and χ33/χ31, and the helical pitch angle (θe), respectively. The fitting assessment images are R2.tif, ERR.tif, and SNR.tif, corresponding to the coefficient of determination, an estimation of the experimental error, and the SNR, respectively. All eight images are produced by computing each parameter pixel-wise as described in the sections “The employed biophysical model for collagen” and “Assessment of the fitting process.” For new samples, it is recommended to first run workflow A to familiarize yourself with the results and optionally create a custom collagen mask for advanced users (step 11).

    Workflow A Output: FI.tif, CHI3115.tif, CHI3315.tif, CHI3331.tif, THETA.tif, ERR.tif, SNR.tif, and R2.tif.

    Workflow B: First, install the CollagenFitJ macro to become available within the FIJI environment (steps 3 to 5). The macro features a dialog interface that guides users in selecting and saving the desired images (steps 12 to 25). Because the CollagenFitJ macro integrates the plugin (workflow A), it generates the same eight output files. Users can also choose to subtract a background value (step 15) and exclude pixels not considered to contain collagen signals. The macro offers three automated options using fitting assessment images (step 16) and one custom option where users can apply a binary mask created by various methods. Guidance on creating a user-defined collagen mask is provided in step 11. In addition, this workflow enables the generation of local statistics images. We offer three methods for creating SD, MAD, and ENT images, which represent local computations of standard deviation, median absolute deviation, and entropy, respectively. These calculations are performed within kernels selected from ImageJ’s circular masks. For classification tasks, the default NaN values for pixels with no fitting results may be unsuitable. In such cases, the “CollagenFitJ NaN to 0” macro can be used to set these pixels to zero (steps 26 to 29).

    Workflow B output:

    1. 1.Raw images: the same as those for Workflow A Output.
    2. 2.Images with selected pixels. The file names for these images follow the next convention: “CollagenFitJ output image”_”thresholding method”_threshold_”threshold value”.tif, where “CollagenFitJ output image” can be one of the eight images in Workflow A Output, and “thresholding method” can be one of the fitting assessment images.
    3. 3.Local statistics images. These are selected by the user in step 20. The file names for these images follow the next convention:

    “CollagenFitJ output image”_(”thresholding method”_threshold_”threshold value”_)”method”_radius_”radius value”_size_”size value”, where the information about thresholding appears only if pixel selection was chosen, “method” is one of: SD, MAD, and ENT, whereas “radius value” and “size value” correspond to the radius and size of the selected kernel in ImageJ’s circular masks.

    Workflow C: After completing any of the previous workflows, the output folder will contain images from either Workflow A or Workflow B output. If the user wishes to statistically analyze the results to compare images from different samples, workflow C provides a set of user-selected values extracted from all processed images in a specified folder (steps 30 to 33). These data can be analyzed using any specialized statistical software.

    Workflow C output: tabulated data for statistical analysis.

    3.2 Technical Validation

    We validated CollagenFitJ on PSHG images obtained from both scanning laser and widefield SHG microscopes. For scanning SHG, validation was performed on rat tail tendon [Fig. 3(a)], thyroid nodule capsules [Fig. 3(b)], and mouse colon tumor [Fig. 3(c)]. For widefield SHG, we assessed collagen organization in rat tail tendon [Fig. 3(d)]. The plugin also provided conclusive results for in vivo B16 melanoma images (Fig. 4), which align with previously published data from phasor analysis of PSHG stacks.19 We anticipate that the proposed method will require no modifications for use with PSHG images obtained from super-resolution SHG microscopes (e.g., image scanning SHG10 and rescan-SHG11).

    Validation of CollagenFitJ on PSHG image sets from various formalin-fixed paraffin-embedded tissue sections using different techniques and configurations. For each dataset, a PSHG image obtained as the average of the raw PSHG image stack is provided. Also included are the outputs of the CollagenFitJ plugin: collagen structure-related images (FI, CHI3115, CHI3315, CHI3331, and THETA), fitting assessment images (ERR, SNR, and R2), and dispersion and randomness maps (SD, MAD, and ENT) computed for different CollagenFitJ outputs under various settings [Fig. S1(g) in the Supplementary Material] for exemplification. (a) Loose collagen fibrils in rat tail tendon, captured with a custom-modified Leica TCS SP confocal microscope adapted for SHG imaging38 in forward detection. Local statistics images are generated with a radius of 2.5, size 7 circular mask on CHI3331.tif. (b) Follicular thyroid carcinoma nodule capsule, imaged with the same system as in panel (a). Local statistics images are created using a radius of 7.5, size 15 circular mask on THETA.tif. (c) Mouse colon tumor, acquired with a scanning SHG microscope19 using backward detection. Local statistics images are produced with a radius of 5, size 11 circular mask on CHI3115.tif. (d) Rat tail tendon, imaged with a widefield SHG microscope.15 Local statistics images are generated with a radius of 10, size 21 circular mask on CHI3315.tif.

    Figure 3.Validation of CollagenFitJ on PSHG image sets from various formalin-fixed paraffin-embedded tissue sections using different techniques and configurations. For each dataset, a PSHG image obtained as the average of the raw PSHG image stack is provided. Also included are the outputs of the CollagenFitJ plugin: collagen structure-related images (FI, CHI3115, CHI3315, CHI3331, and THETA), fitting assessment images (ERR, SNR, and R2), and dispersion and randomness maps (SD, MAD, and ENT) computed for different CollagenFitJ outputs under various settings [Fig. S1(g) in the Supplementary Material] for exemplification. (a) Loose collagen fibrils in rat tail tendon, captured with a custom-modified Leica TCS SP confocal microscope adapted for SHG imaging38 in forward detection. Local statistics images are generated with a radius of 2.5, size 7 circular mask on CHI3331.tif. (b) Follicular thyroid carcinoma nodule capsule, imaged with the same system as in panel (a). Local statistics images are created using a radius of 7.5, size 15 circular mask on THETA.tif. (c) Mouse colon tumor, acquired with a scanning SHG microscope19 using backward detection. Local statistics images are produced with a radius of 5, size 11 circular mask on CHI3115.tif. (d) Rat tail tendon, imaged with a widefield SHG microscope.15 Local statistics images are generated with a radius of 10, size 21 circular mask on CHI3315.tif.

    Validation of CollagenFitJ using in vivo PSHG image sets of B16 melanoma. The PSHG image obtained as the average of the raw PSHG image stack provides an overview of the SHG intensity. Also included are the outputs of the CollagenFitJ plugin: collagen structure-related images (FI, CHI3115, CHI3315, CHI3331, and THETA), fitting assessment images (ERR, SNR, and R2), and dispersion and randomness maps (SD, MAD, and ENT) generated with a radius of 5, size 11 circular mask [Fig. S1(g) in the Supplementary Material] applied to CHI3115.tif.

    Figure 4.Validation of CollagenFitJ using in vivo PSHG image sets of B16 melanoma. The PSHG image obtained as the average of the raw PSHG image stack provides an overview of the SHG intensity. Also included are the outputs of the CollagenFitJ plugin: collagen structure-related images (FI, CHI3115, CHI3315, CHI3331, and THETA), fitting assessment images (ERR, SNR, and R2), and dispersion and randomness maps (SD, MAD, and ENT) generated with a radius of 5, size 11 circular mask [Fig. S1(g) in the Supplementary Material] applied to CHI3115.tif.

    To assess potential trade-offs between computational speed and fitting accuracy when using CollagenFitJ, we compared its outputs with those of a slow iterative algorithm (Fig. S3 in the Supplementary Material). While the iterative algorithm processed the images in 6  h, CollagenFitJ offered significantly faster runtime (see Sec. 3.3). Fitting efficiency47 was slightly higher for the iterative algorithm, but it produced fewer meaningful fitted pixels compared with the CollagenFitJ plugin.

    Comparing the χ31/χ15 and χ33/χ15 ratios (Table S1 in the Supplementary Material), CollagenFitJ showed higher SD values for the ratios’ distributions than the iterative algorithm, indicating more outliers. Filtering CollagenFitJ’s results to include only pixels with R2>0.8 reduced SD and brought the mode and mean closer to those of the iterative algorithm.

    Although the slight differences between the outputs of the iterative algorithm and CollagenFitJ can be mitigated by filtering pixels with better fitting estimation parameters (here we propose R2>0.8), one potential disadvantage of the FF-PSHG method, which requires further investigation for mitigation, is its suitability only to collagen models that can be reduced to SHG intensity dependence expressible as a Fourier series expansion.

    Overall, the examples presented here illustrate that CollagenFitJ is versatile for analyzing PSHG images regardless of the acquisition technique, offering valuable insights into collagen orientation and anisotropy at the pixel level. Future iterations of the plugin could also be adapted for PSHG image sets from tissue samples with striated muscle areas with minimal modifications to the current algorithm. These modifications would need to account for the differences between collagen fibril and myofibril models.48

    By employing this method, we successfully quantified collagen anisotropy and improved its evaluation.21 We also applied this method to optimize the determination of collagen structure-related parameters47 in skin tissue samples. In addition, our previous research demonstrated that local statistics derived from collagen structure parameters provide insights beyond the parameter values themselves. For instance, in a study on thyroid cancer, we used this approach to differentiate between benign and malignant thyroid nodule capsules.24 Moreover, given the prevalence of SHG analysis methods applied indiscriminately to images from fresh, fixed, or stained tissues, CollagenFitJ’s approach revealed the impact of hematoxylin and eosin staining on extracting collagen structure parameters from PSHG image sets.44 Finally, the value of using the PSHG fitting methods in CollagenFitJ was underscored in a Data Paper where we introduced PSHG-TISS, the first public and curated PSHG dataset,38 which supports the development and benchmarking of PSHG-oriented computer vision and image analysis techniques.

    3.3 Timing

    The timing information provided below is obtained by running the CollagenFitJ plugin and macros on a desktop personal computer equipped with an Intel Core i7-8700 CPU @ 3.20 GHz and 16 GB RAM.

    Installation of the entire CollagenFitJ package (steps 1 to 7): 2 min.

    Initial CollagenFitJ execution (steps 8 to 10): 1 min.

    The CollagenFitJ plugin runtime (workflow A): <1  s for a 512×512 image stack (10 deg polarization angle step).

    Custom collagen mask generation (depending on user experience) (step 11): 2 to 5 min.

    Setting the CollagenFitJ macro without the macro runtime (steps 12 to 24): 1 min.

    For step 25, the runtime depends on the selected options. The runtime is <1  s if no local statistics images are selected. Runtime associated with individual options is provided in Table 1.

    Time (s)Kernel
    Radius: 0.5; size: 3Radius: 5; size: 11Radius: 10; size: 21
    Local statistics imageSD222.5
    MAD1194140
    ENT212428

    Table 1. CollagenFitJ macro runtimes for 512×512 images depending on the selected options.

    Conversion of NaN values to 0 for 100 image files (steps 26 to 29): 0.5 s.

    Exporting a 10,000-pixel sample from a set of 100 images (steps 30 to 33): 15 s.

    4 Discussion and Conclusion

    In the previous section, we outlined the outputs generated by the CollagenFitJ plugin and macros. Figures 3 and 4 illustrate these outputs across a range of application examples, highlighting different tissue types, experimental configurations, and techniques.

    Notably, the CollagenFitJ plugin employs methods that closely resemble those used in previous studies for extracting quantitative information on collagen orientation and anisotropy from PSHG image stacks. These principles have been independently validated across various peer-reviewed studies involving different tissue types and pathologies.19,4952 Building on these prior efforts, we have validated CollagenFitJ on images from formalin-fixed paraffin-embedded tissue sections using two different scanning SHG systems,19,38 operating in both backward and forward detection configurations. The tissue types tested include rat tail tendon [Fig. 3(a)], human thyroid nodule capsules [Fig. 3(b)], and mouse colon tumor [Fig. 3(c)]. CollagenFitJ also performed well on PSHG images acquired with a widefield SHG microscope15 on rat tail tendon [Fig. 3(d)]. In addition, we validated the plugin on in vivo PSHG imaging of B16 melanoma (Fig. 4), with results for collagen orientation and anisotropy factor (χ33/χ15, corresponding to the CHI3315 image) consistent with previously reported data.19 Furthermore, we showcase the utility of SD, MAD, and ENT maps in a qualitative context, complementing the quantitative results published earlier.24

    In previous research, we utilized the methodologies underlying CollagenFitJ to enhance collagen orientation angle determination for more accurate anisotropy evaluation21 and to examine the impact of hematoxylin and eosin staining on extracting collagen structural information.44 We also applied these methods to differentiate between benign and malignant thyroid nodules,24 by analyzing collagen structural parameters and parameter spread maps in thyroid nodule capsules. In addition, following this approach, we developed PSHG-TISS,38 the first public and curated PSHG image dataset featuring breast, skin, and thyroid tissue samples. PSHG-TISS includes raw PSHG image stacks as well as maps related to collagen structure and its distribution. Beyond these applications, we propose that the techniques used in CollagenFitJ are broadly applicable to various polarization-dependent SHG microscopy methods, including widefield PSHG [as shown in Fig. 3(d) on the rat tail tendon and in previous publications on thyroid tissue sections53] and super-resolved techniques such as image scanning10 or re-scan SHG.11

    The plugin produces three fitting assessment images [ERR,31 SNR,40 and R2 (Ref. 47)] that have previously been utilized to identify relevant pixels for display or further analysis. These images evaluate the goodness-of-fit between PSHG data and theoretical collagen models, and good-fitting results are typically observed in collagen-rich areas, with ERR, SNR, and R2 values being influenced by the number of images in the PSHG stack (Fig. S4 in the Supplementary Materials). As the number of images in the PSHG stack decreases, R2 values exhibit a slight decline, whereas values in ERR and SNR remain relatively stable. However, further reducing the number of images in the stack results in a significant increase in values in ERR and a decrease in those in SNR images. This trend is generally expected, but the goodness-of-fit should also be considered in the context of the suitability of the collagen model for the sample. In this study, we employed the single-axis molecule model, which assumes cylindrical symmetry. However, more general models, such as the trigonal model, have been shown to yield better results in specific cases,54 often leading to an increase in fitting quality estimators.

    CollagenFitJ can play a key role in improving segmentation techniques for collagen PSHG images by enabling the creation of binary masks from fitting assessment images (see step 11A in the Supplementary Material). These masks can be effectively used for subsequent collagen segmentation. Although the results depend heavily on image type and threshold selection (Fig. S5 in the Supplementary Material), combining masks derived from fitting assessment images with binary operations and intensity-based segmentation may yield more robust results. On the other hand, intensity-based segmentation, though widely used in image analysis, is highly sensitive to noise, lighting variations, and low contrast, leading to inconsistent outcomes. It disregards spatial context and texture, often resulting in over- or under-segmentation. In addition, its effectiveness is limited by dataset-specific threshold selection, making it less adaptable, and it struggles to distinguish overlapping structures with similar intensities. However, collagen masks derived from CollagenFitJ outputs incorporate biophysical meaning, as the assessment values reflect the suitability of the collagen model for the sample.

    Another feature provided by CollagenFitJ is the extraction of pixel sample sets prepared for statistical analysis. A preliminary step in evaluating potential differences for distinguishing between tissues with various pathologies involves performing statistical analysis on the dataset. For our purposes, the dataset includes collagen structure-related parameters provided by the CollagenFitJ plugin, along with locally computed dispersion and randomness maps. CollagenFitJ allows for the extraction of pixel values from the entire dataset (workflow C). These extracted pixel samples can then be used initially for visualization through bar and scatter plots and for statistical analysis24 using any third-party software (e.g., GraphPad Prism).

    Images produced using the CollagenFitJ plugin can be used for classification experiments, transfer learning approaches,55 or information fusion techniques.56 In the context of transfer learning, the PSHG images along with the additional images generated by CollagenFitJ are particularly valuable, as SHG microscopy is a label-free method well-suited for in vivo applications. CollagenFitJ facilitates the creation of numerous representations of PSHG datasets, offering valuable diagnostic insights. Although not yet explored, the rich variety of representations and information generated by CollagenFitJ presents an excellent opportunity for future research in PSHG image analysis, particularly through information fusion methods. Combining various PSHG image representations to produce composite data that enhances the detection of abnormalities or highlights key features will be a focus of our future work.

    To conclude, we describe an image analysis method for deriving collagen structural parameters from polarization-resolved second harmonic generation microscopy. The accompanying FIJI plugin and processing method are designed to facilitate this analysis, potentially driving similar initiatives that address open data. These efforts could significantly enhance current image processing and analysis techniques and support the development of new methods for extracting meaningful quantitative data from raw PSHG image sets.

    Biographies of the authors are not available.

    References

    [1] H. Wahyudi et al. Targeting collagen for diagnostic imaging and therapeutic delivery. J. Control. Release, 240, 323-331(2016). https://doi.org/10.1016/j.jconrel.2016.01.007

    [2] A. M. Ferreira et al. Collagen for bone tissue regeneration. Acta Biomater., 8, 3191-3200(2012). https://doi.org/10.1016/j.actbio.2012.06.014

    [3] D. Ambrosi et al. Growth and remodelling of living tissues: perspectives, challenges and opportunities. J. R. Soc. Interface, 16, 20190233(2019). https://doi.org/10.1098/rsif.2019.0233

    [4] S. Xu et al. The role of collagen in cancer: from bench to bedside. J. Transl. Med., 17, 309(2019). https://doi.org/10.1186/s12967-019-2058-1

    [5] K. P. Mercado et al. Noninvasive quantitative imaging of collagen microstructure in three-dimensional hydrogels using high-frequency ultrasound. Tissue Eng. Part C Methods, 21, 671-682(2015). https://doi.org/10.1089/ten.tec.2014.0527

    [6] B. C. Fuchs et al. Molecular MRI of collagen to diagnose and stage liver fibrosis. J. Hepatol., 59, 992-998(2013). https://doi.org/10.1016/j.jhep.2013.06.026

    [7] P. Désogère et al. Optimization of a collagen-targeted PET probe for molecular imaging of pulmonary fibrosis. J. Nucl. Med., 58, 1991-1996(2017). https://doi.org/10.2967/jnumed.117.193532

    [8] R. Cisek et al. Polarization-sensitive second harmonic generation microscopy for investigations of diseased collagenous tissues. Front. Phys., 9, 726996(2021). https://doi.org/10.3389/fphy.2021.726996

    [9] X. Chen et al. Second harmonic generation microscopy for quantitative analysis of collagen fibrillar structure. Nat. Protoc., 7, 654-669(2012). https://doi.org/10.1038/nprot.2012.009

    [10] I. Gregor et al. Rapid nonlinear image scanning microscopy. Nat. Methods, 14, 1087-1089(2017). https://doi.org/10.1038/nmeth.4467

    [11] S. G. Stanciu et al. Super-resolution re-scan second harmonic generation microscopy. Proc. Natl. Acad. Sci. U. S. A., 119, e2214662119(2022). https://doi.org/10.1073/pnas.2214662119

    [12] A. Diaspro, P. Bianchini. Three-dimensional (3D) backward and forward second harmonic generation (SHG) microscopy of biological tissues. J. Biophotonics, 1, 443-450(2008). https://doi.org/10.1002/jbio.200810060

    [13] A. Enache et al. Assessment of cerebral tumors and metastases by two-photon excitation microscopy. Rom. J. Mil. Med., 126, 418-423(2023). https://doi.org/10.55453/rjmm.2023.126.4.11

    [14] H. Zhao et al. Live imaging of contracting muscles with wide-field second harmonic generation microscopy using a high power laser. Biomed. Opt. Express, 10, 5130(2019). https://doi.org/10.1364/BOE.10.005130

    [15] Y. Padrez et al. Quantitative and qualitative analysis of pulmonary arterial hypertension fibrosis using wide-field second harmonic generation microscopy. Sci. Rep., 12, 7330(2022). https://doi.org/10.1038/s41598-022-11473-5

    [16] K. Mirsanaye et al. Machine learning-enabled cancer diagnostics with widefield polarimetric second-harmonic generation microscopy. Sci. Rep., 12, 10290(2022). https://doi.org/10.1038/s41598-022-13623-1

    [17] J. Duboisset, M. Roche, S. Brasselet. Generic model of the molecular orientational distribution probed by polarization resolved second harmonic generation. Phys. Rev. A, 85, 043829(2012). https://doi.org/10.1103/PhysRevA.85.043829

    [18] C. Odin et al. Orientation fields of nonlinear biological fibrils by second harmonic generation microscopy. J. Microsc., 229, 32-38(2008). https://doi.org/10.1111/j.1365-2818.2007.01868.x

    [19] F. Radaelli et al. μmAPPS: a novel phasor approach to second harmonic analysis for in vitro-in vivo investigation of collagen microstructure. Sci. Rep., 7, 17468(2017). https://doi.org/10.1038/s41598-017-17726-y

    [20] R. Scodellaro et al. Whole-section tumor micro-architecture analysis by a two-dimensional phasor-based approach applied to polarization-dependent second harmonic imaging. Front. Oncol., 9, 527(2019). https://doi.org/10.3389/fonc.2019.00527

    [21] R. Hristu et al. Improved quantification of collagen anisotropy with polarization-resolved second harmonic generation microscopy. J. Biophotonics, 10, 1171-1179(2017). https://doi.org/10.1002/jbio.201600197

    [22] R. Cicchi et al. From molecular structure to tissue architecture: collagen organization probed by SHG microscopy. J. Biophotonics, 6, 129-142(2013). https://doi.org/10.1002/jbio.201200092

    [23] J. Lin et al. Polarization-resolved second-harmonic generation imaging for liver fibrosis assessment without labeling. Appl. Phys. Lett., 103, 173701(2013). https://doi.org/10.1063/1.4826516

    [24] R. Hristu et al. Pixel-level angular quantification of capsular collagen in second harmonic generation microscopy images of encapsulated thyroid nodules. J. Biophotonics, 13, e202000262(2020). https://doi.org/10.1002/jbio.202000262

    [25] K. R. Campbell et al. Polarization-resolved second harmonic generation imaging of human ovarian cancer. J. Biomed. Opt., 23, 066501(2018). https://doi.org/10.1117/1.JBO.23.6.066501

    [26] A. Golaraei et al. Changes of collagen ultrastructure in breast cancer tissue determined by second-harmonic generation double Stokes-Mueller polarimetric microscopy. Biomed. Opt. Express, 7, 4054-4068(2016). https://doi.org/10.1364/BOE.7.004054

    [27] A. Golaraei et al. Polarimetric second-harmonic generation microscopy of the hierarchical structure of collagen in stage I–III non-small cell lung carcinoma. Biomed. Opt. Express, 11, 1851-1863(2020). https://doi.org/10.1364/BOE.387744

    [28] C. Bonnans, J. Chou, Z. Werb. Remodelling the extracellular matrix in development and disease. Nat. Rev. Mol. Cell Biol., 15, 786-801(2014). https://doi.org/10.1038/nrm3904

    [29] B. K. Robinson et al. Quantitative analysis of 3D extracellular matrix remodelling by pancreatic stellate cells. Biol. Open, 5, 875-882(2016). https://doi.org/10.1242/bio.017632

    [30] S. Psilodimitrakopoulos et al. Effect of molecular organization on the image histograms of polarization SHG microscopy. Biomed. Opt. Express, 3, 2681-2693(2012). https://doi.org/10.1364/BOE.3.002681

    [31] I. Amat-Roldan et al. Fast image analysis in polarization SHG microscopy. Opt. Express, 18, 17209-17219(2010). https://doi.org/10.1364/OE.18.017209

    [32] D. Rouède et al. Linear least square (LLS) method for pixel-resolution analysis of polarization dependent SHG images of collagen fibrils. Opt. Express, 23, 13309-13319(2015). https://doi.org/10.1364/OE.23.013309

    [33] J. Schindelin et al. Fiji: an open-source platform for biological-image analysis. Nat. Methods, 9, 676-682(2012). https://doi.org/10.1038/nmeth.2019

    [34] F. Tiaho, G. Recher, D. Rouède. Estimation of helical angles of myosin and collagen by second harmonic generation imaging microscopy. Opt. Express, 15, 12286-12295(2007). https://doi.org/10.1364/OE.15.012286

    [35] P. Réfrégier, M. Roche, S. Brasselet. Precision analysis in polarization-resolved second harmonic generation microscopy. Opt. Lett., 36, 2149-2151(2011). https://doi.org/10.1364/OL.36.002149

    [36] M. Mari et al. Comparison between cylindrical, trigonal and general symmetry models for the analysis of polarization-dependent second harmonic generation measurements acquired from collagen-rich equine pericardium samples. Photonics, 9, 254(2022). https://doi.org/10.3390/photonics9040254

    [37] U. Rubens et al. BIAFLOWS: a collaborative framework to reproducibly deploy and benchmark bioimage analysis workflows. Patterns, 1, 100040(2020). https://doi.org/10.1016/j.patter.2020.100040

    [38] R. Hristu et al. PSHG-TISS: a collection of polarization-resolved second harmonic generation microscopy images of fixed tissues. Sci. Data, 9, 376(2022). https://doi.org/10.1038/s41597-022-01477-1

    [39] S. Psilodimitrakopoulos et al. Polarization second harmonic generation discriminates between fresh and aged starch-based adhesives used in cultural heritage. Microsc. Microanal., 22, 1072-1083(2016). https://doi.org/10.1017/S1431927616011570

    [40] M. Lombardo et al. Translational label-free nonlinear imaging biomarkers to classify the human corneal microstructure. Biomed. Opt. Express, 6, 2803-2818(2015). https://doi.org/10.1364/BOE.6.002803

    [41] K. R. Campbell et al. Second-harmonic generation microscopy analysis reveals proteoglycan decorin is necessary for proper collagen organization in prostate. J. Biomed. Opt., 24, 066501(2019). https://doi.org/10.1117/1.JBO.24.6.066501

    [42] T. Pham-Gia, T. L. Hung. The mean and median absolute deviations. Math. Comput. Model., 34, 921-936(2001). https://doi.org/10.1016/S0895-7177(01)00109-1

    [43] A. Dementjev et al. Optimization of wide-field second-harmonic generation microscopy for fast imaging of large sample areas in biological tissues. Lith. J. Phys., 60, 145-153(2020). https://doi.org/10.3952/physics.v60i3.4301

    [44] R. Hristu et al. Influence of hematoxylin and eosin staining on the quantitative analysis of second harmonic generation imaging of fixed tissue sections. Biomed. Opt. Express, 12, 5829-5843(2021). https://doi.org/10.1364/BOE.428701

    [45] M. J. Huttunen et al. Multiphoton microscopy of the dermoepidermal junction and automated identification of dysplastic tissues with deep learning. Biomed. Opt. Express, 11, 186-199(2020). https://doi.org/10.1364/BOE.11.000186

    [46] E. I. Romijn et al. Automated calibration and control for polarization-resolved second harmonic generation on commercial microscopes. PLoS One, 13, e0195027(2018). https://doi.org/10.1371/journal.pone.0195027

    [47] B. Paun et al. Strategies for optimizing the determination of second-order nonlinear susceptibility tensor coefficients for collagen in histological samples. IEEE Access, 7, 135210-135219(2019). https://doi.org/10.1109/ACCESS.2019.2937360

    [48] S. Psilodimitrakopoulos et al. In vivo, pixel-resolution mapping of thick filaments’ orientation in nonfibrilar muscle using polarization-sensitive second harmonic generation microscopy. J. Biomed. Opt., 14, 014001(2011). https://doi.org/10.1117/1.3059627

    [49] A. Nair et al. Characterization of collagen response to bone fracture healing using polarization-SHG. Sci. Rep., 12, 18453(2022). https://doi.org/10.1038/s41598-022-21876-z

    [50] J. C. Mansfield et al. Collagen reorganization in cartilage under strain probed by polarization sensitive second harmonic generation microscopy. J. R. Soc. Interface, 16, 20180611(2019). https://doi.org/10.1098/rsif.2018.0611

    [51] V. Tsafas et al. Polarization-dependent second-harmonic generation for collagen-based differentiation of breast cancer samples. J. Biophotonics, 13, e202000180(2020). https://doi.org/10.1002/jbio.202000180

    [52] G. Ducourthial et al. Monitoring dynamic collagen reorganization during skin stretching with fast polarization-resolved second harmonic generation imaging. J. Biophotonics, 12, e201800336(2019). https://doi.org/10.1002/jbio.201800336

    [53] L. G. Eftimie et al. Widefield polarization-resolved second harmonic generation imaging of entire thyroid nodule sections for the detection of capsular invasion. Biomed. Opt. Express, 15, 4705-4718(2024). https://doi.org/10.1364/BOE.523052

    [54] R. Ambekar et al. Quantifying collagen structure in breast biopsies using second-harmonic generation imaging. Biomed. Opt. Express, 3, 2021-2035(2012). https://doi.org/10.1364/BOE.3.002021

    [55] G. Lee et al. DeepHCS++: bright-field to fluorescence microscopy image conversion using multi-task learning with adversarial losses for label-free high-content screening. Med. Image Anal., 70, 101995(2021). https://doi.org/10.1016/j.media.2021.101995

    [56] M. Schmitt, X. X. Zhu. Data fusion and remote sensing: an ever-growing relationship. IEEE Geosci. Remote Sens. Mag., 4, 6-23(2016). https://doi.org/10.1109/MGRS.2016.2561021

    Radu Hristu, Farzad Fereidouni, Stefan G. Stanciu, Lucian G. Eftimie, Oana C. Voinea, Danielis Rutkauskas, Laura Sironi, Giuseppe Chirico, Denis E. Tranca, Remus R. Glogojeanu, Alberto Diaspro, George A. Stanciu, "CollagenFitJ, a FIJI plugin for the quantification of collagen in polarization-resolved second harmonic generation image sets," Adv. Photon. Nexus 4, 037001 (2025)
    Download Citation