To model biological tissues in Ansys Zemax OpticStudio, the tissue’s refractive index, anisotropy, reduced scattering coefficient, and absorption coefficient must be included in the simulation. The Tissue Modeling Tool (TMT) User-Extension provides users with access to a default library of tissue optical properties and a simple method of exporting the tissue properties into non-sequential simulations. This article demonstrates how to install and use the TMT, as well as how to import data to include in addition to the default tissue library.
Authored by Dominique Gálvez
Introduction
To describe light-tissue interactions, the optical properties needed from biological tissues include the refractive index (n), the anisotropy (g), the coefficient of absorption (μa), and the standard, or reduced, coefficient of scattering (μs or μs', respectively).
Once known, these properties can be manually applied to a Ansys Zemax OpticStudio simulation according to the steps described in a previous example (How to model the human skin and optical heart rate sensors in OpticStudio) with the Henyey-Greenstein scattering model (Using the Henyey-Greenstein distribution to model bulk scattering) natively available in Non-Sequential (NSC) Mode.
The Tissue Modeling Tool (TMT) streamlines the process of finding and applying optical properties to a NSC object. The TMT features a built-in library of literature-sourced tissue properties or allows the user to supply their own. After tissue data has been selected, TMT uses the ZOS-API framework to apply the data to the NSC object. The TMT aims to accelerate tissue modeling workflows by providing OpticStudio users with both the initial data and setup necessary to start modeling tissue-optics.
Example: Simulating Human Skin
The goal of this example is to use the TMT to assign tissue optical properties to the layers of tissue present in this example: epidermis, dermis, subdermis, and subcutaneous adipose.
1. Setup the extension
Download the attached "TissueModelingTool.zip" file of this article to follow along with the example. Extract the .ZIP file into your "Zemax\ZOS-API\Extensions" folder (not into a "…\Zemax\ZOS-API\Extensions\TissueModelingTool" folder). You may need to manually move the extracted items from the TissueModelingTool subfolder to the Extensions folder.
If correctly set up, your Extensions folder should contain 4 key additions/updates: (1) a "TissueLibraryTool.exe" file, (2) a "laserOnSkin_start.zar" file, (3) a new folder titled "Tissue Data", and (4) a "ZOSAPI_NetHelper.dll" file for if you didn't have one already.
If you had OpticStudio open while you installed the files into the Extensions folder, you will need to restart OpticStudio for the Extensions to properly update.
2. Open the example "laserOnSkin_start.zar" file
This file represents a simplified setup of a laser hair removal application. A simple singlet lens focuses laser light into the dermis layer of the skin, approximately 2mm below the surface.
3. Access the TMT from the Programming tab, User-Extensions button dropdown.
Select TissueLibraryTool to open the extension.
User Definitions
The first section of the TMT allows the user to select a tissue type, define the wavelength of interest, define the object that will receive the tissue’s properties, and import data if desired (see the Importing Data section of this article).
For this example, the first layer of skin is the epidermis, represented by Object 4 as a Rectangular Volume.
From the Tissue dropdown menu, select ‘Skin’. Enter 755 as the wavelength in nanometers and type 4 for the object. ‘Epidermis’ is a subcategory of ‘Skin’, and you will specify this later by filtering the data.
4. Filter the Data
In the Filter Data section of the TMT, you can filter the data by a variety of its Properties. Depending on availability of information, some data entries may include more, or less, Properties than other data entries. The table below defines all the potential Properties that the TMT tracks.
| Property | Definition | Examples |
|---|---|---|
| Author | Last name of the first author of the data source | ‘Bashkatov’, ‘Simpson’ |
| Year | Publication year of the data source | ‘2015’, ‘2026’ |
| Pathology | Clinical diagnosis of tissue | ‘Healthy’, ‘Tumor’ |
| Demographic | Clinical diagnosis of tissue | ‘Female’, ’50-80 years’, ‘Skin Type III-IV’ |
| Extra Info. | Additional information about the data point, like bodily location of measurement, or other data that doesn’t fit into the other Properties. This is where tissue ‘subcategories’ are defined (i.e. Brain: Gray matter) | ‘Gray matter’, ‘Oxygenated’ |
| Source | The library of origin that this data point is pulled from | ‘Default Library’, ‘User Library’ |
| Status | Experimental setting of biological tissue during measurement | ‘in vivo’, ‘ex vivo’, ‘in vitro’ |
As an exercise, filter the data to be for the Dermis. From the Property dropdown, select ‘Extra Info,’, then in the Filter Value dropdown, select ‘Dermis’, then use the Add Filter button.
From here, the TMT filters through all the ‘Skin’ data to use only datapoints marked as ‘Dermis’ and displays them in the plot. Hover the mouse over a datapoint to see a popup with information about that point. If clicked, the data grid below highlights that datapoint’s row for further inspection.
Filter the data further to allow for more recent publications only. Switch the Property dropdown to the ‘Year’ Property and select ‘2020’ as the Filter Value. Press Add Filter and notice how the plots change, now excluding any ‘Dermis’ data that was not published in 2020.
In this example, the top layer of skin (Object 4) is the epidermis. Let's filter for epidermis data. First, use the Delete All button to clear the current filters. Select the ‘Extra Info.’ option from the Property dropdown, selecting ‘Epidermis’ from the Filter Value dropdown, then click Add Filter.
5. Calculate the Average
In the Averaging Settings area of the TMT, the user sets the limits of the averaging calculation. With the Averaging Settings below, the TMT will average across datapoints centered at the user-defined wavelength, within +/- the wavelength specified in the ‘Wavelength window’ number box, up to the number of ‘Max. Points’ specified in the corresponding number box.
When the plots are updated either by selecting a new tissue type, applying a new filter, or by pressing Calculate, the datapoints included in the averaging calculation are highlighted in yellow in the plot. The plots can also be updated without calculating the averages with the Add Filter button- even if a previously added filter value is still selected in the dropdowns. In the image below, an example wavelength window of +/- 100nm is used to demonstrate the highlighting functionality.
Set the Wavelength window value to +/-10nm and the Max. Points to 10 if not already. Once the desired averaging settings are set, press Calculate.
6. Refine the Results
After the averaging calculation is performed, the text boxes in the Results section populate. TMT requires that these four results text boxes have numerical values before export, so adjust or add data to the Results text boxes if necessary. These text boxes are editable to the user at any time.
Note the status messages to the right of the results. There are four possible Status messages: “Avg. of X points”, “Estimated”, “User-Defined”, and “No data available”. These messages signify that the value has been calculated as an average of ‘x’ data points, been sourced from the Estimated Values library (see ‘Missing and Estimated Data’ section of the article below), or the TMT cannot supply this result, respectively.
7. Export the Tissue Properties
Once the results are acceptable to the user, click the Export to Object button.
A popup window will confirm that the export was successful. The same TMT can be used to export more tissue data, or the TMT can be closed. In the NSC Editor, the TMT will prepend a comment to the Object’s Comment column to note what tissue (and tissue subtype, if applicable) have been applied.
Along with the model index set in the NSC Editor, the scattering properties of the tissue object can be seen in its Object Properties...Volume Physics tab. Note that you will need to exit the TMT to access the main OpticStudio window, which includes the Object Properties located in the settings of the NSC Editor. The Mean Path and Transmission values are calculated from the averaged data as shown in previous OpticStudio tissue optics example: How to model the human skin and optical heart rate sensors in OpticStudio – Ansys Optics.
8. Continue Setup
Repeat steps 4-8 for the remaining three layers: dermis (object 5), subdermis (object 6), subcutaneous adipose (object 7). Note that while the epidermis, dermis, and subdermis are listed as subtypes of the 'Skin' tissue type in the TMT, subcutaneous adipose is listed as its own individual Tissue type, and therefore filters are not necessary to apply subcutaneous adipose data.
Update the NSC Shaded Model window to see the scattering effects.
9. Refine system design
With the index, scattering, and absorption properties applied to the NSC objects, the optical design work can continue by adjusting the lens system to meet system requirements. See other tutorials on system optimization in non-sequential mode: How to optimize non-sequential optical systems – Ansys Optics.
Importing Data
The sources in the default library serve as a starting point for a broad range of tissues, but the library is not exhaustive. If the user finds a data source they would like to include, the data can be imported into the TMT.
In the User Definitions section of the TMT, click the Import Data button to open a file explorer window. The TMT accepts .CSV files in the format below, however, a template of the .CSV file is also included in Tissue Data folder of the .ZIP file attached to this article.
Data Format Definitions & Example | |
|---|---|
| Glossary of symbols | μa [mm-1]: Coefficient of absorption μs' [mm-1]: Reduced Coefficient of scattering μs [mm-1]: Coefficient of scattering g [unitless]: Anisotropy n [unitless]: index of refraction |
| Data Template | “Tissue, Status, Wavelength [nm], μa [mm-1], μs' [mm-1], μs [mm-1], g, n, Author, Year, Demographic, Pathology, Extra Information, Source, Citation” |
| Example scenario | A datapoint of tumorous ex vivo 'Funny Bone' measured at 405 nm, where the μa (0.123 mm-1), μs(23.4 mm-1), and anisotropy (0.88) were reported in an article titled ‘Optical Properties of the Funny Bone’ by J. Smith et al., published in Journal of Bio. in 2012. |
| Example scenario in template .csv format | “Funny Bone, ex vivo, 405, 0.123,,23.4, 0.88,, Smith, 2012,,Tumor,,User-Library, Smith et al. ‘Optical Properties of the Funny Bone’ Journal of Bio.” |
| Note on 'Extra Info.' of example scenario |
To ensure that this example placeholder data is not accidentally used in the future as real ‘Bone’ data, the example defines the Tissue as ‘Funny Bone’. However, this example could have also been formatted with the Tissue type classified as ‘Bone’ and the type of bone (‘Funny Bone’) specified in the ‘Extra Information’, like so: “Bone, ex vivo, 405, 0.123,,23.4, 0.88,, Smith, 2012,,Tumor, Funny Bone, User-Library, Smith et al. ‘Optical Properties of the Funny Bone’ Journal of Bio.” |
Once the .CSV file is selected, click OK. A popup window will confirm the status of the imported data.
Upon successful import, the data will populate the User-Defined Library in your "...Zemax\Extensions\TissueData" folder. The Default Library and the User-Defined library are kept separate to keep the Default Library as read-only, while the "User-DefinedLibrary.csv" file can be opened and modified by the user. Imported data will remain present and available on the local machine unless manually deleted from the "User-DefinedLibrary.csv" file.
You can now see the imported data in the Tissue dropdown menu, and the accompanying data in the plots and data grid below.
Missing and Estimated Data
In many cases, the literature reports the coefficients versus wavelength, but the corresponding anisotropy or refractive index data is not included. In these situations, the TMT utilizes an Estimated Values library, which provides a baseline refractive index and anisotropy value to use when more specific data is missing. Also sourced from literature, there are estimated refractive index and anisotropy values for many tissue types, but not all.
When an Estimated Value is used, the Status label to the right of the calculated esults text box notes that it has been ‘Estimated’. If there is no estimated value available for that tissue type, the corresponding results text box will remain blank and the status will say there is ‘No data available’. At this point, the user should supply data in the results text boxes.
Conclusion
The TMT serves to streamline the process of managing and applying tissue optical properties to OpticStudio simulations. In this article, we have discussed how data is handled by the TMT, how to use the TMT to apply optical property data to NSC objects, and how to import data.
If issues are encountered while using the TMT, or the user believes a literature data source would be useful to include in the default library for all users, reach out to OpticStudio support.
Note: It is always recommended to check the citations of the tissue data for yourself. If data from the TMT is used to simulate a system for publication, remember to cite the sources specific to your filtered tissue data points.
Additional Resources
How to model the human skin and optical heart rate sensors in OpticStudio – Ansys Optics
Tech Tip Tuesdays with Zemax: Human Tissue Modeling | Zemax Community
How to create a User-Extension: Converting from Chebyshev to Extended Polynomial – Ansys Optics