A computational system for dosimetry
By designing a dosimetry calculation system, the problem that PyRadiomics cannot handle DICOM format dose files was solved, realizing convenient dosimetry calculation and batch processing, improving the system's ease of use and computational efficiency, and supporting graphical interface operation and batch data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-04
- Publication Date
- 2026-04-03
AI Technical Summary
Existing dosimetry feature extraction systems, such as PyRadiomics, are not specifically designed for radiotherapy planning, cannot directly process DICOM format dose files, and lack ease of use and batch processing capabilities, which affects the application of dosimetry.
A dosimetry calculation system was designed, including a dose file reading module, a structure mask file reading module, a configuration parameter file reading module, and a dosimetry calculation module. It utilizes open-source packages such as SimpleITK, dcmrtstruct2nii, and openpyxl to achieve DICOM format conversion and graphical interface operation, and supports batch processing.
It enables convenient processing and batch calculation of DICOM format dose files, improving the ease of use and computational efficiency of dosimetry. It supports graphical interface parameter adjustment and batch processing, and is suitable for machine learning model training.
Smart Images

Figure CN116052838B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a system for calculating dosimics information for radiotherapy planning. Background Technology
[0002] Dose distribution is crucial information in radiotherapy planning, as it is closely related to the efficacy and adverse reactions of radiotherapy. The most commonly used dose distribution indicator is the dose-volume histogram (DVH), which uses histogram statistics to reduce the three-dimensional dose distribution information to one-dimensional information. DVH is associated with radiotherapy prognosis; however, due to its overly simplistic representation of dose, it has limitations in predicting efficacy and adverse reactions.
[0003] In recent years, a new dose distribution index called dosimetry has been proposed. Dosimetry refers to the high-throughput extraction of a large amount of dose information from a segmented specific tissue, and in-depth mining of dose characteristics. After extracting dosimic features, they can be used for model training to analyze and predict the efficacy and toxic side effects of radiotherapy.
[0004] Dosimetry methods have been proven to extract three-dimensional dose information more effectively, but mature and user-friendly system architectures and related software are lacking for their application and computation. Designing an efficient and feature-rich dosimetry feature extraction scheme and software would facilitate the more convenient and flexible use of dosimetry.
[0005] Dosimics feature extraction can be achieved using the open-source Python package PyRadiomics. However, this package was not specifically developed for dosimics; its original purpose was for radiomics feature extraction, not dosimics. Radiomics extracts information from medical images, with input files including CT, MRI, and ultrasound. Dosimics, on the other hand, uses dose information from radiotherapy plans. The content and file format of dose information differ from image information; therefore, when using PyRadiomics to calculate dosimics, additional processing of the dose file is required, such as… Figure 1 As shown in (A).
[0006] Regarding input file formats, PyRadiomics can only recognize image data in ".nrrd" and ".nii" formats, which are commonly used in image data applications. However, for radiotherapy dose files, the most common format is Digital Imaging and Communications in Medicine (DICOM). PyRadiomics cannot recognize this format, which means that additional processing of the dose file is required before using PyRadiomics to calculate dosimetry.
[0007] Furthermore, PyRadiomics has significant room for improvement in terms of usability. Firstly, the package requires command-line or Python code to execute; secondly, batch processing multiple cases using PyRadiomics also requires additional code; and thirdly, although PyRadiomics has a collaborative image interface, this method cannot perform dosimics analysis or batch processing. This method calls a software plugin called Slicer. Because Slicer requires pre-loading image files, and dose files and image files have different identifiers, Slicer cannot perform dosimics calculations.
[0008] The additional processing of dosage files mentioned above, as well as the requirements for ease of use and functionality, all necessitate the development of corresponding Python programs. However, programming has a certain learning curve, which affects the application of dosimetry. Summary of the Invention
[0009] The technical problem to be solved by this invention is that the extraction of dosimics features can be achieved with the help of the Python open-source package PyRadiomics, but this package is not specifically developed for dosimics.
[0010] To solve the above-mentioned technical problems, the technical solution of the present invention is to provide a dosimetry computational system, characterized in that it includes:
[0011] The dose file reading module is used to read DICOM format dose files and convert them into dose files that can be recognized by the open-source package PyRadiomics, thereby obtaining the dose of each grid point on the three-dimensional coordinates.
[0012] The structure mask file reading module is used to read the structure file and obtain the mask of the region of interest, and generate a structure mask file that can be recognized by PyRadiomics. It determines whether each grid point is inside the outline of the region of interest based on the dose grid, and can obtain the mask of the region of interest.
[0013] The configuration parameter file reading module is used to generate a configuration parameter file based on the relevant configuration information entered by the user on the human-computer interaction interface;
[0014] The dosimetry calculation module is used to input the dose file generated by the dose file reading module, the structure mask file generated by the structure mask file reading module, and the configuration parameter file generated by the configuration parameter file reading module into the open-source package PyRadiomics, and then PyRadiomics calculates the dosimetry features.
[0015] The dosimetry output module is used to store the dosimetry features obtained by the dosimetry calculation module at a user-specified address.
[0016] Preferably, the dose file reading module calls SimpleITK to read the dose file in DICOM format and converts the dose file format from DICOM to nii format.
[0017] Preferably, the structure mask file reading module calls dcmrtstruct2nii to generate a structure mask file in nii format, and modifies the image grid used for segmentation mask in dcmrtstruct2nii to a dose calculation grid.
[0018] Preferably, the dosimetry output module calls openpyxl to store the dosimetry features in Excel format at a user-specified address.
[0019] This invention designs a simple and easy-to-use dosimics calculation scheme and develops corresponding software, enabling convenient dosimics calculations. The software uses a graphical interface, providing visualization of parameter adjustments. Furthermore, this invention can perform batch processing by folder, satisfying the needs of batch processing a large number of cases, which is beneficial for subsequent machine learning model training and application.
[0020] This invention is user-friendly, integrating preprocessing of dose and structure files into the software to facilitate convenient dosimics calculations. It employs a graphical interface, enabling visualization of parameter adjustments. Furthermore, it allows for batch processing by folder, satisfying the needs of processing large numbers of cases. Attached Figure Description
[0021] Figure 1 The algorithm flow is illustrated, where (A) is the usage flow without the present invention, (B) is the usage flow of the present invention, and (C) is the usage flow of the software of the present invention.
[0022] Figure 2 The main interface of the dosimetry extraction tool is shown.
[0023] Figure 3This indicates that the results will be fed back to the user;
[0024] Figure 4 The feedback results of the configuration parameters are shown;
[0025] Figure 5 The dosimetry feature file is shown.
[0026] Figure 6 This shows the result of saving the file. Detailed Implementation
[0027] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.
[0028] This invention discloses a dosimics computational system implemented in Python, utilizing the open-source package PyRadiomics. PyRadiomics is currently the most commonly used radiomics feature calculation package, offering reliable results and high computational efficiency; most radiomics-related research and software utilize PyRadiomics for calculations. The definition of dosimics features is identical to that of radiomics, except that the input image file is replaced by a dose file, and the analysis of the image is changed to dose analysis. Since the extraction formula for dosimics features is consistent with that of radiomics, using the radiomics package PyRadiomics for dosimics calculation is reasonable. In addition to PyRadiomics, this invention also utilizes open-source packages such as pydicom, SimpleITK, dcmrtstruct2nii, and openpyxl for preprocessing dose and structure files and storing the results.
[0029] PyRadiomics has three types of input files: medical image files (such as CT, MRI, etc.), structural mask files for the region of interest (ROI), and configuration parameter files (such as resampling grids, feature categories to be extracted, etc.). These three aspects will be described in detail below.
[0030] The first type of input file is an image file, which is replaced by a dose file when used for dosimetry calculations. The image file information used by PyRadiomics is the value of each grid point on a three-dimensional coordinate system (grayscale values for CT and SUV values for PET). When used for dosimetry calculations, the corresponding information required is the dose at each grid point on a three-dimensional coordinate system. This information is fully stored in a DICOM format dose file, which can be read using SimpleITK and converted to a nii format that PyRadiomics can recognize.
[0031] The second type of input file is a structure mask file. The Region of Interest (ROI) is stored in DICOM format as 3D coordinates of contour points. Based on the dose grid, it is determined whether each grid point is inside the ROI contour to obtain the mask for that ROI. This process can call the dcmrtstruct2nii package to generate a structure mask file (nii format) recognizable by PyRadiomics. Comparison shows that calling dcmrtstruct2nii for mask generation is more efficient than other methods. This part of the dcmrtstruct2nii call does not use the package's source code, but rather modified code. This is because the original package uses an image grid for mask segmentation, which needs to be changed to a dose calculation grid.
[0032] The third type of input file is a configuration parameter file. In this invention, the configuration can be selected by the user on the graphical interface and stored as a text file for PyRadiomics to call.
[0033] Finally, after performing dosimetry feature extraction, openpyxl is called to store the results in Excel format at a user-specified address.
[0034] The usage process of this invention is as follows: Figure 1 As shown in (B), select the folder containing the standard DICOM format dose and structure files on the software graphical interface, select the configuration parameters for the analysis content on the software graphical interface, and finally obtain the required dosimics characteristics.
[0035] The flowchart of this invention is as follows Figure 1 As shown in (C), after opening the software, select the target folder, then select the various configuration parameters, and click Execute to obtain the required dosimics characteristics. The entire process is very simple and convenient, which is conducive to the application of dosimics and the promotion of dosimics-related research.
[0036] This invention mainly consists of three parts ( Figure 2 First, check the DICOM file and structure; second, confirm the parameters and save; third, calculate the features and export.
[0037] The first part involves selecting the folder containing the cases to be analyzed (recursive reading is possible). First, the total number of cases in the folder is analyzed and recorded. Cases lacking dose or structure files, or containing two or more of these files, are removed. Second, it is checked whether the structures from which the features need to be extracted exist in all the recorded cases. If a case lacks the relevant structure, it is removed. Finally, the results are displayed to the user in a pop-up window.
[0038] The second part involves selecting and confirming the feature extraction configuration file. On the software interface, select the required basic parameters, image type, and feature type. The "Resampling" option is set to "No" by default. The resampling algorithm and grid will only take effect when this option is selected as "Yes." After selecting all parameters, click "Confirm Parameters and Save" to save the configuration parameters to a text file, and a pop-up window will provide feedback to the user.
[0039] The third part involves calculating and exporting dosimics characteristics. Click "Calculate Characteristics and Export" on the software interface; a pop-up window will allow you to select the file to save and its location. After completion, save the dosimics characteristics to an Excel file.
[0040] The main interface of this invention is as follows Figure 2 As shown, the main functional modules are divided into three parts: 1) checking DICOM files and structures, 2) confirming parameters and saving, and 3) calculating features and exporting. The final results are stored in the specified location in the form of an Excel file.
[0041] First, click "Browse" in the upper right corner and select the folder containing the case data. In the "Structure for Feature Extraction" field, enter the structures you want to study, separating multiple structures with commas. Click "Inspect Folder and Structure" to check the data and structures in the folder and receive the results back to you. Figure 3 As shown.
[0042] Next, click "Select Configuration Parameters" to choose the configuration parameters. For basic parameters, you need to select and fill in the following: "Resampling" (single selection), Resampling Algorithm (dropdown selection), Resampling Grid (fill in), Step Size (fill in), and Label (fill in). "Resampling" defaults to "No". The resampling algorithm and grid will only take effect when this option is selected as "Yes". Step Size refers to the statistical step size used in the calculation, with a default value of 25. Label refers to the label used by the structure mask. The default value is 255. Image Type and Feature Type are multi-selectable; select the items you want to analyze. Log images have an additional parameter sigma; enter the required number (e.g., 1.0, 3.0, etc.). After selecting all parameters, click "Confirm Parameters and Save" to save the configuration parameters to a text file and display a pop-up message to the user. Figure 4 As shown.
[0043] Finally, click "Calculate Features and Export". A pop-up window will appear, allowing you to select the export file location. The software will then perform dosimetry calculations and save the results as an Excel file. An example of the output file is shown below. Figure 5 For each structure, create a workbook named after that structure. Within a single workbook for a structure, the first three columns should be the image category, feature category, and feature name; the subsequent columns should contain the dosimetry feature values for each case. A pop-up window should then be displayed to provide feedback to the user upon completion. Figure 6 As shown.
Claims
1. A computational system for dosimetry, characterized in that, include: The dose file reading module is used to read the DICOM format dose file and convert it into a dose file that can be recognized by the open-source package PyRadiomics, thereby obtaining the dose of each grid point on the three-dimensional coordinates; the dose file reading module calls SimpleITK to read the DICOM format dose file and convert the dose file format from DICOM format to nii format; The structure mask file reading module is used to read the structure file to obtain the mask of the region of interest and generate a structure mask file that can be recognized by PyRadiomics. It determines whether each grid point is inside the outline of the region of interest based on the dose grid to obtain the mask of the region of interest. The structure mask file reading module calls dcmrtstruct2nii to generate a nii format structure mask file and modifies the image grid used for segmentation mask in dcmrtstruct2nii to a dose calculation grid. The configuration parameter file reading module is used to generate a configuration parameter file based on the relevant configuration information entered by the user on the human-computer interaction interface; The dosimetry calculation module is used to input the dose file generated by the dose file reading module, the structure mask file generated by the structure mask file reading module, and the configuration parameter file generated by the configuration parameter file reading module into the open-source package PyRadiomics, and then PyRadiomics calculates the dosimetry features. The dosimetry output module is used to store the dosimetry features obtained by the dosimetry calculation module at a user-specified address.
2. The dosimetry computational system as described in claim 1, characterized in that, The dosimetry output module calls openpyxl to store dosimetry features in Excel format at a user-specified address.
Citation Information
Patent Citations
Device and method for early warning acute radiation esophagitis toxicity during lung cancer radiotherapy
CN114496272A