Datasets:

Modalities:
Text
Formats:
json
Languages:
English
Size:
< 1K
Libraries:
Datasets
pandas
License:
PortPy commited on
Commit
78d769e
·
verified ·
1 Parent(s): b245cfb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -41
README.md CHANGED
@@ -108,36 +108,24 @@ Beam_0_Data.h5
108
  You can load the dataset with the following lines of code.
109
 
110
  ```python
111
- from datasets import load_dataset
112
-
113
- dataset = load_dataset("PortPy-Project/PortPy_Datset", split="split_0")
114
- print(dataset)
115
- Dataset({
116
- features: ['patient_id', 'ct_data', 'ct_metadata', 'structureset_data', 'structureset_metadata', 'beam_data_paths', 'beam_metadata_paths', 'optimization_voxels_data', 'optimization_voxels_metadata', 'planner_beams', 'rt_dose_echo_imrt', 'rt_plan_echo_imrt'],
117
- num_rows: 50
118
- })
119
-
120
- # load ct metadata for 1st patient
121
- ct_metadata = load_dataset("json", data_files=dataset[0]['ct_metadata'])
122
- print(ct_metadata)
123
-
124
- DatasetDict({
125
- train: Dataset({
126
- features: ['origin_xyz_mm', 'resolution_xyz_mm', 'size_xyz_mm', 'direction', 'ct_hu_3d_File'],
127
- num_rows: 1
128
- })
129
- })
130
-
131
- # load structures metadata for 1st patient
132
- structureset_metadata = load_dataset("json", data_files=dataset[0]['structureset_metadata'])
133
- print(structureset_metadata)
134
-
135
- DatasetDict({
136
- train: Dataset({
137
- features: ['name', 'volume_cc', 'dicom_structure_name', 'fraction_of_vol_in_calc_box', 'structure_mask_3d_File'],
138
- num_rows: 9
139
- })
140
- })
141
 
142
  ```
143
 
@@ -157,14 +145,3 @@ The original imaging data was processed by the authors of this repository by:
157
  - Adding benchmark plans using in-house automated treatment planning system **ECHO**.
158
  - Storing the data in the standardized [PortPy](https://github.com/PortPy/PortPy) data format for research and educational purposes.
159
 
160
-
161
- # Reference <a name="Reference"></a>
162
- If you find our work useful in your research or if you use parts of this code please cite our [AAPM'23 abstract](https://aapm.confex.com/aapm/2023am/meetingapp.cgi/Paper/4208) :
163
- ```
164
- @article{jhanwar2023portpy,
165
- title={Portpy: An Open-Source Python Package for Planning and Optimization in Radiation Therapy Including Benchmark Data and Algorithms},
166
- author={Jhanwar, Gourav and Tefagh, Mojtaba and Taasti, Vicki T and Alam, Sadegh R and Tuomaala, Seppo and Nadeem, Saad and Zarepisheh, Masoud},
167
- journal={AAPM 65th Annual Meeting & Exhibition},
168
- year={2023}
169
- }
170
- ```
 
108
  You can load the dataset with the following lines of code.
109
 
110
  ```python
111
+ #!pip install portpy (# Install portpy )
112
+ import portpy.photon as pp
113
+
114
+ # Use PortPy DataExplorer class to explore and download PortPy data from HuggingFace. Please modify 'local_download_dir' in case
115
+ # if you want to download data to custom local directory
116
+ data = pp.DataExplorer(hf_repo_id="PortPy-Project/PortPy_Dataset", local_download_dir=r'../hugging_face_data')
117
+
118
+ # display overview of the patients available in portpy
119
+ data.display_list_of_patients()
120
+
121
+ #pick up a patient to create a treament plan
122
+ data.patient_id = 'Lung_Patient_16'
123
+
124
+ # download data for the given patient
125
+ data.filter_and_download_hf_dataset()
126
+
127
+ # display patient metadata
128
+ data.display_patient_metadata()
 
 
 
 
 
 
 
 
 
 
 
 
129
 
130
  ```
131
 
 
145
  - Adding benchmark plans using in-house automated treatment planning system **ECHO**.
146
  - Storing the data in the standardized [PortPy](https://github.com/PortPy/PortPy) data format for research and educational purposes.
147