Diff of /README.md [000000] .. [3b2327]

Switch to unified view

a b/README.md
1
2
<!-- README.md is generated from README.Rmd. Please edit that file -->
3
lungct
4
======
5
6
[![Travis-CI Build Status](https://travis-ci.org/muschellij2/lungct.svg?branch=master)](https://travis-ci.org/muschellij2/lungct)
7
8
The lungct R package develops an image processing pipeline for computed tomography (CT) scans of the lungs.
9
10
![lungct logo](inst/extdata/logo.png)
11
12
![Image Processing Pipeline](inst/extdata/pipeline.png)
13
14
Highlights
15
----------
16
17
-   We develop a free and simple segmentation algorithm that is comparable to the proprietary VIDA Diagnostics software
18
19
-   We create the first publicly available standard lung template using healthy adults, which is available for download via lungct
20
21
-   We show that the standard lung template allows for improved population-level inference of lung CTs using radiomics
22
23
-   lungct provides a fully-automated and open-source image processing pipeline for lung CTs, which is accessible to statisticians
24
25
Installation
26
------------
27
28
You can install lungct from github with:
29
30
``` r
31
# install.packages("devtools")
32
devtools::install_github("muschellij2/lungct")
33
```
34
35
Segmentation
36
------------
37
38
To segment the lungs from the CT scan:
39
40
``` r
41
library(lungct)
42
filename <- "example.nii.gz"
43
mask <- segment_lung(filename)
44
```
45
46
To segment the left and right lungs from the CT scan:
47
48
``` r
49
img <- ANTsRCore::antsImageRead(filename)
50
mask2 <- segment_lung2(img)
51
```
52
53
Standard Lung
54
-------------
55
56
The standard lung was created from N=62 healthy controls from [COPDGene](http://www.copdgene.org/) (50% female, 95% white, mean age = 62 years, mean BMI = 28.5)
57
58
To load the standard lung:
59
60
``` r
61
# Read in standard lung template
62
filepath <- system.file(
63
    "extdata", "lung_template_mask.nii.gz", 
64
    package = "lungct")
65
template <- ANTsRCore::antsImageRead(filepath)
66
```
67
68
Registration
69
------------
70
71
To register the mask to the standard lung:
72
73
``` r
74
# Register mask to standard lung
75
reg <- register_lung_mask(
76
    moving_mask = mask, 
77
    fixed_mask = template, 
78
    moving = img, 
79
    sides = c("right","left"),
80
    typeofTransform = "SyN")
81
```
82
83
We recommend the following for lung registration:
84
85
-   Separately register the right and left lungs to account for differences in lung shape and size
86
87
-   Perform registration on lung masks to preserve biological variability in Hounsfield units (HU)
88
89
-   Use [Symmetric Normalization (SyN)](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2276735/) for nonlinear registration due to its flexibility and success in the [EMPIRE10](https://empire10.grand-challenge.org/) challenge
90
91
Template Creation
92
-----------------
93
94
For template creation, we follow the iterative method from [Avants](https://www.ncbi.nlm.nih.gov/pubmed/19818860), using iterations of register\_lung\_mask, get\_template, and calculate\_DSC from lungct. However, we define convergence as having a Dice similarity coefficient (DSC) between successive iterations of at least 0.99. We recommend using parallelization for the registration step.
95
96
![Template Creation](inst/extdata/templatecreation.png)
97
98
``` r
99
# Obtain new template
100
template_new <- get_template(
101
    folder_warp = warped_masks, 
102
    folder_comp = transformations)
103
104
# Check convergence     
105
dice <- calculate_DSC(template_init, template_new)
106
```
107
108
Radiomics
109
---------
110
111
Radiomics, a field of quantitative imaging where large amounts of features are extracted from medical images, is common for lung CTs.
112
113
Options in lungct:
114
115
-   radiomics\_slice: Calculation on 2D slices in axial, coronal, or sagittal planes
116
117
-   radiomics\_lung: Calculation on 3D right and left lungs
118
119
-   RIA\_lung: Calculation of advanced radiomic features, such as GLCM and GLRLM [More info](https://github.com/cran/RIA)
120
121
``` r
122
# Calculate radiomics
123
rad <- RIA_lung(
124
    img, mask, 
125
    sides = c("right", "left"), 
126
    features = c("fo", "glcm"), 
127
    bins_in = 16, equal_prob = FALSE, distance = 1, 
128
    statistic = "mean(X, na.rm = TRUE)")
129
```
130
131
COPDGene data usage
132
-------------------
133
134
For the lung CT template, the [COPDGene data](http://www.copdgene.org/) was used:
135
136
"This research used data generated by the COPDGene study, which was supported by NIH grants U01HL089856 and U01HL089897. The COPDGene project is also supported by the COPD Foundation through contributions made by an Industry Advisory Board comprised of Pfizer, AstraZeneca, Boehringer Ingelheim, Novartis, and Sunovion."