farrell236 commited on
Commit
b7a352e
1 Parent(s): be82f78

Upload 5 files

Browse files
Files changed (5) hide show
  1. LICENSE +20 -0
  2. README.md +47 -0
  3. convert_segm.py +39 -0
  4. metadata.csv +0 -0
  5. requirements.txt +5 -0
LICENSE ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ License
2
+
3
+ The NSCLC-Radiomics collection is distributed under the Creative Commons Attribution-NonCommercial 3.0 Unported License (https://creativecommons.org/licenses/by-nc/3.0/).
4
+ By downloading the data, you agree to abide by terms of this license.
5
+
6
+ _____________________________
7
+
8
+ Data Usage Policy
9
+
10
+ Any user accessing TCIA data must agree to:
11
+ - Not use the requested datasets, either alone or in concert with any other information, to identify or contact individual participants from whom data and/or samples were collected and follow all other conditions specified in the TCIA Site Disclaimer. Approved Users also agree not to generate and use information (e.g., facial images or comparable representations) in a manner that could allow the identities of research participants to be readily ascertained. These provisions do not apply to research investigators operating with specific IRB approval, pursuant to 45 CFR 46, to contact individuals within datasets or to obtain and use identifying information under an IRB-approved research protocol. All investigators including any Approved User conducting “human subjects research” within the scope of 45 CFR 46 must comply with the requirements contained therein.
12
+
13
+ - Acknowledge in all oral or written presentations, disclosures, or publications the specific dataset(s) or applicable accession number(s) and the NIH-designated data repositories through which the investigator accessed any data. Citation guidelines for doing this are outlined below.
14
+
15
+ - If you are considering mirroring a copy of our publicly available datasets or providing direct access to any of the TCIA data via another tool or website using the REST API (https://wiki.cancerimagingarchive.net/x/NIIiAQ) please review our Data Analysis Centers (DACs) page (https://wiki.cancerimagingarchive.net/x/x49XAQ) for more information. DACs must provide attribution and links back to this TCIA data use policy and must require downstream users to do the same.
16
+
17
+ The summary page for every TCIA dataset includes a Citations & Data Usage Policy tab. Please consult the Citation & Data Usage Policy for each Collection before using them.
18
+ - Most data are freely available to browse, download, and use for commercial, scientific and educational purposes as outlined in the Creative Commons Attribution 3.0 Unported License or the Creative Commons Attribution 4.0 International License. In rare circumstances commercial use may be prohibited using Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0) or Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0).
19
+
20
+ - Most data are immediately accessible and do not require account registration. A small subset of collections do require registration and special permission to gain access. Refer to the "Access" column on https://www.cancerimagingarchive.net/collections/ for more details.
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # The Cancer Genome Atlas Ovarian Cancer (NSCLC-Radiomics)
2
+
3
+ The models featured in this repository uses images from the publically available [NSCLC-Radiomics](https://wiki.cancerimagingarchive.net/display/Public/NSCLC-Radiomics) Dataset. Download the data from TCIA with **Descriptive Directory Name** download option.
4
+
5
+ ## Converting Images
6
+
7
+ Convert DICOM images and segmentation to NIFTI format using [pydicom-seg](https://razorx89.github.io/pydicom-seg/guides/read.html).
8
+ - `python convert_segm.py`
9
+
10
+ ## Segmentations
11
+
12
+ Images will have one of the following segmentation files:
13
+
14
+ ```
15
+ ─ seg-Esophagus.nii.gz
16
+ ─ seg-GTV-1.nii.gz
17
+ ─ seg-Heart.nii.gz
18
+ ─ seg-Lung-Left.nii.gz
19
+ ─ seg-Lung-Right.nii.gz
20
+ ─ seg-Spinal-Cord.nii.gz
21
+ ```
22
+
23
+ ## Requirements
24
+
25
+ pandas==1.5.0
26
+ pydicom==2.3.1
27
+ pydicom-seg==0.4.1
28
+ SimpleITK==2.2.0
29
+ tqdm==4.64.1
30
+
31
+ ## Citation
32
+
33
+ If using this repository, please cite the following works:
34
+
35
+ ```
36
+ Data Citation
37
+
38
+ Aerts, H. J. W. L., Wee, L., Rios Velazquez, E., Leijenaar, R. T. H., Parmar, C., Grossmann, P., Carvalho, S., Bussink, J., Monshouwer, R., Haibe-Kains, B., Rietveld, D., Hoebers, F., Rietbergen, M. M., Leemans, C. R., Dekker, A., Quackenbush, J., Gillies, R. J., Lambin, P. (2019). Data From NSCLC-Radiomics (version 4) [Data set]. The Cancer Imaging Archive. https://doi.org/10.7937/K9/TCIA.2015.PF0M9REI
39
+
40
+ Publication Citation
41
+
42
+ Aerts, H. J. W. L., Velazquez, E. R., Leijenaar, R. T. H., Parmar, C., Grossmann, P., Carvalho, S., Bussink, J., Monshouwer, R., Haibe-Kains, B., Rietveld, D., Hoebers, F., Rietbergen, M. M., Leemans, C. R., Dekker, A., Quackenbush, J., Gillies, R. J., Lambin, P. (2014, June 3). Decoding tumour phenotype by noninvasive imaging using a quantitative radiomics approach. Nature Communications. Nature Publishing Group. https://doi.org/10.1038/ncomms5006 (link)
43
+
44
+ TCIA Citation
45
+
46
+ Clark K, Vendt B, Smith K, Freymann J, Kirby J, Koppel P, Moore S, Phillips S, Maffitt D, Pringle M, Tarbox L, Prior F. The Cancer Imaging Archive (TCIA): Maintaining and Operating a Public Information Repository, Journal of Digital Imaging, Volume 26, Number 6, December, 2013, pp 1045-1057. https://doi.org/10.1007/s10278-013-9622-7
47
+ ```
convert_segm.py ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ import pydicom
4
+ import pydicom_seg
5
+
6
+ import pandas as pd
7
+ import SimpleITK as sitk
8
+
9
+ from tqdm import tqdm
10
+
11
+
12
+ patient_ids = data['Subject ID'].unique()
13
+
14
+ for pid in tqdm(patient_ids):
15
+
16
+ row = data[data['Subject ID'] == pid]
17
+ out_fn = f'NSCLC-Radiomics-NIFTI3/{pid}'
18
+ os.makedirs(out_fn)
19
+
20
+ try:
21
+ inp_fn_img = row[row['Number of Images'] > 1]['File Location'].values[0]
22
+ dicom2nifti.convert_directory(inp_fn_img, out_fn)
23
+ except:
24
+ print(f'Image {inp_fn_img} failed to convert')
25
+ pass
26
+
27
+ try:
28
+ inp_fn_seg = row[row['File Location'].str.contains('Segmentation')]['File Location'].values[0] + '/1-1.dcm'
29
+ dcm = pydicom.dcmread(inp_fn_seg)
30
+ reader = pydicom_seg.SegmentReader()
31
+ result = reader.read(dcm)
32
+
33
+ for segment_number in result.available_segments:
34
+ image = result.segment_image(segment_number) # lazy construction
35
+ sitk.WriteImage(image, os.path.join(out_fn, f'seg-{result.segment_infos[segment_number].SegmentDescription}.nii.gz'), True)
36
+ except:
37
+ print(f'Segmentation {inp_fn_seg} failed to convert')
38
+ pass
39
+
metadata.csv ADDED
The diff for this file is too large to render. See raw diff
 
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ pandas==1.5.0
2
+ pydicom==2.3.1
3
+ pydicom-seg==0.4.1
4
+ SimpleITK==2.2.0
5
+ tqdm==4.64.1