Radiomics system and method
The system improves mammography by processing digital images to highlight obscured tumor features in dense breast tissue, enhancing diagnostic accuracy and reducing false positives.
Patent Information
- Application Number
- JP2024534133
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-08-12
- Filing Date
- 2022-08-09
- Publication Date
- 2024-09-18
AI Technical Summary
Mammography, a crucial medical imaging technique, faces challenges in detecting cancer in women with dense breast tissue due to dense tissue obscuring tumor features, leading to false positives, unnecessary biopsies, and increased health and operational costs.
A system that processes digital mammography images by converting attenuation values to grayscale, identifying distinct gradients, and recursively defining boundaries to highlight obscured tumor masses, using iterative processes to enhance and overlay these regions, thereby revealing hidden morphological details.
Enhances the visibility of tumor features in dense breast tissue, reducing false positives and improving diagnostic accuracy, thus minimizing unnecessary procedures and costs.
Smart Images

Figure 2024534258000001
Abstract
Description
[Technical field]
[0001] REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to U.S. Patent Application No. 17 / 400,616, filed August 12, 2021, and U.S. Provisional Patent Application No. 63 / 231,697, filed August 10, 2021, both of which are entitled “Radiomic Systems and Methods.” U.S. Patent Application No. 17 / 400,616 is a continuation-in-part of U.S. Patent Application No. 16 / 890,496, filed June 2, 2020, entitled “Digital Image Analysis And Display System Using Radiographic Attenuation Data,” which in turn is a continuation-in-part of U.S. Patent Application No. 16 / 428,125, filed May 31, 2019, entitled “Digital Image Analysis And Display System Using Radiographic Attenuation Data.” This continuation application claims the benefit of priority to U.S. Provisional Patent Application No. 62 / 678,644, entitled “Radiologic Image Viewer,” filed May 31, 2018. All teachings of the foregoing applications and patents are incorporated herein by reference.
[0003] A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction of this patent document or any of the patent disclosure, as appearing in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever. [Background technology]
[0004] 2. Background of the Invention
[0005] The first X-ray image of a human body part (a hand) was taken in 1895, thus beginning the field of radiology. A few years later, one of the first applications in medical diagnosis was shown: a penny stuck in a child's throat. However, using X-rays to distinguish soft tissue features proved to be more difficult, because the attenuation of X-rays (the relative amount they pass through tissue depending on density) was very faint and difficult to distinguish in the "X-ray" and in the resulting black. It took many years before the first mammography machines were used commercially to detect masses in breast tissue. These mammographs used X-ray film. Digital mammography was introduced in 1972, and by the 1990s digital mammography had become standard medical practice (despite misgivings about some of the hidden details that caused discredit from some scientists during the transition from analog imaging). Summary of the Invention [Problem to be solved by the invention]
[0006] Currently, 40 million digital mammograms are taken in the United States each year, with over 50% using an advanced 3D digital mammography technique called tomosynthesis. Digital mammography has proven to detect cancer early and is the only screening method approved by the U.S. Food and Drug Administration. However, mammography suffers from persistent shortcomings, including early detection leading to follow-up scans or unwarranted biopsies, and too many false positives, which lead to increased scrutiny. These two issues result in adverse health outcomes for women and increased operational and litigation costs for health care providers. In light of these trends, several ongoing studies are reexamining the appropriateness of the screening regimens recommended for all women.
[0007] For the majority of patients, mammograms work well, but 40 percent of women have dense breast tissue that can "mask" cancer on black-and-white mammograms. This is true because both tumors and naturally occurring dense breast tissue appear white on black-and-white mammograms. Naturally occurring dense tissue obscures the morphological characteristics of tumors, making it more difficult for radiologists to see the gradation of grayscale that extends from the center of the mass, which is typically the densest, to the periphery, which is typically less dense. It also makes it difficult to see the elongated tentacles and thorns or dots called spiculations that indicate aggressive growth, which are hallmarks of malignant tumors. Importantly, women with dense breast tissue also have a higher natural incidence of cancer, and therefore the need for better screening methods is even greater for these women.
[0008] Although mammography is an important application of radiological imaging, there are many other applications of medical imaging that suffer from the shortcomings of the prior art.
[0009] It is an object of the present invention to provide improved systems, devices and methods for medical applications, and more particularly for digital diagnostic imaging.
[0010] It is another object of the present invention to provide such improved systems, devices and methods suitable for medical diagnosis and / or treatment.
[0011] It is a further related such object of the present invention to provide such improved systems, apparatus and methods for medical diagnosis and / or treatment which overcome the above-mentioned shortcomings of the prior art. [Means for solving the problem]
[0012] Summary of the Invention
[0013] The present invention provides systems, apparatus and methods for digital image processing that provide, for example, highlighting of elements of images generated from X-ray and other imaging modalities that are characterized by attenuation data converted into a grayscale digital format. The present invention relates to Captures the attenuation values used to render a digital image and uses that data to identify distinct gradations of grayscale, for example incorporating grayscale data within and beyond the spectrum of human vision. Then, recursively define boundaries based on the gradient range to form an irregular multi-layered visual object with defined inner contours and outer boundaries; and highlighting each defined layer and superimposing the highlighting onto a corresponding area of the original image; Thereby revealing potential morphology of the mass that was previously obscured, hidden or "masked" from human vision. The invention works for all digital images produced by attenuation values (i.e. x-ray and sound waves).Currently, the invention is used to display organ masses in medical x-ray images such as mammograms and to aid in diagnostic interpretation.
[0014] In other aspects, the present invention provides systems, devices and methods, such as those described above, comprising: walking a perimeter of a shape in the medical image and generating a list of coordinates that define the perimeter; Dividing the list into groups of coordinates separated by inflection points on the perimeter; determining a span to length ratio for each group of coordinates, where "span" means the Cartesian distance between the endpoints of each group, and "length" means the total distance measured traveling along the path defined by each group; determining a percentage of the perimeter that each of the groups having the selected span-to-length ratios comprises; - enhancing the medical image or identifying the morphology of tissue imaged in the medical image as a function of said respective percentages; Includes.
[0015] Yet other aspects of the invention provide systems, devices and methods, such as those described above, comprising: Normalizing pixel intensities within a region of interest of the medical image; determining an average intensity of pixels within a shape that is at least partially, if not entirely, contained within the region of interest; determining percentile rankings where the average is relative to the normalized intensity of the pixel; and either enhancing a medical image as a function of percentile ranking or identifying the morphology of tissue imaged within the medical image; Includes.
[0016] Yet other aspects of the invention provide systems, devices and methods, e.g., as described above, comprising: Locating the centers of a series of concentric circular masses identified in the medical images; determining the longest and shortest diameters of a series of concentric circular shapes; Identifying the strongest shape within a set of concentric circular shapes; Locating the center of a shape mass; determining the relative percent centralized distance as a function of the distance between the centers of the masses and as a function of the maximum and minimum diameters; either enhancing the medical image or identifying the morphology of tissue imaged in the medical image as a function of the relative centralization distance percentage; Includes.
[0017] Yet other aspects of the invention provide systems, devices and methods, e.g. as described above, comprising: determining a series of one or more concentric circular bounding boxes identified within the medical image; Dividing the bounding box into a number of equally sized regions; determining a count of pixels within each region that are either above, below, or within one or more threshold intensities; comparing the determined pixel count for each region with the pixel count for each other region across one or more of: i) the X-axis as a line of symmetry; (ii) the Y-axis as a line of symmetry; and (iii) a diagonal line combining the X-axis and the Y-axis as a line of symmetry; determining a degree of balance of the series of concentric circular shapes by summing the results of the comparison; enhancing the medical image or determining the morphology of tissue imaged in the medical image as a function of the degree of balance. This includes:
[0018] Other aspects of the invention provide systems, devices and methods, such as those described above, comprising: determining a count of shapes in a series of concentric circular shapes identified in the medical image; either enhancing the medical image as a function of the counts or identifying a morphology of tissue imaged in the medical image; Includes.
[0019] These and other aspects of the invention are apparent from the drawings and description that follow.
[0020] The patent or application file contains at least one color drawing. Copies of this patent or patent application publication with color drawing will be provided by the Office upon request and payment of the necessary fee.
[0021] A more complete understanding of the illustrated embodiments can be achieved by reference to the drawings: [Brief description of the drawings]
[0022] [Figure 1]FIG. 1 illustrates a system 10 according to one embodiment of the present invention and the environment in which the present invention may be implemented; [Diagram 2] FIG. 2 is a flow chart outlining a process according to the present invention for image analysis; [Diagram 3] FIG. 3 is a flow chart illustrating the capture of attenuation values in a system according to the present invention; [Figure 4] FIG. 4 is a flow chart illustrating the identification of sequential groupings of major grayscale ranges in a system according to the present invention; [Diagram 5] FIG. 5 is a flow chart illustrating polygon creation and reordering and tissue density gradient contouring in a system according to the present invention; [Figure 6] FIG. 6 is a flow chart illustrating the assembly of spatially related polygons reflecting tissue morphology in a system according to the present invention; [Figure 7] FIG. 7 is a flow chart illustrating rating, measuring, highlighting, and displaying constructed polygons in a system according to the present invention; [Figure 8] FIG. 8 is a flow chart illustrating the creation of searchable criteria for polygons stored as morphologically related in a system according to the present invention; [Figure 9] FIG. 9 shows a radiology scan without and with a pop-up utility window for image enhancement according to the present invention; [Figure 10] FIG. 10 shows consecutive groupings at a single greyscale value that reveal contoured shapes called Growth Rings (GR) in a system according to the invention; [Figure 11] Figure 11 shows a conceptual PGM (Pixel Gradation Mass) and the PGM displayed on a mammogram with converging outward growth points; [Figure 12] FIG. 12 is an illustration of concentric rings representing growth rings seen in a mass on a mammogram in a system according to the present invention; [Figure 13] FIG. 13 shows a mammogram with and without the pop-up utility for image enhancement according to the present invention; [Figure 14] FIG. 14 shows that in the system according to the invention, a certain number of growth rings are identified and delineated to define the contour and size of the PGM; [Figure 15] FIG. 15 shows that in the system according to the invention, the density of the mass is determined by calculating the average area that increases as the GR extends outward; [Figure 16] FIG. 16 shows that in a system according to the invention, the whiteness of the PGM is determined by the luminance of the central GR; [Figure 17] FIG. 17 is a diagram illustrating changing the settings of a pop-up utility window in a system according to the present invention; [Figure 18] FIG. 18 illustrates a method for quantifying and characterizing growth ring piculation according to the present invention; [Figure 19] FIG. 19 illustrates a method for determining normalized pixel density according to the present invention; [Figure 20] FIG. 20 illustrates the relative centralized distance percentage determination method according to the present invention; [Figure 21] FIG. 21 illustrates a balance determination method according to the present invention; [Figure 22] 22A-22D show a balance determination method according to the present invention; and [Figure 23] FIG. 23 illustrates a method for determining polymorphism according to the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0023] DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS
[0024] Figure 1 - Architecture
[0025] 1 illustrates a system 10 according to one embodiment of the present invention and the environment in which it may be implemented. The illustrated system 10 includes a server digital data device 12 coupled via a network 20 to one or more client digital data devices 14-18.
[0026] Server digital data device 12 includes a mainframe, minicomputer, workstation, or other digital data device of a type known in the art that is adapted in accordance with the teachings herein to perform the functions attributed to device 12 in the discussion below and elsewhere herein. Server 12 may include a stand-alone device or may be co-housed with other devices of the type shown herein or otherwise.
[0027] The client digital data devices 14-18 include workstations, desktop computers, laptop computers, portable computing devices, smartphones, or other digital devices of a type known in the art that are adapted in accordance with the teachings herein to perform the functions ascribed to those devices 14-18 in the discussion that follows and elsewhere herein. One or more of the clients 14-18 may include standalone devices or may be co-housed with other devices of the type shown herein or otherwise. As a non-limiting example, in some embodiments, one or more of the clients 14-18 may include or be co-housed with a medical imaging device, such as, by way of non-limiting example, a CT scanner, a tomosynthesis device, etc., while in the same or other embodiments, other such clients may include or be co-housed with a personal digital assistant, a smartphone, etc.
[0028] The client devices 14-18 may each be coupled to a graphical display 14A-18A or other output device of a type known in the art (whether integral with the clients 14-18, networked thereto, or otherwise) adapted in accordance with the teachings herein for displaying and / or otherwise presenting still and / or video images analyzed by the devices 14-18, and possibly also still and / or video images analyzed by the server 12. The server 12 may likewise be coupled to such a graphical display (not shown) if desired or necessary.
[0029] Network 20 may include a local area network, a wide area network, a metropolitan network, the Internet, and / or other network or communication medium (wireless, wired, or other) or combinations thereof of a type known in the art adapted in accordance with the teachings herein to support the transfer of information (real-time or otherwise) between the devices depicted.
[0030] It will be understood that the embodiment depicted in FIG. 1 and described above is illustrative that the present invention may be practiced in other embodiments than those depicted herein. Thus, while the drawings show one server and three client devices as a non-limiting example, it will be understood that this is exemplary and other embodiments may include a greater or lesser number of any of these devices. It will further be understood that in some embodiments, operations assigned herein to the server 12 may be performed by one or more of the clients 14-18 acting individually or in concert, and conversely, operations assigned to the client devices 14-18 may be performed by the server 12.
[0031] Operational Overview
[0032] The following describes the method of operation of the client devices 14-18 for image analysis in accordance with the present invention. Programming such devices 14-18 for such purposes is within the knowledge of those skilled in the art in view of the following discussion and elsewhere herein. As will become apparent from the following discussion, the devices may operate independently without the assistance of the server 12.
[0033] FIG. 2 is an overview of the method of the present invention for image analysis and / or enhancement on a client device. The illustrated method captures attenuation data within a specified region provided by a digital image acquisition device (step 101). The illustrated method performs image analysis by first identifying the dominant grayscale values within a specified range within a region of the image or across an image such as a full-sized mammogram (102). Using an iterative process deployed by the capabilities of a computer, the illustrated method scans the specified region for gradation boundaries of the dominant grayscale range, traces those boundaries, and draws continuous lines. In a best embodiment, the illustrated method uses the same iterative process for each grayscale range (4, 8, 16, 32, 64, 128, 256) that is applied to the same digital image or to the specified region of the digital image. This results in hundreds of thousands of individual rendered polygons, initially rendered at various bit levels, each polygon defined by connecting adjacent pixels within the dominant grayscale range. This is done with or without closure functions. (103) The illustrated method uses an iterative process deployed by a computational facility to inventory all polygons and eliminate duplicates formed at different bit levels. Using the same iterative process, the illustrated method sorts the polygons and assembles a multipolygon object using individual polygons that share a spatial relationship with one another. (104) The illustrated method measures the properties and size of the assembled multipolygon object and applies an enhancement to each of the constituent polygons that corresponds to a grayscale range derived from the original attenuation values assigned by the image acquisition device, thereby using the enhancement to highlight the grayscale gradients that correspond to tissue density. (105) The illustrated method displays the enhanced multipolygon object as a digital representation of a tissue mass and provides metrics of the mass's polygon layer count (AQ-attenuation quotient) as well as its estimated diameter, area and volume.(106) Multipolygon “masses” can be displayed with or without the surrounding background to enhance visual analysis and can be stored in a morphological database in which other multipolygon objects are stored, allowing retrieval and comparison with other multipolygon tissue masses.
[0034] Capture the attenuation value
[0035] With reference to FIG. 3, the system and method according to the present invention (hereinafter collectively referred to as "system" or "method" unless otherwise clear from the context) captures digital grayscale values based on attenuation data recorded by a radiological image acquisition device, i.e. a mammography X-ray device, in both 2D and 3D. The data is displayed in a digital format that currently supports up to 1024 grayscale steps. The system converts the grayscale values to 256, which is considered the best mode for processing digital mammography images; however, the system can use a grayscale range of 4 and process up to the currently defined upper limit of 1024 grayscale. For mammography purposes, the captured images are processed to comply with DICOM format requirements. However, the system can convert any digital image format, i.e. jpeg, gif, png, bmp and other digitized formats.
[0036] Identify the dominant Grayscale Range Sequential Grouping (GRSG).
[0037] Referring to FIG. 4, the system according to the invention scans the grayscale spectrum of a specified region of an image or the entire image when designated for analysis such as a full-scale mammogram. Using pixel-by-pixel analysis, the system determines the top four most common consecutive Grayscale Range Sequential Groupings (GRSGs) used in the designated region. (102:1) This iterative process can be used to determine the top three common GRSGs or can be used to identify more than four GRSGs. A preferred mode of use for digital mammography is to use four GRSGs and perform image analysis of the designated region at each grayscale range from 4 to 256. For image analysis at larger grayscales (512 and above), a larger number of GRSGs can be identified, reflecting greater granularity.
[0038] Create and sort polygons that outline tissue density gradients
[0039] Referring to Figure 5, using an iterative process deployed by the computer's capabilities, the system according to the present invention uses the four GRSGs to define and trace the grayscale gradient edges within the specified area to form a continuous line that outlines the shape of the polygon. This is done by using the computer's iterative capabilities to connect adjacent pixels to the path of the emerging polygon by following the value ranges of the GRSGs to define the outer x / y path. Optionally, edge detection can be used to rectify the polygon instead of the GRSG method defined above.
[0040] The system creates a polygon without closure and saves the result. The system then applies closure to the outer boundary of the resulting polygon by tracing it and correcting potential x / y path anomalies, thereby closing gaps in pixel runs that are smaller than 0.09 percent in either width or height. If this results in a pixel value below 20, it uses a pixel value above 20. The process of the present system described here represents the current best mode for mammography. Other cutoff values may be used when performing closure.
[0041] Our method uses an iterative process, defining a GRSG for each grayscale level, then tracing polygons at those levels--4, 8, 16, 32, 64, 128, and 256. The method uses closures as described above, storing the results, and creates hundreds of thousands of individual polygons.
[0042] A computational iterative process is used to sort the large number of polygons that are initially created, removing: 1) overlaps produced by different grayscale levels and closures, and 2) polygons that assume shapes that exceed tolerance parameters set by ratios that define abnormal polygon morphologies that cannot represent the tissue mass of interest (i.e., physical barriers such as breast implants, implanted devices, edges of the mammogram, or known artifacts of compression in mammograms, etc.). The method sequentially sorts polygons by their average original grayscale value, and in the case of the same grayscale value, orders the size from smallest to largest.
[0043] Assemble spatially related polygons; reflect tissue morphology
[0044] With reference to FIG. 6, the system according to the invention uses an iterative process developed by a computer, e.g. 14-18, to assemble polygons into a multi-polygon object that reflects the tissue morphology of the mass contained in a specified area, i.e., the area defined by the visualization window, or the entire mammogram. Using the iterative capabilities of the computer, the system assembles ("stacks") mutually containing polygons that overlap the same x / y area. The system performs the ordering based on a "child-parent" relationship that orders the stack of polygons based on a hierarchy that corresponds to a density gradient. The polygon that registers the highest density is located at the center of the mass. This reflects the fact that malignant masses generally have a dense center, and malignant tissue radiates from that center with decreasing density. The system uses an iterative process developed by the computer to assemble these polygons from dense to sparse, from smallest to largest, so that the denser polygons fit within the boundaries of the sparse polygons. As a result, there are multiple denser polygons within the boundaries of the sparse polygons, reflecting the complexity of the tissue morphology.
[0045] Rating, measuring, highlighting and displaying assembled polygons
[0046] 7, using an iterative process using a computer, e.g., 14-18, the system according to the invention records the total number of polygons that make up the completed "mass" and presents it as a rating value called the "Attenuation Quotient" (AQ). In the case of multi-deformed polygons (those with high density among those with low density), the AQ displayed is that of the stack with the highest density polygon.
[0047] The system uses a computer to measure maximum, mean and minimum diameters using pixel counting and converts these measurements to image acquisition millimeters / centimeters as defined in the DICOM file or other standardized data. Using a similar pixel counting process, the invention calculates the area of the largest polygon of the mass. For three-dimensional images, the area of the mass as seen in successive tomosynthesis slices is factored by the computer to account for the known distance between slices to calculate the volume.
[0048] The system reshades or colors each polygon using a range of grayscales and / or colors that the human eye can distinguish (depending on the capabilities of the display monitor used). Multipolygon "masses" can be displayed with or without the surrounding background for enhanced visual analysis.
[0049] Create searchable criteria for polygons stored as morphological associations.
[0050] Referring to Figure 8, the criteria for searching 2D and 3D masses is based on a comparison of all the constituent polygons of the mass of interest. This comparison is done through a set of percentages to allow for comparison of masses of similar morphology even if their relative sizes differ. To create these percentage-based criteria, the present invention uses a computer to define the tightest possible square around each mass (assembled polygon(s)) and uses the area of the square to calculate the relative comparison percentages. Comparison percentages are calculated based on:
[0051] 1) The height-to-width ratio of each tumor mass, expressed in a range of 1–200%.
[0052] 2) The percentage of pixels in the entire square that the polygon will use.
[0053] 3) Define the average x,y pixel location within each square - relative position.
[0054] 4) The average vertical and horizontal pixel run length, where a run length is defined as a set of pixels that are contiguous and aligned horizontally or vertically, but not diagonally.
[0055] By using a computer to perform the above calculations, tissue masses can be searched for and compared to multiple other polygonal masses held in a database, despite differences in relative size and variations in fine morphological features.
[0056] advantage
[0057] Prior art 3D mammography imaging devices capture very slight differences in attenuation - distinctions that are beyond the range of human vision when converted to grayscale imaging. The system according to the invention overcomes this problem by capturing the attenuation values assigned to each pixel, thereby calculating the various gradients in the visible and invisible ranges, and then using those gradients to trace polygons that reflect the contours of the mass. Such a system then reassembles the spatially related polygons into a morphological whole, colorizing each gradient layer to distinguish the constituent gradients, thereby revealing the once hidden morphological details. Moreover, because the system according to the invention can isolate the contours of the tumor at the attenuation value level, other innovative calculations are possible. For example, the system can use the attenuation value data to calculate the size and shape of the tumor in each of the 2D slices that the tomosynthesis imaging uses to render the composite "3D image". As a result, the system according to the invention can calculate the volume of the tumor mass in the mammogram, a key metric when considering treatment options for breast cancer.
[0058] In the prior art, computer-aided image solutions have been applied to mammography, known as computer-aided diagnosis. Such systems typically used rule-based pattern recognition to identify areas on mammograms that may contain malignant masses. CAD systems mark areas on mammograms that appear suspicious with an X or other shape. However, a 2015 megastudy concluded that CAD did not improve breast cancer detection, and today CAD is not reimbursed and has been largely abandoned by radiologists. New hope for computer-aided detection in mammography has been brought about by the emergence of various machine learning applications. Like CAD, these systems attempt to identify suspicious areas. Moreover, these new machine learning / AI systems are intended not just to mark suspicious areas, but to create a score that serves as a rating of the likelihood of malignancy. Machine learning / AI applications produce results that result from pattern analysis and recognition within black and white digital images. The system "trains" the software on known malignant masses and uses evolving algorithms to match similar black and white patterns that appear on the subject's mammogram (the more similar the pattern, the higher the malignancy score). As the software is trained on more images, its pattern recognition and associated scoring are expected to improve.
[0059] The system according to the invention is different from the pattern recognition systems of the prior art. It does not train on a set of curated mammograms with known malignant masses and does not mark regions as suspicious, but provides predictive quantification based on pattern recognition. As described herein, the system according to the invention reveals potential morphologies through processing of attenuation values captured by a digital image acquisition device and recorded in digital images such as mammograms. Furthermore, the system according to the invention displays the results through visualization by utilizing colorization defined by pixel gradient contours calculated uniquely on each target image. Metrics (layer count, diameter, area, volume of revealed masses) are calculated directly from density gradient contours embodied in the target images and are not the result of the use of pre-trained data sets for pattern recognition or machine learning. EXAMPLES
[0060] Described below is the operation of client devices 14-18 and server 12 in an exemplary system in accordance with the present invention for providing a pop-up display of image analysis results in accordance with the present invention. Programming such devices 12-18 for such purposes is within the knowledge of those of ordinary skill in the art in view of the discussion below and elsewhere herein.
[0061] 1. In this embodiment, a utility is described that is used in the system according to the invention to display radiological images in a pop-up window (hereinafter referred to as the "DeepLook window"). This pop-up utility runs directly on the display of the medical monitor and / or other digital display used to display, evaluate and / or compare radiological images. It performs screen grabs of the current monitor's PGM (Pixel Gradation Mass) pixel settings and analyzes them. The images in Figure 9 show mammograms with and without the DeepLook window.
[0062] 2. Supports pop-up windows. The technology analyzes pixel gradations directly from digital screens. It analyzes displayed images regardless of the modality used to acquire the image. The software works with any medical image displayed in grayscale or color, including but not limited to mammograms or ultrasounds.
[0063] 3. The software groups pixels that are deemed to have similar brightness on a grayscale continuum (color pixels are converted to their grayscale equivalent). DeepLook converts them to a single grayscale value, creating a contiguous region. The contiguous grouping of pixels with a single grayscale value results in the appearance of a contoured shape called a growth ring (GR), as shown in Figure 10.
[0064] 4. The grouping method that creates growth rings (GRs) establishes an ordering according to relative brightness. For radiology (X-ray), MRI, MBI and other techniques, the ordering is from white to black in descending order, while for ultrasound, the ordering is from black to white in ascending order. This ordering method creates overlapping GRs. The GRs are recursive and appear as shapes within shapes according to the grouped grayscale value of each GR.
[0065] 5. This grouping, ordering (descending or ascending), and recursive overlapping effectively displays the outward growth from one or more points to a final outward shape called a Pixel Gradient Mass (PGM). Note: A mass may have several growing points that converge as they grow outward.
[0066] 6. In Figure 11, the image on the left is a conceptual PGM (Pixel Gradation Mass). On the right side of Figure 11 is a PGM displayed on a mammogram with converging outward growing points.
[0067] 7. The technology that supports popup windows first differentiates grayscale at the pixel level, where gradients are beyond the range of normal human vision, and then highlights with color the Growth Rings (GR), which are components created by the pixel shading grouping described in items #3 and #4 above. These GRs are invisible or difficult to see by the human eye. The software applies colorization to highlight and differentiate the GRs within the Pixel Gradient Mass (PGM).
[0068] 8. Figure 12 shows the concentric growth rings seen in a mammographic mass. On the left side of Figure 12, a box contains concentric rings that represent the growth rings of an organ mass. The space appears to be nearly blank, but it is not. The concentric rings are present, but the grayscale distinction between each ring makes it impossible to effectively distinguish them by eye. To the right of the box in Figure 4 is the exact same image enhanced by software techniques that depict the rings by highlighting them with scale colors.
[0069] 9.Unlike the illustration above, the growth rings from radiological images of organ tissue are irregularly shaped and poorly delineated. Below, we apply this technique directly to 2D mammograms. In Figure 13, the image on the left is a bright white area on a mammogram. This generally indicates a possible mass, but its uniform whiteness makes it difficult to distinguish features. The right side of Figure 13 is the same bright white area as seen in the popup utility. The popup utility technique displays a pixel gradation mass (PGM) with more than 12 growth rings (GR), so the concentric pixel shading of the organ is visible.
[0070] 10. The technology and methodology behind the Popup Utility uses a set of ratios, weighted average techniques, and other calculations to establish the dimensions of the Pixel Gradient Mass (PGM). The contours and size of the PGM result from the total number of growth rings (GR) created by the pixel gradient analysis (items #3-6 above), with the gradients being in ascending or descending order depending on the image acquisition mode (radiography, ultrasound, etc.). The number of growth rings identified and delineated defines the contours and size of the PGM. See Figure 14.
[0071] 11. The technology and methodology behind the Popup Utility provides an overall density value, expressed on a scale of 0 to 10, to inform the user and aid in comparison and analysis. The Pixel Gradient Mass (PGM) density rating is determined by calculating the average area that growth rings increase as they radiate out from the center.
[0072] Density definition: The density of a mass is determined by calculating the average area that increases as the GR extends outward. The density rating is normalized to all other mapped masses on a scale of 0 to 10. The density of the image in Figure 15 is 7.5.
[0073] 12. The technology and methodology behind the popup utility provides an overall measure of "whiteness" (or "darkness" in ultrasound and similar modalities) that corresponds to density in radiology images. The whiteness (or darkness) value is expressed on a scale of 0-10 to inform the user and aid in comparison and analysis. The whiteness of a Pixel Gradation Mass (PGM) is determined by the density rating of the core layers within the PGM.
[0074] Whiteness definition: The whiteness of a PGM is determined by the brightness of the central growth ring (GR). Whiteness is normalized from 0 to 10 relative to all other mapped masses within the area defined by the outline in the popup utility. It is possible to increase or decrease the size of the window, which results in a new comparison calculation. The figure in Figure 16 has a whiteness of 10.0 on a gray scale of 0 to 256.
[0075] 13. The default settings of the Popup Utility will display the Pixel Gradient Mass (PGM) with the most Growth Rings (GR) within the perimeter of the Popup Window. The default settings can be changed by the user to expand or reduce the number of masses highlighted in the window, and a drop-down menu in the Settings window allows the user to set the minimum number of GRs required for a mass to be displayed. In addition, the display of the window can be manually filtered by adjusting any of the following four interrelated variables. These variables can be manipulated by clicking the Settings icon in the Popup Utility menu bar at the top of the window. The four variables are as follows, as shown in Figure 17:
[0076] R = number of growth rings (GR).
[0077] L = size of the outermost GR relative to other Pixel Gradient Masses (PGMs) being analyzed in the same popup window. 1 = minimum, N = maximum -1 to N.
[0078] W = maximum grayscale grouped GR value (for X-ray) or minimum grayscale value (for ultrasound) of the PGM.
[0079] D=PGM density as described in #11 above.
[0080] 14. The technology and methodology behind the Popup Utility creates a unique set of numerical values associated with each Pixel Gradient Mass (PGM) that are then taken together to create an electronic "profile" of the mass. This electronic profile, called a Mass Tissue Profile (MTP), can be used for specialized visual-based searches of custom MTP databases to reveal matches and correlations with other MTPs from additional medical images.
[0081] Pseudo-code
[0082] Below is the pseudocode to create a PGM (Pixel Gradation Mass) and the abilities mentioned above:
[0083] 1. Move the popup window over the screen area to be analyzed, or you can analyze a specific area of an image from a *.jpg, *.gif, DICOM, *.PNG, *.TIFF, etc. data file.
[0084] 2. Take a "screen grab" of the pixels of the current monitor, or you can use an image file such as *.jpg, *.gif, DICOM, *.PNG, *.TIFF, etc., by converting it to a pixelated representation similar to the "screen grab".
[0085] 3. Locate the area directly beneath the display in the popup window, or select an area from an image file that has been converted to a pixel representation, or copy those pixels in the selected file to a standalone file, or work from the captured pixel memory using the offset of the selected area and a similar method of reading and managing pixel information.
[0086] 4. Search for contiguous pixel groups in the selected area and create a list sorted by brightness. Below are the steps to create a contiguous pixel group, as used in the DeepLook popup window. A contiguous pixel group is a group of pixels that have the same or similar shade and are touching ("contiguous"). Alternatively, you can use any other method of generating contiguous pixel groups.
[0087] DeepLook pseudocode used for "Generating consecutive pixels":
[0088] A. For every pixel "grabbed on the screen", create an array of integers with one grayscale value for each pixel. The maximum grayscale value is variable. In DeepLook's implementation, the maximum grayscale value is 255. Starting with the top right pixel, work left to right and top to bottom within the selection area and create one integer value representing the assigned grayscale value for each pixel. If red=green=blue, the value is the current red value. If red, green, and blue are not all the same, use the color-to-grayscale pixel formula to convert the pixel's value to grayscale. In this implementation, we use "luma=red*0.3+green*0.59+blue*0.11". Alternatively, you can use any formula or algorithm to create a single value from the three RGB values of a pixel, not just a grayscale pixel representation.
[0089] B. Use the grayscale array as X to grab width and Y to grab height, a rectangular representation of the grab area. Starting with the maximum number of shades of gray possible for the screen area, scan the array for contiguous groups of pixels. As you scan the array, reduce the grayscale value of each value in the array by a power of 2 (bit shift 1 to the right) until the maximum value is 3. This results in a total of 4 possible shades of gray.
[0090] If the first scan of the array finds that the maximum grayscale value is 255, then the maximum value any array element can have will be 255. The second scan of the array finds that the maximum value will be 127, and the third scan finds that it will be 63.
[0091] For each scan of the array, if a group of contiguous pixels is found, the parameters that define that group must be saved. The following parameters are saved for later use in this implementation. Alternatively, any additional parameters that may or may not be used at a later date can be saved. Also, the following parameters based on the current implementation can be skipped:
[0092] 1. An X,Y pixel point path that contains and outlines a group of contiguous pixels.
[0093] 2. Every contiguous pixel group is identified by an actual pixel rectangle that encloses the shape. The percentage of the pixel area that the shape covers with that pixel rectangle.
[0094] 3. The average pixel X position, relative to the actual pixel rectangle, of each pixel used for the shape.
[0095] 4. The average pixel Y position, relative to the actual pixel rectangle, of each pixel used for the shape.
[0096] 5. The average run length of consecutive pixels from right to left that make up the shape.
[0097] 6. The average run length of consecutive pixels from top to bottom that make up the shape.
[0098] 7. Shape Width
[0099] 8. Shape height
[0100] 9. Total XY points for XY point pass (above 1)
[0101] 10. Average grayscale pixel value of the shape.
[0102] 11. XY position of each pixel of each saved shape.
[0103] C. Cycle through the list of saved shapes and remove duplicate shapes.
[0104] 5. Using the shape data saved in 4(B) above, create a matrix table of found shapes that is used to identify where shapes intersect and / or overlap and create concentric pixel gradations.
[0105] 6. Search for and list concentric pixel gradient masses. The procedure for searching for concentric pixel gradients is decomposed into the following steps (alternatively, other alternative methods for searching for concentric pixel gradients can be used):
[0106] A. Sort the list of shapes from brightest to darkest.
[0107] B. Starting at the top of the list, for each shape on the list that has not yet been assigned to a mass, perform the following step B.1:
[0108] B.1 Using the shape matrix table created in step 5 above, search the shape's pixel rows and columns to find a shape that completely encloses the shape. If a shape that completely encloses the current shape is found and any of the following are true, grab the next shape in the list:
[0109] 1. Its average grayscale is greater than the average grayscale of the current shape.
[0110] 2. The absolute value of the greyscale of the found shape minus the current greyscale shape is greater than N. In this implementation N=6. Alternatively, any value of N can be used.
[0111] 3. The total area of the found shapes is greater than N. In this implementation, N varies depending on the size of the shapes. Small shapes have different settings than large shapes. See the attached code (below) for the concrete definition. Alternatively, this code can be implemented using other size constraints.
[0112] 4. The width-to-height ratio of the shapes does not match within a certain range, N. In this implementation, N depends on the size of the shapes. It is set differently for small and large sizes. See the attached code (below) for the concrete definition. Alternatively, this code can be implemented using other size constraints.
[0113] C. If it is, the found shape is considered a ring of the current shape. If the current shape is from the "B" list above, the current shape is saved as a mass. The found shape becomes the current shape and proceeds to B.1. When there are no other shapes surrounding the current shape that have not been excluded by B.1, the current concentric pixel gradient mass is considered complete.
[0114] 7. Now you have a list of all the concentric pixel gradient masses that were found. Search for pixel gradient masses that match the current filter settings.
[0115] A. Scan the concentric pixel gradient mass list to find masses that meet the current filter specifications.
[0116] B. Using the X,Y path defined in 4.B above, draw each found mass using a different color range for each shape found within that mass, optionally displaying the parameters saved in 4.B above and / or displaying the average value of the shapes found in the mass, or alternatively displaying only selected shapes from the identified masses.
[0117] A more complete understanding of the operations performed by the above pseudocode can be had by reference to the software listing provided below under the heading Software1-ASCII.
[0118] Radiomics - Quantification / characterization of spiculation
[0119] Referring to Fig. 18, the system 10, and more particularly, for example, one or more of the client and / or server devices 12-18, can quantify or characterize (hereinafter, collectively, characterize) the spiculation of the growth ring and / or thereby quantify or characterize the series of concentric such rings of which the growth ring forms a part (such a series of rings is a pixel gradient mass or PGM in the text that follows without loss of specificity or generality) as, for example, indicative of a potential cancerous, non-cancerous (e.g., normal density), or other mass. Programming the system 10, and more particularly, the devices 12-18, to perform the method of Fig. 18 is within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0120] In step 1800, the illustrated method walks the perimeter of the growth ring to be characterized, such as, by way of non-limiting example, the growth ring labeled "5" in FIG. 14, and generates an ordered list of coordinates that define the perimeter. Walking can be in a clockwise or counterclockwise direction, but is preferably performed consistently around the entire circumference of the growth ring to be characterized. Walking the perimeter of a growth ring is within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0121] In step 1805, the method shown divides the list of coordinates generated in step 1800 into groups ("chunks") of coordinates. This division is performed to divide the list into chunks of coordinates at any of the inflection points on the circumference of the growth ring. An "inflection point" in this context refers to, for example, a point on the growth ring where the sign of the slope of the growth ring changes, e.g., (i) from one representing an increasing change in y coordinate (Δy) for an increasing change in x coordinate (Δx) to one representing an increasing change in y coordinate for a decreasing change in x coordinate, or more simply, +Δy / +Δx→+Δy / -Δx; or, if we continue to use this notation, (ii) +Δy / +Δx→-Δy / +Δx; or (iii) +Δy / -Δx→+Δy / +Δx; or (iv) +Δy / -Δx→-Δy / -Δx; etc., within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0122] At step 1810, the illustrated method quantifies each chunk based on its span-to-length ratio. As used herein, the "span" of a chunk refers to the Cartesian distance between the chunk's endpoints, or more colloquially, the "crow's flies" distance between those endpoints. In the illustrated embodiment, this span or distance is measured in pixels, but other embodiments may differ in this respect. The "length" of a chunk, on the other hand, is the sum of the distances measured moving successively from point to point along the path defined by the coordinates that make up the chunk. Again, this is measured in pixels in the illustrated embodiment, but other embodiments may differ in this respect.
[0123] As will be appreciated by those skilled in the art, the span-to-length ratio thus defined is greater than 0 and less than or equal to 1, i.e., 1≦span-to-length ratio>0, such that chunks defining straight line segments have a span-to-length ratio=1 and chunks that deviate from a straight line have a smaller such ratio.
[0124] In step 1815, the illustrated method bins the chunks according to their respective span-to-length ratios, and then, for each bin, (i) sums the lengths of the chunks contained in that bin, and (ii) determines what percentage of the total circumference of the growth ring being characterized that sum constitutes. While other embodiments may vary in this regard, in the illustrated embodiment, the method in step 1815 uses 100 bins to collect chunks having span-to-length ratios between 0 and 0.01, 0.01 and 0.02, 0.02 and 0.03, ..., 0.10 and 0.11, 0.11 and 0.12, 0.12 and 0.13, ..., 0.97, 0.98, 0.99, 1.0, all of which are non-limiting examples.
[0125] In step 1820, the illustrated method collects (i.e., bins) the percentages generated in step 1815 into super-bins based on the span-to-length ratios of the bins with which those percentages were associated in step 1815. The number of super-bins in step 1820 is smaller than the number of bins (of step 1815), which in the illustrated embodiment is 10 times smaller, although other embodiments may differ in this respect. Further, in the illustrated embodiment, the super-bins are associated with span-to-length ratios of 0-0.1, 0.1-0.2, 0.2-0.3, 0.3-0.4, 0.4-0.5, 0.5-0.6, 0.6-0.7, 0.7-0.8, 0.8-0.9, and 0.9-1.0, respectively, although again, other embodiments may differ in this respect. Continuing with the above example, in step 1820, the illustrated method may collect percentages of bins 0-0.01, 0.01-0.02, 0.02-0.03...0.09-0.1 from step 1815 into superbins with ratios of 0-0.1; 0.10-0.11, 0.11-0.12, 0.12-0.13...0.19-0.2 into superbins with ratios of 0.1-0.2, and so on, these are non-limiting examples. Of course, in some embodiments, one may simply collect each percentage into a superbin to be used in step 1825, described below.
[0126] In step 1825, the method shown sums the percentages of each of at least the selected superbins. Here, they are superbins associated with span-to-length ratios of 0.6-0.7, 0.7-0.8, 0.8-0.9, and 0.9-1.0, although other embodiments may differ in this respect, both in terms of the number of superbins used and the ratios represented thereby. Those percentages, taken together, "quantify" the growth ring being characterized, and may each be maintained as a separate variable (or other data structure) for purposes of storage, display, and / or further processing, or they may be added together to form a single numerical value, referred to as the spiculation "value." For example, if the percentages 15%, 5%, 10%, and 3% were summed in step 1825 for superbins associated with ratios 0.6-0.7, 0.7-0.8, 0.8-0.9, and 0.9-1.0, respectively, then those percentages can be appended (padded to two digits or other uniform format if necessary) to form the spiculation value "15051003".
[0127] In step 1830, the illustrated method characterizes the growth ring based on the quantification of step 1825. This is done by comparing the percentage sums of each of the selected superbins (e.g., bins associated with span-to-length ratios of 0.6-0.7, 0.7-0.8, 0.8-0.9, and 0.9-1.0) to corresponding sums generated in a similar manner (e.g., through performance of steps 1800-1825) for growth rings of known morphology of tissue, e.g., cancerous tissue, non-cancerous tissue, etc. If the comparison is good, the growth ring is characterized as likely to be of that morphology. The comparison can be strict, in the sense of requiring numerical identity between each of the compared percentages, or can be range-based, e.g., where tissues of known morphology are associated with respective span-to-length ratio value ranges.
[0128] As reflected in step 1835, spiculation quantification or characterization may be displayed along with the PGM (or otherwise) of interest, which may inform re-shading, colorization and / or other display enhancement of the growth ring (or "polygon") and / or PGM (or "multi-polygon mass"), as discussed, e.g., with respect to FIG. 7; as a more detailed and non-limiting example, system 10 may vary the nature and / or degree of such enhancement as a function of such quantification or characterization, all within the knowledge of those of ordinary skill in the art in light of the teachings herein.
[0129] As a further non-limiting example, such a system 10 may highlight, in one color or color range, PGMs having growth rings with spicules potentially characteristic of cancerous tissue, and, in another color or color range, PGMs comprised of growth rings with spicules characteristic of non-cancerous tissue.
[0130] Characterization of such spiculation can instead, or in addition, inform the creation and sorting of such growth rings (or polygons), e.g., as described above in connection with FIG. 5, and / or the assembly of a PGM (or multipolygon object), e.g., as described above in connection with FIG. 6, so that, more particularly, as a non-limiting example, system 10 can select a growth ring as the outer boundary of the PGM or conversely ignore it depending on the characterization of the spiculation of that growth ring.
[0131] As a further non-limiting example, such a system 10 can select growth rings (if any) whose spiculation characterizations are most likely to be indicative of potentially cancerous tissue from among growth rings whose peripheries would otherwise form the outer boundary of the polygon PGM. The use of such spiculation characterizations can affect not only the highlighting and display of the PGMs, but also (i) their respective attenuation coefficients and other measures (e.g., size, density, whiteness / darkenness, etc.) (e.g., as described above in connection with FIG. 7 and in connection with the section entitled "Examples"), and (ii) the search and comparison between masses (e.g., as described above in connection with FIG. 8), all by way of non-limiting example and all within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0132] A more complete understanding of the method illustrated in FIG. 18 and described above in connection therewith may be achieved by reference to the listing of software provided below under the heading marginSpiculationCode-ASCII.
[0133] Radiomics – Normalized Pixel Density ("NPD").
[0134] 19, the system 10, and more particularly, for example, one or more of the client and / or server devices 12-18, may also quantify a growth ring by determining its normalized pixel density (NPD), i.e., by determining a percentile ranking of the average intensity of pixels in the growth ring relative to the intensity of pixels in a region of interest of a radiological, ultrasound, or other image. Programming the system 10, and more particularly, devices 12-18, to implement the method of FIG. 19 is within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0135] In the embodiment shown in Figure 19 and described below, it is assumed that the region of interest has been converted to grayscale, if not the entire radiological, ultrasound or other image forming part of it. In other embodiments, such conversion may be performed prior to performing the method of Figure 19. Still other embodiments may perform the method using intensity values calculated directly from RGB or other pixel values contained in the region of interest or an image forming part of it, instead of the grayscale intensity values described below, all of which are within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0136] In step 1900, the illustrated method normalizes pixel intensities of a user-selected region of interest (sometimes referred to herein as a "bitmap"). This may be the entire radiological, ultrasound, or other image being processed, but more typically is a region identified by the user via a mouse, touch screen, or other method, as would be within the knowledge of one of ordinary skill in the art in light of the teachings herein. Alternatively or additionally, the region of interest / bitmap may be selected automatically (i.e., by operation of the system 10) as part of the illustrated methodology, for example, in conjunction with determining the NPD for all growth rings in the PGM, or otherwise, also as would be within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0137] Normalization of pixel intensities within a bitmap is within the knowledge of one of ordinary skill in the art in light of the teachings herein, and may be performed, by way of non-limiting example, by: (i) examining the intensities of all pixels in the bitmap to identify minimum and maximum intensity values, (ii) determining a scaling factor and offset that expands those minimum and maximum values to the range 0-255 (or other normalization target as used in the implementation), and (iii) applying that factor and offset to the intensity values of pixels within the ROI to normalize them. Other normalization techniques within the knowledge of one of ordinary skill in the art may be used instead or in addition.
[0138] In step 1905, the illustrated method determines the average intensity of pixels within a growth ring of interest (GROI) that is at least partially, if not entirely, located within the ROI. The GROI may be identified by a user via a mouse, touch screen, or other method, as would be within the knowledge of one of ordinary skill in the art in light of the teachings herein. Alternatively or additionally, the GROI may be selected automatically (i.e., by operation of the system 10) as part of the illustrated methodology, for example, in conjunction with determining the NPD of all growth rings within the ROI, as would also be within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0139] Determining the average intensity of pixel intensities within the GROI is within the knowledge of one of ordinary skill in the art in light of the teachings herein, and may be performed, as a non-limiting example, by summing the intensities of the pixels within the GROI (following normalization step 1900) and dividing the sum by the count of those pixels. Other averaging techniques within the knowledge of one of ordinary skill in the art may be used instead or additionally.
[0140] In step 1910, the illustrated method determines a percentile ranking relative to the average determined in step 1905 relative to the normalized intensity of the pixels in the ROI. Determining such a percentile ranking (a / k / a Normalized Pixel Density or NPD) is within the knowledge of one of ordinary skill in the art in light of the teachings herein, and may be performed, by way of non-limiting example, by examining the normalized intensity of all pixels in the bitmap and counting those that have an intensity below (or at) the average intensity determined in step 1905, in the case of x-ray and other imaging modalities where "whiteness" is strongest, or conversely, counting those that have an intensity above (or at) the average intensity, in the case of ultrasound and other modalities where "darkness" is strongest. Other percentile ranking techniques within the knowledge of one of ordinary skill in the art may be used instead or in addition.
[0141] The NPD of a growth ring, alone or in conjunction with the quantification / characterization of spicules as discussed in connection with FIG. 18, the relative centralized distance percentage as discussed in connection with FIG. 20, the balance determination as discussed in connection with FIG. 21-22, and / or the degree of polymorphism as discussed in connection with FIG. 23, can characterize and inform the growth ring or the PGM of which it forms a part, for example, as potentially cancerous, non-cancerous (e.g., normal density), or indicative of other mass.
[0142] Thus, for example, the illustrated method may compare the NPD of the growth ring to NPDs generated in a similar manner (e.g., through performance of steps 1900-1910) for growth rings of tissue of known morphology, e.g., cancerous tissue, non-cancerous tissue, etc. If the comparison is good, the growth ring may be characterized as likely to be of that morphology. The comparison may be strict, in the sense of requiring numerical identity between the values compared, or may be range-based, e.g., where tissue of known morphology is associated with a range of NPD values.
[0143] As reflected in step 1915, the NPD determined as described above may be displayed along with the growth ring (or otherwise) of interest, which may inform re-shading, colorization and / or other display enhancements of the growth ring (or "polygon") and / or PGM (or "multi-polygon mass"), for example, as discussed in connection with FIG. 7, and, as a result, more particularly, as a non-limiting example, the system 10 may vary the nature and / or degree of such enhancement of the GR or PGM forming a part thereof as a function of the NPD of the GR, all of which is within the knowledge of those skilled in the art in light of the teachings herein.
[0144] As a further non-limiting example, such a system 10 may highlight, in one color or color range, GRs having growth rings whose NPDs fall within one numerical range, and, in another color or color range, GRs whose NPDs fall within another such range.
[0145] The NPD of the growth rings may alternatively or additionally inform the creation and / or sorting of such growth rings (or polygons), e.g., as described above in connection with FIG. 5, and / or the assembly of a PGM (or multi-polygon object), e.g., as described above in connection with FIG. 6, so that, more particularly, and by way of non-limiting example, system 10 may select or ignore growth rings as members of a PGM depending on the NPD of those growth rings.
[0146] As a further non-limiting example, such a system 10 can use an NPD to select among growth rings whose perimeters would otherwise form the outer boundary of a multi-polygon PGM. Use of such an NPD can affect not only the highlighting and display of the PGM, but also: (i) their respective attenuation coefficients and other measures (e.g., size, density, whiteness / darkness, etc.), as described above in connection with FIG. 7 and in connection with the section entitled "Examples," and (ii) the search and comparison between masses, as described above in connection with FIG. 8, all by way of non-limiting example and all within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0147] A more complete understanding of the method illustrated in FIG. 19 and described above in connection therewith may be achieved by reference to the software listing provided below under the heading NormalizedPixelDensity-ASCII.
[0148] Radiomics - Relative Distance Percentage (RCDP)
[0149] Referring to FIG. 20, the system 10, and more particularly, for example, one or more of the client and / or server devices 12-18, can quantify the relative centralized distance percent (RCDP) of a subject PGM - i.e., the distance between the center of the PGM and the center of the strongest growth ring that constitutes it - where the distance is normalized to facilitate comparison across different lesion / PGM sizes.
[0150] As used in this section without loss of specificity or generality, the terms pixel gradation mass and PGM refer to a series of concentric growth rings, such as the type whose assembly is described above in connection with Figure 6. Programming of system 10, and more particularly devices 12-18, to implement the method of Figure 20 is within the knowledge of those skilled in the art in light of the teachings herein.
[0151] In the embodiment shown in Figure 20 and described below, it is assumed that the PGM of the object has been converted to grayscale, if not the entire radiology, ultrasound or other image of which the PGM forms a part. In other embodiments, such conversion may be performed prior to performing the method of Figure 20. Still other embodiments may perform the method using intensity values calculated directly from RGB or other pixel values contained in the PGM of the object or an image forming a part of it, instead of the grayscale intensity values described below, all of which are within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0152] In step 2000, the illustrated method determines the location of the center of mass of a PGM of interest, as well as the longest and shortest diameters of that PGM. This may be a PGM identified by a user via mouse, touch screen, or other method, as would be within the knowledge of one of ordinary skill in the art in light of the teachings herein. Alternatively, or in addition, the PGM of interest may be selected automatically (i.e., by operation of system 10), as part of the illustrated methodology, for example, in connection with determining the re-centered density (RCDP) of one or more PGMs identified and / or displayed by system 10, as would also be within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0153] In the following discussion, the location of the center of the mass of the target PGM is called the Outside Margin Centralized Point (OMCP). The longest diameter of the PGM is called the Outside Margin Shape Longest Diameter (OMSLD). The shortest diameter of the PGM is called the Outside Margin Shape Shortest Diameter (OMSSD).
[0154] Determining the center of mass of a PGM of interest is within the knowledge of one of ordinary skill in the art in light of the teachings herein and can be performed by any of a number of techniques known in the art, as adapted in accordance with the teachings herein. In the illustrated embodiment, the determination of the center of mass takes into account the intensity of all pixels lying within the outer boundary of the PGM (e.g., regardless of whether those pixels are also present within one or more other concentric growth rings that make up the PGM), while in other embodiments, only a subset of those pixels (e.g., pixels within a user-selected inner transmission salt growth ring or other pixels) can be taken into account.
[0155] Determining the longest and shortest diameters of a PGM of interest is within the knowledge of one of ordinary skill in the art in light of the teachings herein, and can be performed, as a non-limiting example, by determining both the smallest circle that fits within the PGM and the largest circle that encloses the PGM. The former diameter defines the OMSSD and the latter diameter defines the OMSLD. It will be appreciated that other techniques within the knowledge of one of ordinary skill in the art adapted in accordance with the teachings herein can be used instead or in addition to determine the OMSSD and OMSLD.
[0156] In step 2005, the method identifies the growth ring with the highest intensity in the PGM of interest. In the case of an x-ray image, etc. (i.e., a medical image where "whiteness" represents the highest intensity), this entails finding the growth ring with the highest (whitest) average pixel intensity in the PGM. In the case of an ultrasound image, etc. (i.e., a medical image where "darkness" represents the highest intensity), this entails finding the one with the lowest (darkest) average intensity. Finding such growth rings is within the purview of one of ordinary skill in the art in view of the teachings herein.
[0157] In step 2010, the illustrated method determines the location of the center of mass of the growth ring identified in step 2005. Determining such a center of mass is within the knowledge of one of ordinary skill in the art in light of the teachings herein and may be performed by any of a number of techniques known in the art in accordance with the teachings herein. In the mathematical relationships that follow, that location is referred to as the center of closest polygon (or DPCP).
[0158] In step 2015, the illustrated method calculates the relative percent centralized distance (RCDP) of the PGMs of interest as a function of the distance DP between the centers of the masses found in steps 2000 and 2005, i.e., as a function of OMCP and DPCP, respectively, and as a function of the maximum and minimum diameters of the PGMs of interest, i.e., OMSLD and OMSSD. More specifically, the RCDP is determined based on the mathematical relationship:
[0159] RCDP=DP / (OMSLD+OMSSD)
[0160] Where:
[0161] DP=OMCP-DPCP
[0162] The implementation and execution of such mathematical relationships in the context of the illustrated methods is within the knowledge of those of ordinary skill in the art in light of the teachings herein.
[0163] The RCDP of a PGM, alone or in combination with spiculation quantification / characterization discussed in connection with FIG. 18, normalized pixel density discussed in connection with FIG. 19, balance determination discussed in connection with FIG. 21-22, and / or polymorphism discussed in connection with FIG. 23, can inform characterization of that PGM, for example, as indicative of a potential cancerous, non-cancerous (e.g., natural density), or other mass, all of which are within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0164] Thus, for example, the illustrated method may compare the RCDP of a PGM to the RCDP generated (e.g., by performing steps 2000-2015) of a PGM of a known morphology of tissue, e.g., cancerous tissue, non-cancerous tissue, etc. If the comparison is good, the PGM of interest may be characterized as likely to be of that morphology. The comparison may be strict, in the sense of requiring numerical identity between each of the compared values, or may be range-based, such as where known morphologies of tissue are associated with a range of RCDP values.
[0165] As reflected in step 2020, the relative centralized distance percentage (RCDP) determined as described above may be displayed with the target PGM (or otherwise), for example, with reference to FIG. 7, which may inform re-shading, colorization and / or other display enhancement of the growth ring (or "polygon") and / or PGM (or "multi-polygon mass") as discussed, so that, as a more detailed and non-limiting example, the system 10 may vary the nature and / or degree of such enhancement of the GR or PGM forming a part thereof as a function of the RCDP of the target PGM, all of which is within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0166] As a further non-limiting example, such a system 10 may highlight, in one color or color range, PGMs having an RCDP that falls within one numerical range, and, in another color or color range, PGMs whose RCDP falls within another such range.
[0167] The RCDP of the PGM may alternatively or additionally inform the creation and / or sorting of such growth rings (or polygons), e.g., as described above in connection with FIG. 5, and / or the assembly of the PGM (or multi-polygon object), e.g., as described above in connection with FIG. 6, so that, in more detail, and as a non-limiting example, the system 10 may select or, conversely, ignore growth rings as members of the PGM depending on the RCDP that would result from such selection.
[0168] A more complete understanding of the method illustrated in FIG. 20 and described above in connection therewith may be achieved by reference to the software listing provided below under the heading centralizedDensityCode-ASCII.
[0169] Radiomics-Balance Determination
[0170] 21, the system 10, and more particularly, for example, one or more of the client and / or server devices 12-18, can quantify (or determine the degree of) the balance of a PGM of interest, i.e., the symmetry of the pixels that make up the PGM across the X-axis, Y-axis, and combined X / Y-axis, and thereby the symmetry of a mass or other tissue imaged by that PGM. As will be appreciated, the methods described below can also be applied to determining the degree of balance of a growth ring.
[0171] As used in this section without loss of specificity or generality, the terms pixel gradation mass and PGM refer to a series of concentric growth rings, such as the type whose assembly is described above in connection with Figure 6. Programming of system 10, and more particularly devices 12-18, to implement the method of Figure 20 is within the knowledge of those skilled in the art in light of the teachings herein.
[0172] In the embodiment shown in Figure 21 and the embodiments described below, it is assumed that the PGM of interest has been converted to grayscale, if not the entire radiology, ultrasound or other image of which the PGM forms a part. Other embodiments may perform such a conversion before performing the method of Figure 20. Still other embodiments may perform the method using intensity values calculated directly from RGB or other pixel values contained in the PGM of interest or an image forming a part of it, instead of the grayscale intensity values described below, all of which are within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0173] In step 2100, the illustrated method determines a bounding box for a target PGM, which may be a PGM identified by a user via a mouse, touch screen, or other method, as would be within the knowledge of one of ordinary skill in the art in light of the teachings herein. Alternatively or additionally, the target PGM may be selected automatically (i.e., by operation of system 10), for example, in connection with determining the degree of balance of one or more PGMs identified and / or displayed by system 10 as part of the illustrated methodology, as would also be within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0174] Determining the bounding box of a PGM of interest is within the knowledge of one of ordinary skill in the art in light of the teachings herein and may be performed by any of a number of techniques known in the art, as adapted in accordance with the teachings herein. In the illustrated embodiment, the bounding box determination considers the intensities of all pixels that lie within the outer boundary of the PGM, although in other embodiments, only a subset of those pixels may be considered (e.g., pixels within a user-selected inner concentric growth ring, etc.).
[0175] At step 2105, the illustrated method divides the bounding box into equal sized regions, see regions labeled A, B, C, and D in FIG. 22A. Each region is, in turn, divided into equal sized sub-regions, see sub-regions labeled 1-16 in FIG. 22A. While the illustrated embodiment contemplates a division of 4 by 4, i.e., 4 regions and 4 sub-regions per region, other embodiments may vary in this respect, such as utilizing, by way of non-limiting example, 8 regions and 16 sub-regions. In the following discussion, regions and sub-regions will be referred to, without loss of generality or specificity, as quadrants and sub-quadrants, respectively.
[0176] Further, while in the illustrated embodiment the quadrants and subquadrants are aligned with the X and Y axes of a radiological, ultrasound, or other image in which the PGMs of the object are identified, in other embodiments they may be aligned with the X and Y axes based on the principal moments of the PGMs of the object or in other manners, all within the knowledge of one of ordinary skill in the art in view of the teachings herein.
[0177] Division of a PGM of interest as contemplated in step 2105 is within the knowledge of one of ordinary skill in the art in view of the teachings herein.
[0178] In step 2110, the illustrated method counts pixels within each of subquadrants 1-16. In the illustrated embodiment, this contemplates, by way of non-limiting example, counting only pixels above a threshold intensity level, e.g., 10 or 25 for radiological images and the like (i.e., medical images in which "whiteness" represents the highest intensity), or below such an intensity level, e.g., 245 or 230 for ultrasound images and the like (i.e., medical images in which "darkness" represents the highest intensity), although other embodiments may utilize different and / or multiple thresholds (where, for example, such counting is performed with respect to pixels within multiple threshold intensities), all within the purview of one of ordinary skill in the art in view of the teachings herein.
[0179] In step 2115, the method shown compares the count of pixels in each subquadrant (above / below / within the applied threshold(s)) with the pixels in each other subquadrant that cross the X axis as a line of symmetry, that cross the Y axis as a line of symmetry, and that cross a line combining the X and Y axes as a line of symmetry.
[0180] This can be illustrated by the following comparison for each of the pixels in subquadrants 1, 2, 5, and 6 of quadrant A:
[0181] (i) Pixels in subquadrants 3, 4, 7, and 8 of quadrant B for symmetry across the Y axis (indicated in FIG. 22B by the dark vertical line separating these two quadrants). As shown by the curves in that figure, the specific comparisons are as follows, with each number indicating a subquadrant and a "v" indicating the comparison:
[0182] 1v4
[0183] 2v3
[0184] 5v8
[0185] 6v7
[0186] (ii) Pixels in subquadrants 9, 10, 13, and 14 of quadrant C for symmetry across the X-axis (indicated in FIG. 22C by the dark horizontal line separating these two quadrants). As shown by the curves in that figure, the specific comparisons are as follows, with each number indicating a subquadrant and a "v" indicating the comparison:
[0187] 5v9
[0188] 6v10
[0189] 1v13
[0190] 2v14
[0191] (iii) Pixels of subquadrant 11, 12, 15, 16 of quadrant D for combined X and Y axis symmetry (indicated in FIG. 22D by the dark diagonal line separating these two quadrants). As shown by the curves in that figure, the specific comparisons are as follows, with each number indicating the subquadrant and "v" indicating the comparison:
[0192] 6v11
[0193] 2v15
[0194] 1v16
[0195] 5v12
[0196] Each comparison is a subtraction, or stated another way, each comparison determines the difference in the number of pixels in each of the compared subquadrants that are above / below / within the applied threshold(s), respectively. In some embodiments, the comparison further comprises taking the absolute value of the result of each subtraction.
[0197] The comparison of the subquadrant of quadrant A with the subquadrant of quadrants B, C, and D is described in detail above. Similarly, step 2115 compares the subquadrant of quadrant B with the subquadrant of quadrants C and D, and the subquadrant of quadrant C with the subquadrant of D, all of which are within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0198] Comparing pixel counts as described above is within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0199] In step 2120, the method is shown summing the results of the comparisons performed in step 2115. The resulting value is a measurement or quantification of the degree of balance of the object's PGMs and the mass or other tissue imaged thereby.
[0200] The degree of balance of a PGM, alone or in conjunction with spiculation quantification / characterization discussed in connection with FIG. 18, normalized pixel density discussed in connection with FIG. 19, relative centralized distance percentage discussed in connection with FIG. 20, and / or degree of pleomorphism discussed in connection with FIG. 23, can inform characterization of the PGM, for example, as potentially indicative of a cancerous, non-cancerous (e.g., normal density), or other mass, all within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0201] Thus, for example, an illustrated method may compare the degree of balance of a subject PGM to degrees of balance generated in a similar manner (e.g., through execution of steps 2100-215) for PGMs of tissues of known morphology, e.g., cancerous tissue, non-cancerous tissue, etc. If the comparison is good, the growth ring may be characterized as likely to be of that morphology. The comparison may be strict, in the sense of requiring numerical identity between each comparison value, or may be range-based, e.g., where tissues of known morphology are associated with a range of degrees of balance.
[0202] As reflected in step 2125, the degree of balance determined as described above may be displayed along with the target PGM (or otherwise), which may inform re-shading, colorization and / or other display enhancements of the growth ring (or "polygon") and / or PGM (or "multi-polygon mass"), for example, as discussed in connection with FIG. 7, so that, more particularly, as a non-limiting example, system 10 may vary the nature and / or degree of such enhancement of the GR or PGM forming a part thereof as a function of the degree of balance of the PGM, all of which is within the knowledge of those skilled in the art in light of the teachings herein.
[0203] As a further non-limiting example, such a system 10 may highlight, in one color or color range, PGMs having a balance degree that falls within one numerical range, and in another color or color range, PGMs whose balance degree falls within another such range.
[0204] The degree of balance of the PGM may alternatively or additionally inform the creation and / or sorting of such growth rings (or polygons), e.g., as described above in connection with FIG. 5, and / or the assembly of the PGM (or multi-polygon object), e.g., as described above in connection with FIG. 6, so that, more particularly, as a non-limiting example, system 10 may select or ignore growth rings as members of the PGM depending on the resulting degree of balance imparted to the PGM as a whole by those growth rings.
[0205] As a further non-limiting example, such a system 10 can use a degree of balance to select among growth rings whose perimeters would otherwise form the outer boundary of a multi-polygon PGM. The use of such a degree of balance can affect not only the highlighting and display of the PGMs, but also (i) their respective attenuation coefficients and other measures (e.g., size, density, whiteness / darkness, etc.), as described above in connection with FIG. 7 and in connection with the section entitled "Examples," and (ii) the retrieval and comparison between masses, as described above in connection with FIG. 8, for example, all by way of non-limiting example and all within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0206] A more complete understanding of the method illustrated in Figures 21-22 and described above in connection therewith may be achieved by reference to the listing of software provided below under the heading lesionBalanceCode-ASCII.
[0207] Radiomics - Polymorphism Determination
[0208] 23, the system 10, and more particularly, for example, one or more of the client and / or server devices 12-18, can quantify (or determine the degree of) polymorphism in a region of interest (ROI) and / or PGM of interest. Polymorphism is the total count of growth rings in the ROI of interest or PGM of interest.
[0209] As used in this section without loss of specificity or generality, the terms pixel gradation mass and PGM refer to a series of concentric growth rings, such as an assembly of the type described above in connection with Figure 6. Programming of system 10, and more particularly devices 12-18, to implement the method of Figure 20 is within the knowledge of those skilled in the art in light of the teachings herein.
[0210] In step 2300, the illustrated method counts the number of growth rings within a target ROI or PGM, which may be a ROI or PGM identified by a user via mouse, touch screen, or other method, as would be within the knowledge of one of ordinary skill in the art in light of the teachings herein. Alternatively or additionally, the target ROI or PGM may be automatically selected (i.e., by operation of system 10) as part of the illustrated methodology, e.g., in connection with determining the degree of balance of one or more PGMs identified and / or displayed by system 10, as well as within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0211] Counting growth rings within a target ROI or PGM is within the knowledge of one of ordinary skill in the art in light of the teachings herein and can be performed by any of a number of techniques known in the art as adapted in accordance with the teachings herein. In the illustrated embodiment, for example, this is accomplished by examining a data structure employed in the software and counting the number of GRs with boundaries that are within the target ROI / PGM. In some embodiments, counting is limited to GRs with specified characteristics, such as an average pixel intensity above a threshold, all of which are within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0212] The degree of polymorphism of a PGM, alone or in conjunction with the quantification / characterization of spicules discussed in connection with FIG. 18, the normalized pixel density discussed in connection with FIG. 19, the relative centralized distance percentage discussed in connection with FIG. 20, and / or the balance determination discussed in connection with FIGs. 21-22, can inform the characterization of that PGM, for example, as indicative of a potentially cancerous, non-cancerous (e.g., natural density), or other mass, all of which are within the knowledge of one of ordinary skill in the art in light of the teachings herein.
[0213] Thus, for example, the illustrated method may compare the degree of polymorphism of the PGM of interest to the degree of polymorphism generated in a similar manner (e.g., through performance of step 2300) for PGMs of tissues of known morphology, e.g., cancerous tissue, non-cancerous tissue, etc. If the comparison is good, the growth ring may be characterized as likely to be of that morphology. The comparison may be strict, in the sense of requiring numerical identity between each comparison value, or may be range-based, such as where tissues of known morphology are associated with a range of degrees of polymorphism.
[0214] As reflected in step 2305, the degree of polymorphism determined as described above may be displayed along with the subject ROI / PGM (or otherwise), which may inform re-shading, colorization and / or other display enhancement of the growth ring (or "polygon") and / or PGM (or "multi-polygon mass"), for example, as discussed in connection with FIG. 7, so that, more particularly, as a non-limiting example, system 10 may vary the nature and / or degree of such enhancement of the GR or PGM forming a part thereof as a function of the degree of polymorphism of the subject ROI / PGM, all of which are within the knowledge of those skilled in the art in light of the teachings herein.
[0215] As a further non-limiting example, such a system 10 may highlight, in one color or color range, PGMs having a degree of polymorphism that falls within one numerical range, and, in another color or color range, PGMs having a degree of polymorphism that falls within another such range.
[0216] The degree of polymorphism of the PGM may alternatively or additionally inform the creation and / or reordering of such growth rings (or polygons), e.g., as described above in connection with FIG. 5, and / or the assembly of the PGM (or multi-polygon object), e.g., as described above in connection with FIG. 6, so that, more particularly, as a non-limiting example, system 10 may select or, conversely, ignore growth rings as members of the PGM depending on the resulting degree of polymorphism imparted to the PGM as a whole by those growth rings.
[0217] As a further non-limiting example, such a system 10 can use the degree of polymorphism to select among growth rings having perimeters that would otherwise form the outer boundary of a multi-polygon PGM. The use of such degrees of polymorphism can affect not only the highlighting and display of PGMs, but also (i) their respective attenuation coefficients and other measures (e.g., size, density, whiteness / darkenness, etc.), as described above in connection with FIG. 7 and in connection with the section entitled "Examples," and (ii) the searching and comparison between masses, as described above in connection with FIG. 8, for example, all of which are non-limiting examples and all within the knowledge of one of ordinary skill in the art in view of the teachings herein.
[0218] A more complete understanding of the method illustrated in FIG. 23 and described above in connection therewith may be achieved by reference to the software listing provided below under the heading centralizedDensityCode-ASCII.
[0219] A more complete understanding of the methods illustrated in and described above in connection with Figures 18-23 may be achieved by reference to the listing of software provided below under the heading additionalDensitySupportcode-ASCII.
[0220] Software 1 - ASCII
[0221] DeepLook Source Code from U.S. Provisional Patent Application No. 62 / 678,644, filed May 31, 2018
[0222] Below is the current DeepLook source code in C / C++ for the pseudocode above: The pseudocode above and the coding algorithms below can be developed, created and / or written in any programming or scripting language, including but not limited to Java, JavaScript, Python, ActionScript, Assembler, C#, BASIC, PERL, RUBY, Objective C, PHP.
[0223] Non-Generic header files DeepLook.h #pragma once #include "resource.h" Resource.h / / {{NO_DEPENDENCIES}} / / Microsoft Visual C++ generated include file. / / Used by DeepLook.rc / / #define IDC_MYICON 2 #define IDB_RedTrafficLight 3 #define IDD_DEEPLOOK_DIALOG 102 #define IDS_APP_TITLE 103 #define IDD_ABOUTBOX 103 #define IDM_ABOUT 104 #define IDM_EXIT 105 #define IDC_DEEPLOOK 109 #define IDR_MAINFRAME 128 #define IDI_DeepLookIcons 130 #define IDR_RT_RCDATA1 131 #define IDB_HelpDropdown 132 #define IDB_HelpTrackbars 133 #define IDB_HelpButtons 134 #define IDB_HelpBubble 137 #define IDB_OverlayGrey 139 #define IDB_GSRedTrafficLight 141 #define IDB_OverlayBlue 142 #define IDB_OverlayRed 144 #define IDB_GreenTrafficLight 145 #define IDB_GreyTrafficLight 147 #define IDB_LSWD_L 149 #define IDB_LSWD_S 150 #define IDB_LSWD_W 151 #define IDB_LSWD_D 152 #define IDB_LSWD_Grey 153 #define IDB_OverlayOnGrey 154 #define IDB_Camera27x20 155 #define IDB_OpenControls 156 #define IDB_WhiteCenter 157 #define IDB_MagMinus 158 #define IDB_MagPlus 159 #define IDB_MagMinusPlus 160 #define IDB_BlackWindow38x25 161 #define IDB_OverlayOff 162 #define IDB_OverlayOn 163 #define IDB_BITMAP1 164 #define IDB_BlackCenter 164 #define IDC_STATIC -1 / / Next default values for new objects / / #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 165 #define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 110 #endif #endif C / C++ Code: #include <afxwin.h> #include "afxcmn.h" #include "stdafx.h" #include <stdio.h> #include "DeepLook.h" #include <process.h> #include <time.h> #include "atlimage.h" #include <atlbase.h> #include <atlstr.h> #include <comutil.h> #include <fcntl.h> #include <io.h> #include <process.h> #include <windows.h> #include <wingdi.h> #include <windowsx.h> #include <winUser.h> #include <CommCtrl.h> #include <Commdlg.h> #include <wbemidl.h> #include <sys / stat.h> #include <Ddraw.h> #pragma comment(lib, "gdi32.lib") #pragma comment(lib, "User32.lib") #pragma comment(lib, "comctl32.lib") #pragma comment(lib,"Comdlg32.lib") #pragma comment(lib, "wbemuuid.lib") #pragma comment(lib,"Ddraw.lib") #pragma comment(lib,"Dxguid.lib") using namespace std; #define MAX_LOADSTRING 100 #define Window_Line_Width 8 #define Window_Top_Bar_Height 31 #define Stop_Light_Bar_Height 22 #define Color_Group_Count 7 #define Max_Color_Count 256 #define Grey_Scale_Colors_4 4 #define Grey_Scale_Shift_4 6 #define Grey_Scale_Colors_8 8 #define Grey_Scale_Shift_8 5 #define Grey_Scale_Colors_16 16 #define Grey_Scale_Shift_16 4 #define Grey_Scale_Colors_32 32 #define Grey_Scale_Shift_32 3 #define Grey_Scale_Colors_64 64 #define Grey_Scale_Shift_64 2 #define Grey_Scale_Colors_128 128 #define Grey_Scale_Shift_128 1 #define Grey_Scale_Colors_256 256 #define Grey_Scale_Shift_256 0 / / byte positions #define Grey_Scale_XY_Path_Byte_Offset 4 #define Percent_Used_XY_Path_Byte_Offset 5 #define X_Center_XY_Path_Byte_Offset 6 #define Y_Center_XY_Path_Byte_Offset 7 #define Ratio_XY_Path_Byte_Offset 8 #define Horiz_Len_XY_Path_Byte_Offset 9 #define Vert_Len_XY_Path_Byte_Offset 10 #define Text_AverageX_XY_Path_Byte_Offset 11 #define Text_AverageY_XY_Path_Byte_Offset 12 #define Text_Horiz_Len_XY_Path_Byte_Offset 13 #define Text_Vert_Len_XY_Path_Byte_Offset 14 #define Contrast_Len_XY_Path_Byte_Offset 15 #define Record_Inc 29 #define Row_Write_Size Record_Inc #define Column_Write_Size Row_Write_Size #define Growth_Node_Size (25+4) #define Header_Contrast_Short_Int_Offset 14 #define Header_Brightest_Pixel_Short_Int_Offset 15 #define Header_Brightest_Shape_Short_Int_Offset 16 #define Header_Brightest_Growth_Node_Short_Int_Offset 17 #define Header_Darkest_Growth_Node_Short_Int_Offset 18 #define Header_Densist_Growth_Node_Short_Int_Offset 19 #define Header_Least_Dense_Growth_Node_Short_Int_Offset 20 #define Header_Most_Layers_Growth_Node_Short_Int_Offset 22 #define Header_Least_Layers_Growth_Node_Short_Int_Offset 24 #define Header_Largest_Pixel_Count_Growth_Node_Short_Int_Offset 26 #define Header_Smallest_Pixel_Count_Growth_Node_Short_Int_Offset 28 #define Start_Layer_Used_Flags_Short_Int_Offset 30 #define No_Color -4 #define Mask_It -3 #define Border_Mark 1000 #define Mark_Still_Good 1000 #define Min_Percent_To_Notice 0.0025 #define Closure_Area 80 #define Closure_Gap 0.09 #define Min_OIO_Pixel_Count 10 #define Max_Shading_Layers_Displayed 20 #define Saved_Layers_Count 19 #define File_Header_Length_Bytes ((2*(Header_Smallest_Pixel_Count_Growth_Node_Short_Int_Offset+2))+(Saved_Layers_Count-2)) #define Write_Out_Buffer_Size 500 #define Max_Objects_Per_Image 100000 #define Max_Row_Nodes_Per_Image 200000 #define Max_Column_Nodes_Per_Image Max_Row_Nodes_Per_Image #define Image_To_Complex -6 #define Max_OS_Memory_Size 1000000 / / 32 meg limit -- total 4,096 #define Max_XY_OS_Memory_Size 4000000 #define Max_XY_Column_Memory_Size 1000000 #define Max_XY_Column_Node_Memory_Size 1000000 #define Max_Growth_Nodes 20000 #define SAVE_SHAPE_GREY_SCALE 100 #define Default_Current_Layer 3 / / #define Default_Current_Pixel_Count 1 / / smallest one #define Default_Current_Whiteness_Percent 750 / / 75 eighty percent #define Default_Current_Density_Percent 750 / / 75 eighty percent #define Default_Stop_Layers 3 #define Default_Max_Mass 1 / / GN defines #define XY_Offset 13 #define Child_Offset 21 #define Mag_Buttons_Width 41 #define Traffic_Light_Width 41 #define Traffic_Light_Height 20 #define Green_Light 0 #define Red_Light 1 #define Grey_Light 2 #define Traffic_Light_Count 3 #define Button_Width_And_Height 20 #define Button_Spacing 2 #define Camera_Button_Width 27 #define Box_LSWD_Width 67 #define Buttons_Push_Right 2 #define Button_Space_Mulitplier 2 / / AWDL BUTTON WIDTHS #define Auto_Button_End 20 #define XL_LSWD_End 15 #define XS_LSWD_End 30 #define XW_LSWD_End 50 #define To_Be_Marked_Done 999999 #define Control_Button_Letter_height 12 #define Auto_Button_Width 40 #define Auto_Label_Height 30 #define Control_Button_Top_Spacer 6 #define Control_Button_Row_Height (16+Control_Button_Top_Spacer) #define Control_Button_Spacer 50 #define Controls_Width ((Control_Button_Spacer*5)+Button_Spacing) #define W_Width 16 #define D_Width 11 #define WD_Width 22 #define WD_Height 10 #define Background_Black_Box_Width 38 #define Background_Black_Box_Height 25 #define Black_Box_1_xPos_Offset 5 #define Tracker_Bar_YPos (Stop_Light_Bar_Height+Control_Button_Row_Height+Background_Black_Box_Height+(Button_Spacing*2)) #define Control_Buttons_Bottom_Y (Stop_Light_Bar_Height+Control_Button_Row_Height) #define Auto_Label_Top_Y (Stop_Light_Bar_Height+Control_Button_Row_Height+Auto_Label_Vert_Top_Space) #define Auto_Label_Bottom_Y (Stop_Light_Bar_Height+Control_Button_Row_Height+Auto_Label_Height+Auto_Label_Top_Y) #define Slider_Label_Y (Stop_Light_Bar_Height+4) #define Slider_Black_Box_Text_Y_Pos (Stop_Light_Bar_Height+Control_Button_Row_Height) #define Auto_Button_Bottom (Stop_Light_Bar_Height+Control_Button_Top_Spacer+Auto_Label_Height+Auto_Label_Vert_Top_Space +14) #define TB_ID_L 1 #define TB_ID_S 2 #define TB_ID_W 3 #define TB_ID_D 4 #define DL_ID_L 66664 #define DL_ID_MaxMass 66665 #define DL_ID_StopLayer 66666 #define Single_Side_Track_Bar_Width 25 #define Double_Side_Track_Bar_Width 42 #define Track_Bar_Generic_Tics 200.0 #define Track_Bar_Height 227 #define Track_Bar_Text_Width 20 #define Black_Screen_Text_Font_Size_Small 8 #define Black_Screen_Text_Font_Size_Large 12 #define Xtra_Large_Screen_Text_Font_Size_Large 14 #define Black_Box_Text_Font_Size 14 #define Slider_Numbers_Font_Size 10 #define Number_Drop_Down_List_Font_Size 12 #define Label_Font_Size 14 #define Label_Width Control_Button_Spacer #define Label_Height ((Label_Font_Size*2)+Button_Spacing) #define Number_Drop_Down_List_Width 40 #define Number_Drop_Down_List_Height 300 #define Number_Drop_Down_List_Window_Height (Label_Height+Number_Drop_Down_List_Font_Size+10) #define Drop_List_Vert_Space 14 #define Density_Percent_Garbage_Value_Split 300 / / 30 #define Density_Garbage_Value_Split 800 #define Auto_Label_Vert_Top_Space 48 / / 16 / / 50 #define X_Off_Screen -10000 #define WDL_Text_Length 100 #define Machine_Code_Char_Length 8 / / thread states #define Thread_Idle -1 #define Thread_Has_Data_To_Process -2 #define Save_Draw_Rectangle_Space 10 #define Max_Key_Length 700 #define No_Overlay 1 #define Overlay_Only 2 #define Overlay_And_Grey 3 #define Overlay_Color_Grey 0 #define Overlay_Color_Blue 1 #define Overlay_Color_Red 2 #define Overlay_Color_Count 3 #define Overlay_Only_Grey 250 #define yPos_Help_Q 0 #define XPos_Offset_Q_Mark (Box_LSWD_Width+1) #define Question_Mark_Width 6 #define Question_Mark_Height 8 #define Min_Window_Size 325 #define Max_Window_Size 800 #define Help_Window_Width 928 #define Help_Window_Height 185 #define Help_Window_Height_Two_Rows 374 #define Help_Dropdowns_Window_Width 465 #define Help_Dropdowns_Window_Height 224 #define xPos_Help_1 18 #define xPos_Help_2 249 #define xPos_Help_3 483 #define xPos_Help_4 714 #define YPos_Help 32 #define Help_Width 90 #define Help_Height 90 #define Mag_Minus 0 #define Mag_Plus 1 #define Mag_Minus_Plus 2 #define Mag_Button_Count 3 #define Max_Button_Click_Count 4 #define Ypos_Offscreen_Negative_Offset -1000 #define Min_Thread_Process_Size (Min_Window_Size / 4) int realMinWindowSize = Min_Window_Size; int mapAreaWidth = realMinWindowSize; int mapAreaHeight = mapAreaWidth; int windowTopBarHeight = 0; int windowBorderWidth = 0; int yPosOffScreen = Ypos_Offscreen_Negative_Offset; int threadMemMode = 2; #define WD_Slider_Numbers_xPos ((magWidthHightInc[magButtonClickCount].width+Black_Box_1_xPos_Offset)+Single_Side_Track_Bar_Width+1) #define Slider_Numbers_yPos (Tracker_Bar_YPos+8)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> char *numbersChar = (char *)"10\n\n9.0\n\n8.0\n\n7.0\n\n6.0\n\n5.0\n\n4.0\n\n3.0\n\n2.0\n\n1.0\n\n0";<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> char *layersChar = (char *)"20\n19\n18\n17\n16\n15\n14\n13\n12\n11\n10\n9\n8\n7\n6\n5\n4\n3\n2\n--\n--";<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> char *mostLeast = (char *)"M\no\ns\nt\n\n\n\n\n\n\n\n\n\n\n\n\nL\ne\na\ns\nt";<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> char *bigSmall = (char *)"B\ni\ng\ng\ne\ns\nt\n\n\n\n\n\n\nS\nm\na\nl\nl\ne\ns\nt";<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> bool debugSquare = false;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> bool inTrafficLightFlashMode = false;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> int xPosDropBoxLabel = 0;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> int xPosDropBox = 0;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> bool handPointer = false;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> bool drawTissue = false;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> bool doingWindowGrab = false;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> / * red * / <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> COLORREF layerColorsRed[Max_Shading_Layers_Displayed] = { RGB(255, 255, 255),RGB(220, 220, 255),RGB(165, 165, 255),RGB(105, 105,255),RGB(45, 45, 255),<h2 style=";text-align:left;direction:ltr"> RGB(0, 0, 240),RGB(0, 0, 180),RGB(0, 0, 120),RGB(0, 0, 60),RGB(30, 30, 60), RGB(0, 0, 30),RGB(30, 0, 0),RGB(60, 30, 30),RGB(60, 0, 0),RGB(120, 0, 0), RGB(180, 0, 0),RGB(240, 0, 0),RGB(255, 45, 45),RGB(255, 105, 105),RGB(255, 165, 165)}; / * blue * / COLORREF layerColorsBlue[Max_Shading_Layers_Displayed] = { RGB(255, 255, 255),RGB(255,220, 220),RGB(255,165, 165),RGB(255,105, 105),RGB(255,45, 45), RGB(240, 0, 0),RGB(180, 0, 0),RGB(120, 0, 0),RGB(60, 0, 0),RGB(60, 30, 30), RGB(30, 0, 0),RGB(0, 0,30),RGB(30, 30,60),RGB(0, 0,60),RGB(0, 0,120), RGB(0, 0,180),RGB(0, 0,240),RGB(45, 45,255),RGB(105, 105,255),RGB(165, 165,255)}; / * greyscale* / COLORREF layerColorsGreyScale[Max_Shading_Layers_Displayed] = { RGB(255, 255, 255), RGB(240,240, 240), RGB(235,235, 235), RGB(225,225, 225), RGB(215,215, 215), RGB(205, 205,205), RGB(195, 195, 195), RGB(185, 185, 185), RGB(175, 175, 175), RGB(165, 165, 165), RGB(155, 155, 155), RGB(145, 145,145), RGB(130, 130,130), RGB(125, 125,125), RGB(115, 115,115), RGB(105, 105,105), RGB(90, 90,90), RGB(75, 75,75), RGB(50, 50,50), RGB(0, 0,0)}; COLORREF *layerColorsUsed; CRect targetDrawAreaCRect = { NULL}; unsigned int *growthNodeLayersForDisplay[Max_Shading_Layers_Displayed]; unsigned int *growthNodeLayersForDisplayPtr[Max_Shading_Layers_Displayed]; unsigned short *xyStrings; class CScreenImage : public CImage { public: BOOL CaptureRect(const CRect& rect); / / BOOL CaptureScreen(); BOOL CaptureWindow(HWND hWnd); }; CScreenImage *cleanCImage = nullptr; CImage *drawCImage = nullptr; bool enterStarted = false; bool isMove = false; bool RedFlashMode = false; bool blackOutClientImageArea = true; bool windowClientAreaRedraw = false; bool updateTrackBarValues = false; HBITMAP trafficLightBitMaps[Traffic_Light_Count]; HBITMAP magButtons[Mag_Button_Count]; HBITMAP magButton; int magButtonClickCount = 0; HBITMAP OpenControls; HBITMAP Camera; HBITMAP LSWDL; HBITMAP LSWDS; HBITMAP LSWDW; HBITMAP LSWDD; HBITMAP LSWDGrey; #define LSWD_Grey 0 #define LSWD_L 1 #define LSWD_S 2 #define LSWD_W 3 #define LSWD_D 4 int autoState = 0; HBITMAP LBW; HBITMAP LBD; HBITMAP LBWD; HBITMAP autoLayerButton; HBITMAP WDLTextDisplayBackground; HBITMAP BWorWB; HBITMAP overlayColor; HBITMAP overlayOnOff; HBITMAP BlackWindow38x25; HBITMAP helpBubble = nullptr; HBITMAP helpButtons = nullptr; HBITMAP helpTrackbars = nullptr; HBITMAP helpDropdowns = nullptr; HWND globalhWnd; HWND layersTrackhWnd = nullptr; HWND sizeTrackhWnd = nullptr; HWND whiteTrackhWnd = nullptr; HWND denseTrackhWnd = nullptr; / / HWND layersDropdownListhWnd = nullptr; HWND maxMassDropdownListhWnd = nullptr; HWND stopLayerDropdownListhWnd = nullptr; HWND mainHelpScreen = nullptr; HWND mainHelpButtons = nullptr; HWND mainHelpTrackbars = nullptr; HWND mainHelpDropdowns = nullptr; HFONT blackScreenTextFontSmall; HFONT blackScreenTextFontLarge; HFONT xtraLargeBlackScreenTextFontLarge; HFONT blackBoxTextFont; HFONT sliderNumbersFont; HFONT dropDownListFont; HFONT boldLabelFont; HFONT labelFont; char WDLTextChar[WDL_Text_Length + 1]; HANDLE mainWorkerThreadWait; HANDLE *workerThreads; HANDLE mainWorkerThreadWaitDone; HANDLE filterThread; float trackBarPixelCountTicMultiplier = 1; float trackBarLayersTicMultiplier = 1; bool killMe = false; char *staging = (char *)".\\staging.exe"; int threadCount = 0; / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / bool WDTrackBar = true; int trafficLightIndex = Green_Light; UINT_PTR flashTimerID = 0; RECT holdRect = { NULL}; bool drawGrowthNodes = false; char *patentText = (char *)" marginSpiculationCode-ASCII / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void loadMarginPercentDefine(ShapeDefine *shapeDefine,MarginPercentDefine *marginPercentDefine) { typedef struct SpicRunLen { int runLen; int count; } SpicRunLen; int inc = 0; int currentRun = 1; SpicRunLen* spicRunLen = (SpicRunLen*)malloc(Pixel_Run_Ratio_Count * sizeof(SpicRunLen)); memset(spicRunLen, 0, Pixel_Run_Ratio_Count * sizeof(SpicRunLen)); int direction = Right_Up; bool lookForEnd = false; XYPoint* startXYPtr; XYPoint* endXYPtr; int xyPointCountNoNegEnd; if (shapeDefine->shrunkXYPoint != nullptr) { startXYPtr = shapeDefine->shrunkXYPoint; xyPointCountNoNegEnd = shapeDefine->shrunkXYPointCount - 1; } else { startXYPtr = shapeDefine->xyPoint; xyPointCountNoNegEnd = shapeDefine->xyPointCount - 1; } endXYPtr = startXYPtr + xyPointCountNoNegEnd; XYPoint* lastXYPoint = startXYPtr - 1; XYPoint* xyPointPtr = lastXYPoint + 1; XYPoint* startPixelRun = xyPointPtr; int pixelRunCount = 0; while (1) { lastXYPoint++; xyPointPtr++; if (lastXYPoint >= endXYPtr) { lastXYPoint = startXYPtr; lookForEnd = true; } if (xyPointPtr >= endXYPtr) { xyPointPtr = startXYPtr; } int nextDirection = getDirection(lastXYPoint, xyPointPtr, direction); if ((direction != nextDirection) || (lookForEnd == true)) { pixelRunCount++; int hDistance = distanceBetweenTwoPoints((double)lastXYPoint->xPos, (double)lastXYPoint->yPos, (double)startPixelRun->xPos, (double)startPixelRun->yPos) + 1; / / last should be inclusive. Its' not. int pixelRatio = ((hDistance * 100) / currentRun); if ((pixelRatio >= 0) && (pixelRatio < (Pixel_Run_Ratio_Count - 1))) { SpicRunLen* spicRunLenPtr = &(spicRunLen[pixelRatio]); if (lastXYPoint >= startPixelRun) { spicRunLenPtr->runLen += ((int)(lastXYPoint - startPixelRun) + 1); } else { spicRunLenPtr->runLen += ((shapeDefine->xyPointCount - 1) - ((int)(startPixelRun - lastXYPoint) - 1)); } spicRunLenPtr->count++; } else { spicRunLen[Pixel_Run_Ratio_Count - 1].count++; if (lastXYPoint >= startPixelRun) { spicRunLen[Pixel_Run_Ratio_Count - 1].runLen += ((int)(lastXYPoint - startPixelRun) + 1); } else { spicRunLen[Pixel_Run_Ratio_Count - 1].runLen += ((shapeDefine->xyPointCount - 1) - ((int)(startPixelRun - lastXYPoint) - 1)); } } if (lookForEnd == true) { break; } startPixelRun = xyPointPtr; currentRun = 0; direction = nextDirection; } currentRun++; } #define Seventy_Percent_Offset 60 #define Eighty_Percent_Offset 70 #define Ninety_Percent_Offset 80 #define One_Hundred_Percent_Offset 90 / * #define Eighty_Index 1 #define Ninety_Index 2 #define One_Hundred_Index 3 * / int* seventyValue = &(marginPercentDefine->value[Seventy_Index]); *seventyValue = 0; SpicRunLen* spicRunLenPtr; spicRunLenPtr = &(spicRunLen[Seventy_Percent_Offset]); for (inc = Seventy_Percent_Offset; inc < Seventy_Percent_Offset + 10; inc++, spicRunLenPtr++) { (*seventyValue) += ((spicRunLenPtr->runLen * 1000) / (shapeDefine->xyPointCount - 1)); } (*seventyValue) / = 10; if ((*seventyValue) >= 100) { (*seventyValue) = 99; } int* eightyValue = &(marginPercentDefine->value[Eighty_Index]); *eightyValue = 0; spicRunLenPtr = spicRunLen + Eighty_Percent_Offset; for (inc = Eighty_Percent_Offset; inc < Eighty_Percent_Offset + 10; inc++, spicRunLenPtr++) { *eightyValue += ((spicRunLenPtr->runLen * 1000) / (shapeDefine->xyPointCount - 1)); } int* ninetyValue = &(marginPercentDefine->value[Ninety_Index]); *ninetyValue = 0; spicRunLenPtr = spicRunLen + Ninety_Percent_Offset; for (inc = Ninety_Percent_Offset; inc < Ninety_Percent_Offset + 10; inc++, spicRunLenPtr++) { *ninetyValue += ((spicRunLenPtr->runLen * 1000) / (shapeDefine->xyPointCount - 1)); } int* oneHundredValue = &(marginPercentDefine->value[One_Hundred_Index]); *oneHundredValue = 0; spicRunLenPtr = spicRunLen + One_Hundred_Percent_Offset; for (inc = One_Hundred_Percent_Offset; inc < One_Hundred_Percent_Offset + 10; inc++, spicRunLenPtr++) { *oneHundredValue += ((spicRunLenPtr->runLen * 1000) / (shapeDefine->xyPointCount - 1)); } free(spicRunLen); } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void loadMarginSpiculationRadiomics(ShapeDefine *shapeDefine) { int range = 0; / / 10 is one percent if (spiculationNodes == nullptr) { return; } SpiculationNode* lastNode; int radiomicPercentResults[Margin_Percent_Count]; while (1) { / / shapeDefine->rangeSpiculationRadiomics = nullptr; int radiomicMatchValue = getMarginCompareSpiculationRange((shapeDefine->marginPercentDefine.value), range, firstNode,-1, &lastNode,1); if (radiomicMatchValue > -1) { shapeDefine->matchRadiomics.radiomicMatchValue = radiomicMatchValue; return; } range+=10; / / 10 is one percent if (range > 1000) { return; } } } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / int getMarginCompareSpiculationRange(int *value, int range, SpiculationNode* columnNodePtr, int bestRadiomicMatchValue,SpiculationNode **lastNode, int nodeChildCount) { int startRange = *value - range; int endRange = *value + range; / / range pass Loop while (1) { / / send off all siblings within range. if (columnNodePtr->value < startRange) { columnNodePtr = columnNodePtr->sibling; if (columnNodePtr == nullptr) { break; } continue; } if (columnNodePtr->value > endRange) { break; } SpiculationNode* localLastNode = nullptr; int radiomicMatchValue; if (nodeChildCount != 8) { radiomicMatchValue = getMarginCompareSpiculationRange(value + 1, range, columnNodePtr->child, bestRadiomicMatchValue, &localLastNode, nodeChildCount+1); } else { radiomicMatchValue = getShapeDefineRadiomicColumnDifference(columnNodePtr,value); } if ((radiomicMatchValue != -1) && (bestRadiomicMatchValue < radiomicMatchValue)) { bestRadiomicMatchValue = radiomicMatchValue; *lastNode = localLastNode; } columnNodePtr = columnNodePtr->sibling; if (columnNodePtr == nullptr) { break; } } return(bestRadiomicMatchValue); } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / int getColumnsSpiculation(SpiculationNode* columnNodePtr, int* valuePtr) { int rawSpiculation = 0; int inc; for (inc = 0 ; inc < Margin_Percent_Count; inc++,valuePtr--) { int distance = abs(columnNodePtr->value - *valuePtr); / / columns individual column distance more weighted then other columns collectively if (distance > 40) / / 40 is 4 percent, one percent for each column. { distance += (distance >> 1); } rawSpiculation += distance; columnNodePtr = columnNodePtr->parent; } int returnValue = Best_Spiculation - rawSpiculation; if (returnValue < 0) { returnValue = 0; } return(returnValue); } NormalizedPixelDensity-ASCII / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / bool getUsedPixelCountAverageGreyScale(int* imagePixelArray, ShapeDefine* shapeDefine, CommandData* commandData) { int xPos; int yPos; int usedPixelCount = 0; int greyScaleValue = 0; int width = commandData->shapeWidth; int height = commandData->shapeHeight; shapeDefine->width = width; shapeDefine->height = height; shapeDefine->xOffsetInCaptureCimage = commandData->xPos; shapeDefine->yOffsetInCaptureCimage = commandData->yPos; Mass* mass = commandData->mass; int screenOverlayCImageXPos = shapeDefine->xOffsetInCaptureCimage - mass->processingPixelSquareOffset; int screenOverlayCImageYPos = shapeDefine->yOffsetInCaptureCimage - mass->processingPixelSquareOffset; shapeDefine->rect = { screenOverlayCImageXPos,screenOverlayCImageYPos, (screenOverlayCImageXPos + shapeDefine->width) - 1, (screenOverlayCImageYPos + shapeDefine->height) - 1}; shapeDefine->usedPixels = (XYPoint*)malloc(width * height * sizeof(XYPoint)); if (shapeDefine->usedPixels == nullptr) { doAbort((char*)"usedPixels shapeDefine malloc failed inc \n"); } XYPoint* usedPixelsPtr = shapeDefine->usedPixels; int xPosOffset = commandData->xPos; int yPosOffset = commandData->yPos; int* greyScalePixelsPtr = mass->greyScalePixels; for (yPos = 0; yPos < height; yPos++) { for (xPos = 0; xPos < width; xPos++) { int pixelValue = *(imagePixelArray + (xPos + (yPos * width))); if (pixelValue > -1) { usedPixelCount++; greyScaleValue += *(greyScalePixelsPtr + ((xPos + xPosOffset) + ((yPos + yPosOffset) * screenCaptureWidthAndHeight))); usedPixelsPtr->xPos = xPos + screenOverlayCImageXPos; usedPixelsPtr->yPos = yPos + screenOverlayCImageYPos; usedPixelsPtr++; } } } #define Check_Percent_Used_Pixel_count ((Min_OIO_Pixel_Count*2)*(Min_OIO_Pixel_Count*2)) if (usedPixelCount <= 0) { doAbort((char*)"Used pixel count <= 0. getUsedPixelCountAverageGreyScale"); } int averageGreyScale = greyScaleValue / usedPixelCount; int totalPixels = width * height; if ((totalPixels <= Check_Percent_Used_Pixel_count) && (usedPixelCount < (int)((float)totalPixels * 0.40))) { free(shapeDefine->usedPixels); shapeDefine->usedPixels = nullptr; shapeDefine->usedPixelCount = 0; if (shapeDefine->shapeOverlay != nullptr) { shapeDefine->shapeOverlay->Destroy(); delete shapeDefine->shapeOverlay; shapeDefine->shapeOverlay = nullptr; } return(false); } qsort(shapeDefine->usedPixels, (size_t)usedPixelCount, (size_t) sizeof(XYPoint), compareXYPoint); shapeDefine->usedPixelCount = usedPixelCount; shapeDefine->averageGreyScale = averageGreyScale; if (shapeDefine->averageGreyScale < mass->startPixelDepth) { shapeDefine->spiculationRadiomics.normalizedPixelDensity = 0; } else { if (shapeDefine->averageGreyScale >= (mass->startPixelDepth + mass->pixelDepthLength)) { shapeDefine->spiculationRadiomics.normalizedPixelDensity = 999; } else { shapeDefine->spiculationRadiomics.normalizedPixelDensity = ((shapeDefine->averageGreyScale - mass->startPixelDepth) * 1000) / mass->pixelDepthLength; if (shapeDefine->spiculationRadiomics.normalizedPixelDensity >= 1000) { shapeDefine->spiculationRadiomics.normalizedPixelDensity = 999; } } } / * / / debug int shapeID = shapeDefine->usedPixelCount + shapeDefine->width + (shapeDefine->height * 2); / / printf("\n** ShapeID %d ave %d norm %d**\n", shapeID, shapeDefine->averageGreyScale, shapeDefine->normalizedPixelDensity); shapeDefine->xyPoint = commandData->xyPoint; shapeDefine->xyPointCount = commandData->xyPointCount; char holdName
[0101] ; sprintf_s(holdName, 100, "shapeID__%d__ave_%d__norm__%d", shapeID, shapeDefine->averageGreyScale, shapeDefine->normalizedPixelDensity); printf(holdName); dumpShapeDefine(shapeDefine, holdName, 1, DL_Text_Green, 1, mass); / / end debug * / / / get distance shapeDefine->distanceFromClick = getDistanceFromClick(mass->processingPixelSquareMouseXYPos + mass->screenCaptureSquare.xOffset, mass->processingPixelSquareMouseXYPos + mass->screenCaptureSquare.xOffset, shapeDefine, commandData->xyPoint, commandData->xyPointCount); shapeDefine->centerPoint.xPos = (shapeDefine->width / 2) + (shapeDefine->xOffsetInCaptureCimage - mass->processingPixelSquareOffset); shapeDefine->centerPoint.yPos = (shapeDefine->height / 2) + (shapeDefine->yOffsetInCaptureCimage - mass->processingPixelSquareOffset); shapeDefine->centerPointDistanceFromClick = distanceBetweenTwoPoints( (double)(shapeDefine->centerPoint.xPos), (double)(shapeDefine->centerPoint.yPos), (double)(mass->processingPixelSquareMouseXYPos), (double)(mass->processingPixelSquareMouseXYPos)); return(true); } centralizedDensityCode-ASCII / / set the main shapes diameter lines. initRulerPoints(shapeDefine->rulerPoint); processPixelsManager->setRulerInfo(shapeDefine, mass); processPixelsManager->getDensistMatchShapeDefineDrawOverlay(shapeDefine, mass, processPixelsManager->greyScaleThreadDefineArray, true); / / } / / selectedShapeDefinesPtrPtr = mass->selectedShapeDefinesPtrPtr; / / for (inc = 0; inc < selectedShapeDefinesCount; inc++, selectedShapeDefinesPtrPtr++) / / { / / ShapeDefine* shapeDefine = *selectedShapeDefinesPtrPtr; if (shapeDefine->spiculationRadiomics.densityCenterShapeDefine == nullptr) { shapeDefine->spiculationRadiomics.density = 1; shapeDefine->spiculationRadiomics.densityCenter = 1000; } else { XYPoint centerMassCenterPoint; getShapeCenterPoint(shapeDefine->spiculationRadiomics.densityCenterShapeDefine, mass, ¢erMassCenterPoint); XYPoint shapeCenterPoint; getShapeCenterPoint(shapeDefine, mass, &shapeCenterPoint); shapeDefine->spiculationRadiomics.densityCenter = (distanceBetweenTwoPoints((double)centerMassCenterPoint.xPos, (double)centerMassCenterPoint.yPos, (double)shapeCenterPoint.xPos, (double)shapeCenterPoint.yPos) * 1000) / ((shapeDefine->longestDiameter + shapeDefine->diameterHeight) / 2); / / if ((shapeDefine->spiculationRadiomics.densityCenter == 0) && (shapeDefine->usedPixelCount != 1317) && (shapeDefine->usedPixelCount != 1436)) / / { / / int i = 0; / / i++; / / } } processPixelsManager->getSpiculationFromPixelRunCount(shapeDefine, mass); } } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void getDensistMatchShapeDefineDrawOverlay(ShapeDefine* shapeDefine, Mass *mass, GreyScaleThreadDefine* greyScaleThreadDefinePtr,bool saveCImage) { ShapeDefine** holdShapeDefinePtrs = (ShapeDefine**)malloc(mass->massUnusedShapeCount * sizeof(ShapeDefine**)); if (holdShapeDefinePtrs == nullptr) { printf("mass->massUnusedShapeCount %d\n", mass->massUnusedShapeCount); doAbort((char*)"holdShapeDefinePtrs malloc failed"); } int returnShapeDefineCount = lookForShapesInAShapeInThread(shapeDefine, mass->massUnusedShapeDefines, mass->massUnusedShapeCount, holdShapeDefinePtrs, mass, greyScaleThreadDefinePtr); qsort(holdShapeDefinePtrs, (size_t)returnShapeDefineCount, (size_t)sizeof(ShapeDefine*), compareShapeDefinesRectangleSizeLargeFirstPointers); / / dumpShapeDefineListPtrPtr(returnShapeDefineCount, holdShapeDefinePtrs, mass); drawAndDisplayActiveMassSetDensity(shapeDefine, holdShapeDefinePtrs, returnShapeDefineCount, mass, saveCImage); free(holdShapeDefinePtrs); } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / int lookForShapesInAShapeInThread(ShapeDefine* marginShapeDefine, ShapeDefine* smallestShapeDefinesFirstPtr, int shapeDefineCount,ShapeDefine **selectedSubMargins,Mass *mass, GreyScaleThreadDefine* greyScaleThreadDefinePtr) { int inc; HDC testHDCScreenOverlay = greyScaleThreadDefinePtr->testHDCScreenOverlay; int* testRgbPtr = greyScaleThreadDefinePtr->testRgbPtr; / / int* testRgbPtr = (int*)marginShapeDefine->shapeOverlay->GetBits(); / / HDC testHDCScreenOverlay = marginShapeDefine->shapeOverlay->GetDC(); int returnShapeCount = 0; for (inc = 0; inc < shapeDefineCount; inc++, smallestShapeDefinesFirstPtr++) { if (smallestShapeDefinesFirstPtr->usedPixelCount != 0) { if (shapeAInShapeB(smallestShapeDefinesFirstPtr, marginShapeDefine, testHDCScreenOverlay, testRgbPtr, mass,92) == true) { *selectedSubMargins = smallestShapeDefinesFirstPtr; selectedSubMargins++; returnShapeCount++; } } } return(returnShapeCount); } bool shapeAInShapeB(ShapeDefine* shapeDefineA, ShapeDefine* shapeDefineB, HDC testHDCScreenOverlay, int* testRgbPtr, Mass* mass, int threadID) { RECT intersectRect; if ((shapeDefineA->width > (shapeDefineB->width + Pixel_Fudge)) && (shapeDefineA->height > (shapeDefineB->height + Pixel_Fudge))) { return(false); } if (haveIntersect(&(shapeDefineA->rect), &(shapeDefineB->rect), &intersectRect) == true) { / / rectangle intersects. / / is shapeA in shapeB by pixel count int intersectPixelCount = havePixelsIntersect(shapeDefineA->usedPixels, shapeDefineB->usedPixels, shapeDefineA->usedPixelCount, shapeDefineB->usedPixelCount); if ((shapeDefineB->width < Check_For_Small_Overlap) && (shapeDefineB->height < Check_For_Small_Overlap)) { / / small shape tight border. int intersectMin = (int)(((float)shapeDefineA->usedPixelCount) * ShapeA_Fudge_Range_Small); if (intersectPixelCount >= intersectMin) { return(true); } } else { int intersectMin = (int)(((float)shapeDefineA->usedPixelCount) * ShapeA_Fudge_Range_Large); / / if ((intersectPixelCount >= intersectMin) && (shapeDefineB->usedPixelCount <= maxUsedPixels)) if ((intersectPixelCount >= intersectMin) ) { return(true); } } if (shapeDefineB->xyPoint == nullptr) { return(false); } / / now check of shape inside shape but not overlap. Bigger shape has a hole in it. little shape in the hole. if ((shapeDefineA->rect.left == intersectRect.left) && (shapeDefineA->rect.top == intersectRect.top) && (shapeDefineA->rect.right == intersectRect.right) && (shapeDefineA->rect.bottom == intersectRect.bottom)) { / / question now is, is there a shape in a shape but in an empty spot. / / need to draw larger shape, then check if touch it on all four sides. if yes then in it. drawRectangle(testHDCScreenOverlay, Transparent_Grey_Scale_RGB, 0, 0, mass->processingPixelSquareSize, mass->processingPixelSquareSize); SelectObject(testHDCScreenOverlay, GetStockObject(DC_PEN)); SelectObject(testHDCScreenOverlay, GetStockObject(DC_BRUSH)); int screenOverlayCImageXPosB = shapeDefineB->xOffsetInCaptureCimage - mass->processingPixelSquareOffset; int screenOverlayCImageYPosB = shapeDefineB->yOffsetInCaptureCimage - mass->processingPixelSquareOffset; drawShape(testHDCScreenOverlay, shapeDefineB->xyPoint, shapeDefineB->xyPointCount, -1, screenOverlayCImageXPosB, screenOverlayCImageYPosB, 0.0, Used_Grey_Scale_RGB,false); int centerShapeAXPos = (shapeDefineA->xOffsetInCaptureCimage - mass->processingPixelSquareOffset) + (shapeDefineA->width >> 1); int centerShapeAYPos = (shapeDefineA->yOffsetInCaptureCimage - mass->processingPixelSquareOffset) + (shapeDefineA->height >> 1); COLORREF pixelColor = *(testRgbPtr + (centerShapeAYPos * mass->pitch) + centerShapeAXPos); if(pixelColor == Used_Grey_Scale_RGB) { / / big shape not hollow. return(false); } int xPos; for (xPos = screenOverlayCImageXPosB; xPos <= centerShapeAXPos; xPos++) { pixelColor = *(testRgbPtr + (centerShapeAYPos * mass->pitch) + xPos); if (pixelColor == Used_Grey_Scale_RGB) { break; } } if (xPos > centerShapeAXPos) { return(false); } for (xPos = screenOverlayCImageXPosB + (shapeDefineB->width - 1); xPos >= centerShapeAXPos; xPos--) { if (xPos >= mass->processingPixelSquareSize) { continue; } pixelColor = *(testRgbPtr + (centerShapeAYPos * mass->pitch) + xPos); if (pixelColor == Used_Grey_Scale_RGB) { break; } } if (xPos < centerShapeAXPos) { return(false); } int yPos; for (yPos = screenOverlayCImageYPosB; yPos <= centerShapeAYPos; yPos++) { pixelColor = *(testRgbPtr + (yPos * mass->pitch) + centerShapeAXPos); if (pixelColor == Used_Grey_Scale_RGB) { break; } } if (yPos > centerShapeAYPos) { return(false); } for (yPos = screenOverlayCImageYPosB + (shapeDefineB->height - 1); yPos >= centerShapeAYPos; yPos--) { if (yPos >= mass->processingPixelSquareSize) { continue; } pixelColor = *(testRgbPtr + (yPos * mass->pitch) + centerShapeAXPos); if (pixelColor == Used_Grey_Scale_RGB) { break; } } if (yPos < centerShapeAYPos) { return(false); } return(true); } else { #define Min_Intersect_Percent 85 #define Max_Out_Off_Bound_Pixel_Percent 5 if ((shapeDefineA->usedPixelCount < shapeDefineB->usedPixelCount) && (intersectPixelCount >= ((shapeDefineA->usedPixelCount * 85) / 100))) { if ((shapeDefineA->usedPixelCount - intersectPixelCount) <= ((shapeDefineB->usedPixelCount * Max_Out_Off_Bound_Pixel_Percent) / 100)) { return(true); } } } } return(false); } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / bool haveIntersect(RECT* a, RECT* b, RECT* result) { / / can't use CRect has rounding error with height and width, with small rectangles. RECT* leftRect; RECT* rightRect; RECT* topRect; RECT* botRect; if (a->left <= b->left) { leftRect = a; rightRect = b; } else { leftRect = b; rightRect = a; } / / X positions line if (leftRect->right >= rightRect->left) { result->left = rightRect->left; if (leftRect->right >= rightRect->right) { result->right = rightRect->right; } else { result->right = leftRect->right; } if (a->top <= b->top) { topRect = a; botRect = b; } else { topRect = b; botRect = a; } / / X positions line if (topRect->bottom >= botRect->top) { result->top = botRect->top; if (topRect->bottom >= botRect->bottom) { result->bottom = botRect->bottom; } else { result->bottom = topRect->bottom; } return(true); } } return(false); } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / int compareShapeDefinesRectangleSizeLargeFirstPointers(const void* arg1, const void* arg2) { ShapeDefine* shapeDefine1, * shapeDefine2; shapeDefine1 = *((ShapeDefine**)arg1); shapeDefine2 = *((ShapeDefine**)arg2); if (shapeDefine1->usedPixelCount > shapeDefine2->usedPixelCount) { return(-1); } if (shapeDefine1->usedPixelCount < shapeDefine2->usedPixelCount) { return(1); } if (shapeDefine1->xyPointCount > shapeDefine2->xyPointCount) { return(-1); } if (shapeDefine1->xyPointCount < shapeDefine2->xyPointCount) { return(1); } return(0); } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void drawAndDisplayActiveMassSetDensity(ShapeDefine *marginShapeDefine, ShapeDefine **shapeDefinePtr, int shapeDefinesCount,Mass *mass, bool saveCImage) { int bitmapOverlayWH; int contourDepth = -1; switch (mass->processingMode) { case Mag_Post_Processing: case Mag_No_Post_Processing: { bitmapOverlayWH = (int)((float)(mass->processingPixelSquareSize) * mass->sizeDecrease); break; } case Post_Processing: case No_Post_Processing: { bitmapOverlayWH = mass->processingPixelSquareSize; break; } } if (marginShapeDefine->shapeOverlay != nullptr) { marginShapeDefine->shapeOverlay->Destroy(); delete marginShapeDefine->shapeOverlay; } marginShapeDefine->shapeOverlay = new CImage(); marginShapeDefine->shapeOverlay->Create(bitmapOverlayWH, bitmapOverlayWH, 32); CImage* overlayCimage = marginShapeDefine->shapeOverlay; / / debug if (overlayCimage == nullptr) { doAbort((char*)"overlayCimage is nullptr"); } / / end debug displayCImageRgbPtr = (int*)overlayCimage->GetBits(); HDC hdcTmpCImage = overlayCimage->GetDC(); drawRectangle(hdcTmpCImage, Transparent_Grey_Scale_RGB, 0, 0, bitmapOverlayWH, bitmapOverlayWH); SelectObject(hdcTmpCImage, GetStockObject(DC_PEN)); SelectObject(hdcTmpCImage, GetStockObject(DC_BRUSH)); if (shapeDefinesCount <= 0) { overlayCimage->ReleaseDC(); if (saveCImage == true) { return; } marginShapeDefine->shapeOverlay->Destroy(); delete marginShapeDefine->shapeOverlay; marginShapeDefine->shapeOverlay = nullptr; return; } marginShapeDefine->spiculationRadiomics.density = drawMassSetDensity(shapeDefinePtr, shapeDefinesCount, mass, displayCImageRgbPtr, hdcTmpCImage, overlayCimage, &(marginShapeDefine->spiculationRadiomics.densityCenterShapeDefine), &(marginShapeDefine->spiculationRadiomics.pleomorphism)); overlayCimage->ReleaseDC(); if (saveCImage == true) { return; } marginShapeDefine->shapeOverlay->Destroy(); delete marginShapeDefine->shapeOverlay; marginShapeDefine->shapeOverlay = nullptr; return; } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / int drawMassSetDensity(ShapeDefine** overlayShapeDefinesPtr,int overlayShapeCount,Mass* mass, int* rgbPtr, HDC hdcScreenOverlay, CImage* cImageOverlay, ShapeDefine **densityCenterShape,int *pleomorphism) { / / int baseColorIndex = Max_Contour_Layers_Displayed - 1; int localContourDepth = Max_Contour_Layers_Displayed; int inc; int baseXOffset = (*overlayShapeDefinesPtr)->xOffsetInCaptureCimage; int baseYOffset = (*overlayShapeDefinesPtr)->yOffsetInCaptureCimage; int xPosOffsetOverlayCimage; int yPosOffsetOverlayCimage; int shrunkPixelSquareOffset = 0; *densityCenterShape = *overlayShapeDefinesPtr; if (mass->sizeDecrease != 0) { shrunkPixelSquareOffset = (int)(((float)(mass->processingPixelSquareOffset)) * mass->sizeDecrease); } *pleomorphism = 0; for (inc = 0; inc < overlayShapeCount; inc++, overlayShapeDefinesPtr++) { ShapeDefine* shapeDefine = (*overlayShapeDefinesPtr); if ((shapeDefine->baseShapeDefineOnly == true) && (inc > 0)) { continue; } int colorIndex; if (mass->sizeDecrease != 0.0) { colorIndex = getDensistPixelColorBeneathTheShapeShrink(rgbPtr, shapeDefine, (int)(cImageOverlay->GetPitch()) / (int)(sizeof(int)), mass->sizeDecrease, mass->processingPixelSquareOffset); } else { colorIndex = getDenistUsedPixelColorBeneathTheShape(rgbPtr, shapeDefine, (int)(cImageOverlay->GetPitch()) / (int)(sizeof(int))); } if (colorIndex <= -1) { continue; } colorIndex = colorIndex - 1; if (colorIndex < 0) { colorIndex = 0; } XYPoint* xyPoint = nullptr; int xyPointCount; switch (mass->processingMode) { case Mag_Post_Processing: case Mag_No_Post_Processing: { int xyPathDataLength = 0; xyPoint = shapeDefine->shrunkXYPoint; xyPointCount = shapeDefine->shrunkXYPointCount; if (xyPoint == nullptr) { doAbort((char*)"shrunk xyPoint is nullptr"); } / / has to be shrunk seperate else int rouding screws up offset by pixel sometimes xPosOffsetOverlayCimage = (int)(((float)(shapeDefine->xOffsetInCaptureCimage) * mass->sizeDecrease)); yPosOffsetOverlayCimage = (int)(((float)(shapeDefine->yOffsetInCaptureCimage) * mass->sizeDecrease)); xPosOffsetOverlayCimage -= shrunkPixelSquareOffset; yPosOffsetOverlayCimage -= shrunkPixelSquareOffset; break; } case Post_Processing: case No_Post_Processing: { xyPoint = shapeDefine->xyPoint; xyPointCount = shapeDefine->xyPointCount; xPosOffsetOverlayCimage = (shapeDefine->xOffsetInCaptureCimage - mass->processingPixelSquareOffset); yPosOffsetOverlayCimage = (shapeDefine->yOffsetInCaptureCimage - mass->processingPixelSquareOffset); break; } } if (localContourDepth > colorIndex) { localContourDepth = colorIndex; *densityCenterShape = *overlayShapeDefinesPtr; } (*pleomorphism)++; / / printf("UPC %d CI %d\n", (*overlayShapeDefinesPtr)->usedPixelCount, colorIndex); drawShape(hdcScreenOverlay, xyPoint, xyPointCount, colorIndex, xPosOffsetOverlayCimage, yPosOffsetOverlayCimage, 0.0, NULL, false); / * if (doDebug == true) { char holdPath[Max_Path_Len + 2]; WCHAR savePath[MAX_PATH]; size_t outSize; sprintf_s(holdPath, Max_Path_Len, "C:\\DeepLook\\cCode\\imageTestDumps3\\overlayDisplay_%d_.png", inc); mbstowcs_s(&outSize, savePath, MAX_LOADSTRING, holdPath, strlen(holdPath)); cImageOverlay->Save(savePath); int k = 1; k++; } * / } / / if (dumpShapeDraws == true) / / { / / printf("dUPC %d %d pleo %d %d\n", startUPC, (*holdosdp)->usedPixelCount, *pleomorphism, debugDrawnCount); / / } return(Max_Contour_Layers_Displayed - localContourDepth); } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void getSelectedMarginSpiculationValues(Mass* mass) { / / ************** should be turned into multi threads insteand of while loop. / / need to fix the cimage issues. ShapeDefine** selectedShapeDefinesPtrPtr = mass->selectedShapeDefinesPtrPtr; / / ProcessPixelsQueueElement* processPixelsQueueElement; / / repeat for each new shape found int selectedShapeDefinesCount = mass->selectedShapeDefineCount; int inc; for (inc = 0; inc < selectedShapeDefinesCount; inc++, selectedShapeDefinesPtrPtr++) { ShapeDefine* shapeDefine = *selectedShapeDefinesPtrPtr; debugDrawShape(shapeDefine, mass); / / if (shapeDefine->usedPixelCount == 2359) / / { / / int i = 1; / / i++; / / } / / set the main shapes diameter lines. initRulerPoints(shapeDefine->rulerPoint); processPixelsManager->setRulerInfo(shapeDefine, mass); processPixelsManager->getDensistMatchShapeDefineDrawOverlay(shapeDefine, mass, processPixelsManager->greyScaleThreadDefineArray, true); / / } / / selectedShapeDefinesPtrPtr = mass->selectedShapeDefinesPtrPtr; / / for (inc = 0; inc < selectedShapeDefinesCount; inc++, selectedShapeDefinesPtrPtr++) / / { / / ShapeDefine* shapeDefine = *selectedShapeDefinesPtrPtr; if (shapeDefine->spiculationRadiomics.densityCenterShapeDefine == nullptr) { shapeDefine->spiculationRadiomics.density = 1; shapeDefine->spiculationRadiomics.densityCenter = 1000; } else { XYPoint centerMassCenterPoint; getShapeCenterPoint(shapeDefine->spiculationRadiomics.densityCenterShapeDefine, mass, ¢erMassCenterPoint); XYPoint shapeCenterPoint; getShapeCenterPoint(shapeDefine, mass, &shapeCenterPoint); shapeDefine->spiculationRadiomics.densityCenter = (distanceBetweenTwoPoints((double)centerMassCenterPoint.xPos, (double)centerMassCenterPoint.yPos, (double)shapeCenterPoint.xPos, (double)shapeCenterPoint.yPos) * 1000) / ((shapeDefine->longestDiameter + shapeDefine->diameterHeight) / 2); / / if ((shapeDefine->spiculationRadiomics.densityCenter == 0) && (shapeDefine->usedPixelCount != 1317) && (shapeDefine->usedPixelCount != 1436)) / / { / / int i = 0; / / i++; / / } } processPixelsManager->getSpiculationFromPixelRunCount(shapeDefine, mass); } } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void getSpiculationFromPixelRunCount(ShapeDefine* shapeDefine, Mass* mass) { / / debug if (shapeDefine->matchRadiomics.spiculation != -1) { / / doAbort((char*)"Spiculation set twice"); } if (mass->spiculationProfile == nullptr) { shapeDefine->matchRadiomics.spiculation = 0; return; } spiculationProfileManager->loadMarginPercentDefine(shapeDefine, &(shapeDefine->marginPercentDefine)); / / load relative to the baseSpiculation shapeDefine->spiculationRadiomics.spiculation = mass->spiculationProfile->getBaseSpiculationColumnDifference(shapeDefine->marginPercentDefine.value, baseSpiculation, Margin_Percent_Count); shapeDefine->marginPercentDefine.value[Spiculation_Index] = shapeDefine->spiculationRadiomics.spiculation; shapeDefine->marginPercentDefine.value[Balance_Index] = shapeDefine->spiculationRadiomics.balance; shapeDefine->marginPercentDefine.value[Density_Center_Index] = shapeDefine->spiculationRadiomics.densityCenter; shapeDefine->marginPercentDefine.value[Normalized_Pixel_Density] = shapeDefine->spiculationRadiomics.normalizedPixelDensity; mass->spiculationProfile->loadMarginSpiculationRadiomics(shapeDefine); return; } lesionBalanceCode-ASCII / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / int getShapeDefineBalance(int *prgb, int usedColor, int widthAndHeight, int pitch,int usePixelCount, int xyOffset, int longestDiameter) { int quarterCounts[Quarter_Count * Quarter_Count]; memset(quarterCounts, 0, Quarter_Count * Quarter_Count * sizeof(int)); int halfWidthHeightCimage = widthAndHeight >> 1; int halfWidthHeight = longestDiameter >> 1; int oneFourthWH = halfWidthHeight >> 1; int* rgbPtr = nullptr; int* quarter; int inc; for (inc = 0; inc < Quarter_Count; inc++) { quarter = &(quarterCounts[inc * Quarter_Count]); switch (inc) { case 0: { rgbPtr = prgb+ ((xyOffset * pitch) + xyOffset); break; } case 1: { rgbPtr = prgb + ((xyOffset * pitch) + halfWidthHeightCimage); break; } case 2: { rgbPtr = prgb + ((halfWidthHeightCimage * pitch) + xyOffset); break; } case 3: { rgbPtr = prgb + (halfWidthHeightCimage * pitch) + halfWidthHeightCimage; break; } } int xPos; int yPos; for (yPos = 0; yPos < oneFourthWH; yPos++) { int* pixelRunLenPtr = (rgbPtr + (yPos * pitch)); for (xPos = 0; xPos < oneFourthWH; xPos++, pixelRunLenPtr++) { if (*pixelRunLenPtr == usedColor) { quarter[0]++; } } } for (yPos = 0; yPos < oneFourthWH; yPos++) { int* pixelRunLenPtr = (rgbPtr + ((yPos * pitch) + oneFourthWH)); for (xPos = 0; xPos < oneFourthWH; xPos++, pixelRunLenPtr++) { if (*pixelRunLenPtr == usedColor) { quarter[1]++; } } } for (yPos = oneFourthWH; yPos < halfWidthHeight; yPos++) { int* pixelRunLenPtr = (rgbPtr + (yPos * pitch)); for (xPos = 0; xPos < oneFourthWH; xPos++, pixelRunLenPtr++) { if (*pixelRunLenPtr == usedColor) { quarter[2]++; } } } for (yPos = oneFourthWH; yPos < halfWidthHeight; yPos++) { int* pixelRunLenPtr = (rgbPtr + ((yPos * pitch) + oneFourthWH)); for (xPos = 0; xPos < oneFourthWH; xPos++, pixelRunLenPtr++) { if (*pixelRunLenPtr == usedColor) { quarter[3]++; } } } } / / get one fourth difference count; int differenceCount = 0; int* qUpperLeft = quarterCounts ; int* qUpperRight = qUpperLeft + Quarter_Count; int* qLowerLeft = qUpperRight + Quarter_Count; int* qLowerRight = qLowerLeft + Quarter_Count; differenceCount += getDiffLeftToRight(qUpperLeft, qUpperRight); differenceCount += getDiffTopToBot(qUpperLeft, qLowerLeft); differenceCount += getDiffDiag(qUpperLeft, qLowerRight); differenceCount += getDiffDiag(qUpperRight, qLowerLeft); differenceCount += getDiffTopToBot(qUpperRight, qLowerRight); differenceCount += getDiffLeftToRight(qLowerLeft,qLowerRight ); int balance = 1000 - ((differenceCount * 1000) / usePixelCount); if (balance >= 1000) { balance = 999; } / / if (balance <= 0) / / { / / balance = 1; / / } return(balance); } #define Quarter_Count 4 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / int getDiffLeftToRight(int* left, int* right) { int differenceCount = 0; differenceCount += abs(*left - *(right + 1)); differenceCount += abs(*(left + 1) - *right); differenceCount += abs(*(left + 2) - *(right + 3)); differenceCount += abs(*(left + 3) - *(right + 2)); return(differenceCount); } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / int getDiffTopToBot(int* top, int* bot) { int differenceCount = 0; differenceCount += abs(*top - *(bot + 2)); differenceCount += abs(*(top + 1) - *(bot + 3)); differenceCount += abs(*(top + 2) - *bot); differenceCount += abs(*(top + 3) - *(bot + 1)); return(differenceCount); } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / int getDiffDiag(int* topLeft, int* botRight) { int differenceCount = 0; differenceCount += abs(*topLeft - *(botRight + 3)); differenceCount += abs(*(topLeft + 1) - *(botRight + 2)); differenceCount += abs(*(topLeft + 2) - *(botRight + 1)); differenceCount += abs(*(topLeft + 3) - *botRight); return(differenceCount); } additionalDensitySupportcode-ASCII / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / COLORREF getDensistPixelColorBeneathTheShapeShrink(int* rgbPtr, ShapeDefine* shapeDefine, int pitch, float sizeDecrease, int processingPixelSquareOffset) { XYPoint* usedPixelsPtr = shapeDefine->usedPixels; int usedPixelCount = shapeDefine->usedPixelCount; COLORREF usedColors[Max_Contour_Layers_Displayed]; int colorCount[Max_Contour_Layers_Displayed]; int usedColorsCount = 0; memset(usedColors, -1, sizeof(COLORREF) * Max_Contour_Layers_Displayed); memset(colorCount, 0, sizeof(int) * Max_Contour_Layers_Displayed); int inc; int inc2; int maxYpos = abs(pitch); int xPosCImageOffset = shapeDefine->xOffsetInCaptureCimage - processingPixelSquareOffset; int yPosCImageOffset = shapeDefine->yOffsetInCaptureCimage - processingPixelSquareOffset; int xShrunkOffset = (int)((float)xPosCImageOffset * sizeDecrease); int yShrunkOffset = (int)((float)yPosCImageOffset * sizeDecrease); for (inc = 0; inc < usedPixelCount; inc++, usedPixelsPtr++) { int xPos = (int)(((float)usedPixelsPtr->xPos - xPosCImageOffset) * sizeDecrease) + xShrunkOffset; int yPos = (int)(((float)usedPixelsPtr->yPos - yPosCImageOffset) * sizeDecrease) + yShrunkOffset; if (yPos >= maxYpos) { yPos--; } COLORREF pixelColor = *(rgbPtr + (pitch * yPos ) + xPos); / / debug / / { / / printf("inc %d xPos %d yPos %d color %x\n",inc,xPos,yPos,pixelColor); / / } / / end debug if (pixelColor == Transparent_Grey_Scale_RGB) { continue; } for (inc2 = 0; inc2 < usedColorsCount; inc2++) { if (usedColors[inc2] == pixelColor) { colorCount[inc2]++; break; } } if (inc2 >= usedColorsCount) { / / if here not found. usedColors[usedColorsCount] = pixelColor; colorCount[usedColorsCount] = 1; usedColorsCount++; } } int mustHave = (usedPixelCount * 98) / 100; if (usedColorsCount > 0) { for (inc = 0; inc < usedColorsCount; inc++) { if (colorCount[inc] >= mustHave) { return(getLayerColor(usedColors[inc], layerColorsUsed)); } } return(-1); } return(Max_Contour_Layers_Displayed); }
[0224] conclusion
[0225] Thus, a system, apparatus and method have been described which fulfill the objectives set forth above, it being understood that the illustrated embodiments are merely exemplary of the invention, and that other embodiments incorporating modifications to those shown herein are within the scope of the invention.
Claims
1. Radiomics - Quantification / characterization of spicules 1. A method comprising: A. Walking the perimeter of a shape in a medical image and generating a list of coordinates that define the perimeter; B. Dividing the list into groups of coordinates separated by the inflection points of the perimeter; C. determining a span to length ratio for each group of coordinates, where span refers to the distance in a Cartesian coordinate system between the endpoints of each said group, and length refers to the sum of the distances measured traveling along the path defined by each said group; D. determining the percentage of each of the selected span-to-length ratio groups that make up the perimeter; and E. either enhancing the medical image or identifying the morphology of tissues imaged in the medical image as a function of their respective percentages; A method comprising:
2. 2. The method of claim 1, wherein the span-to-length ratio is greater than 0 but not greater than 1, groups defining straight line segments having a span-to-length ratio of 1 and groups deviating from straight lines having a smaller such ratio.
3. 2. The method of claim 1, wherein step (D) comprises: i. binning the groups according to their respective span-to-length ratios; and For each bin (a) summing the lengths of the groups contained in that bin; and (b) determining what percentage that sum represents of the total perimeter of the shape;
4. 4. The method of claim 3, wherein step (D) comprises: ii. Binning the percentages generated in step (D)(i)(b) into superbins based on the span-to-length ratio of the bins for which the percentages were determined.
5. 5. The method of claim 4, wherein step (D) comprises: iii. Sum at least the selected percentage binned in step (D)(ii).
6. 10. The method of claim 1 , wherein step (E) comprises: Each percentage is compared to the corresponding percentage determined for tissue of known morphology.
7. 7. The method of claim 6, wherein step (E) comprises: Characterizing the shape as its form responds to favorable comparisons.
8. 8. The method of claim 7, wherein step (E) comprises: The comparison is performed using one or more ranges of percentage values.
9. 10. The method of claim 1 , wherein step (D) comprises: At least one of the following groups having span-to-length ratios: 0.6-0.7, 0.7-0.8, 0.8-0.9, and 0.9-1.0 define respective percentages of the perimeter.
10. 10. The method of claim 1 , wherein step (D) comprises: At least two of the following groups of span-to-length ratios define respective percentages of the perimeter: 0.6-0.7, 0.7-0.8, 0.8-0.9, and 0.9-1.
0.
11. 10. The method of claim 1 , wherein step (D) comprises: Groups having span-to-length ratios of 0.6-0.7, 0.7-0.8, 0.8-0.9, and 0.9-1.0 define respective percentages that make up the perimeter.
12. 10. The method of claim 1 , wherein step (E) comprises: Either the respective percentages determined in step (D) or a morphological characterization based thereon is displayed.
13. 10. The method of claim 1 , wherein step (E) comprises: Either reshading, colorizing and / or enhancing the representation of said shapes based on either the respective percentages determined in step (D) or a morphological characterization based thereon.
14. 2. The method of claim 1, comprising determining whether the shape is an outer boundary of a concentric set of shapes in the medical image based on either the respective percentages determined in step (D) or a morphological characterization based thereon.
15. 15. The method of claim 14, comprising determining characteristics of the set of concentric shapes and tissue imaged thereby based on either the respective percentages determined in step (D) or morphological characterization based thereon.
16. 10. The method of claim 1 , wherein step (E) comprises: The morphology of tissue imaged in the medical image is determined as a function of each percentage in combination with one or more of the normalized pixel density of the shape, the relative centering distance percentage of the series of concentric shapes, the degree of balance of the series of concentric shapes, and the degree of polymorphism of the series of concentric shapes. Radiomics - Normalized Pixel Density ("NPD").
17. Methods include: A. Normalizing pixel intensities of a region of interest in a medical image; B. Determining the average intensity of pixels within a shape that falls at least partially, if not entirely, within said region of interest; C. The average determined in step (B) determines a percentile rank for the normalized intensity of the pixel determined in step (A); D. Enhance the medical image or identify the morphology of tissue imaged in the medical image as a function of the percentile rank.
18. 20. The method of claim 17, wherein step (A) comprises: i. examining the intensities of pixels within said region of interest and identifying minimum and maximum intensity values; ii. Determine scaling factors and offsets that extend these minimum and maximum values to the applicable normalization targets; iii. Apply the factor and offset to the intensity values of the pixels within the region of interest.
19. 20. The method of claim 17, wherein step (B) comprises: Following normalization, the intensities of the pixels within the shape are summed and the sum is divided by the count of those pixels.
20. 20. The method of claim 17, wherein step (C) comprises: The normalized intensities of pixels within the region of interest are examined and those having an intensity that is either above or below the average intensity determined in step (B) are counted.
21. 20. The method of claim 17, wherein step (D) comprises: The percentile rankings are displayed.
22. 20. The method of claim 17, wherein step (D) comprises: Any re-shading, colorization, and / or other display enhancement of the shapes based on the percentile rankings.
23. 18. The method of claim 17, comprising determining whether the shape is an outer boundary of a concentric set of shapes in the medical image based on the percentile rankings.
24. 24. The method of claim 23, comprising determining a concentric set of features of shapes, and thereby imaged tissue, based on the percentile rankings.
25. 20. The method of claim 17, wherein step (D) comprises: A morphology of tissue imaged in the medical image is determined as a function of the percentile rank.
26. 26. The method of claim 25, wherein step (D) comprises: determining a morphology of the tissue imaged in the medical image as a function of the percentile rank in combination with one or more of a spiculation characterization of the shape, a relative percent centralization distance of a series of concentric shapes of which the shape forms a part, a degree of balance of the series of concentric shapes, and a degree of polymorphism of the series of concentric shapes. Radiomics - Relative Centralized Distance Percent (RCDP)
27. Methods include: A. Finding the center of a series of concentric circular masses in medical images; B. Determining the longest and shortest diameters of the series of concentric circular shapes; C. Identifying the strongest shape in the series of concentric circular shapes; D. Finding the center position of the tumor mass of the shape identified in step (C); E. determining a relative percent centralized distance as a function of the distance between the centers of the masses determined in steps (A) and (D) and as a function of the maximum and minimum diameters determined in step (B); F. Either enhancing the medical image or identifying the morphology of tissue imaged in the medical image as a function of the relative centroid distance percentage.
28. 28. The method of claim 27, wherein step (E) comprises: The relative centralized distance percentage is determined according to the following mathematical relationship: RCDP=DP / (OMSLD+OMSSD) Where: RCDP is the relative central distance percentage; DP=OMCP-DPCP, The OMCP is the center of a series of concentric masses; The DPCP is the center of the mass of the shape identified in step (C); The OMSLD is the largest diameter in a series of concentric circular shapes; The OMSSD is the smallest diameter in a series of concentric circular shapes.
29. 28. The method of claim 27, wherein step (B) comprises: Find the smallest circle that fits the set of concentric circles.
30. 28. The method of claim 27, wherein step (B) comprises: Find the largest circle that bounds the set of concentric circles.
31. 28. The method of claim 27, wherein step (F) comprises: The relative centralized distance percentage is displayed.
32. 28. The method of claim 27, wherein step (F) comprises: Either re-shading, colorizing, and / or other display enhancement of shapes based on said relative centered distance percentages.
33. 28. The method of claim 27, comprising determining whether the shape is an outer boundary of a concentric set of shapes in the medical image based on the relative centroid distance percentage.
34. 34. The method of claim 33, comprising determining a set of concentric circles of the shape and tissue features imaged thereby based on the relative centroid distance percentage.
35. 28. The method of claim 27, wherein step (F) comprises: The morphology of tissue imaged in the medical image is determined as a function of the relative centralized distance percentage.
36. 36. The method of claim 35, wherein step (F) comprises: The morphology of tissue imaged in the medical image is identified as a function of the relative centroid distance percentage combined with one or more of a spiculescence feature of a series of concentric circular shapes, a percentile ranking of the average intensity of pixels within a shape in the series of shapes relative to the normalized intensity of pixels within a region of the medical image, a degree of balance of the series of concentric circular shapes, and a degree of polymorphism of the series of concentric circular shapes. Radiomics - Balance Determination
37. Methods include: A. Determining a series of one or more concentric circular bounding boxes identified within a medical image; B. Divide the bounding box into multiple equally sized regions; C. Determine the counts within each region of pixels that are above, below, or within one or more threshold intensities; D. Comparing the pixel count determined for each region with the pixel count of each other region across one or more of: (i) the X-axis as a line of symmetry, (ii) the Y-axis as a line of symmetry, and (iii) a diagonal line containing the X-axis and the Y-axis as lines of symmetry; E. determining a degree of balance of the series of concentric circular shapes by summing the results of the comparison in step (D); F. Either enhance the medical image or identify the morphology of tissue imaged in the medical image as a function of the degree of balance.
38. 38. The method of claim 37, wherein step (D) comprises: The difference in the number of pixels above / below / within one or more threshold intensities in each compared region is determined.
39. 40. The method of claim 38, wherein step (D) comprises: The absolute difference in the number of pixels in each compared region that are above / below / within one or more threshold intensities is taken.
40. 38. The method of claim 37, wherein step (F) comprises: The degree of the balance is displayed.
41. 38. The method of claim 37, wherein step (F) comprises: Either re-shading, colorizing, and / or other display enhancement of the shape based on the degree of balance.
42. 38. The method of claim 37, comprising: Based on the degree of balance, it is determined whether the shape is an outer boundary of a set of concentric circular shapes in the medical image.
43. 43. The method of claim 42, comprising: Based on the degree of balance, a characteristic of the set of concentric circles, and the tissue imaged thereby, is determined.
44. 38. The method of claim 37, wherein step (F) comprises: The morphology of the tissue imaged in the medical image is determined as a function of the degree of balance.
45. 45. The method of claim 44, wherein step (F) comprises: The morphology of the tissue imaged in the medical image is identified as a function of a degree of balance in combination with one or more of a spiculescence feature of the series of concentric circular shapes, a percentile ranking of the average intensity of pixels within the series of shapes relative to the normalized intensity of pixels within a region of the medical image, a relative percent centralization distance of the series of concentric circular shapes, and a degree of polymorphism of the series of concentric circular shapes. Radiomics - Polymorphism Determination
46. Methods include: A. Determining the counts of a series of concentric circular shapes identified in a medical image; B. Either enhance the medical image or identify the morphology of tissue imaged in the medical image as a function of the counts determined in step (A).
47. 47. The method of claim 46, wherein step (D) comprises: The count determined in step (A) is displayed.
48. 47. The method of claim 46, wherein step (D) comprises: Any re-shading, coloring, and / or other display enhancement of the shapes based on the counts determined in step (A).
49. 47. The method of claim 46, comprising: Based on the count determined in step (A), determine whether the shape is an outer boundary of a concentric set of shapes in the medical image.
50. 50. The method of claim 49, comprising: Based on the counts determined in step (A), a concentric set of shapes, and thereby the tissue features imaged, are determined.
51. 47. The method of claim 46, wherein step (B) comprises: determining a morphology of tissue imaged in the medical image as a function of the counts determined in step (A).
52. 52. The method of claim 51 , wherein step (B) comprises: Identifying the morphology of tissue imaged in the medical image as a function of the counts determined in step (A) in combination with one or more of the spiculescence characteristics of the series of concentric shapes, percentile rankings of average intensities of pixels in the series of shapes relative to normalized intensities of pixels in a region of the medical image, percent relative central distances of the series of concentric shapes, and degrees of balance of the series of concentric shapes.
Citation Information
Patent Citations
Method and device for matching ROI in breast image, terminal and storage medium
CN112529900A
Device, method and program for supporting measurement of human body structure
JP2010131202A
Line distance calculation method, line distance calculation device, computer program, and computer-readable storage medium
JP2018508891A
Image processing program, image processing device, and image processing method
JP2020185031A
Automatic detection of critical dermoscopy features for malignant melanoma diagnosis
US20060269111A1
