-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "pd-dwi" | ||
version = "1.1.0" | ||
version = "1.1.1" | ||
description = "Physiologically-Decomposed Diffusion-Weighted MRI machine-learning model for predicting response to neoadjuvant chemotherapy in invasive breast cancer" | ||
authors = [ | ||
"Maya Gilad <[email protected]>" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
import os.path | ||
|
||
from pd_dwi.preprocessing.adc import calculate_adc | ||
|
||
|
||
def adc_preprocess(args): | ||
dwi_folder_path = args.dwi_folder | ||
input_data = args.dwi_data | ||
b_values = args.b | ||
|
||
calculate_adc(dwi_folder_path, set(b_values), dwi_folder_path) | ||
if os.path.isdir(input_data): | ||
calculate_adc(input_data, set(b_values), input_data) | ||
else: | ||
with open(input_data, mode='r') as f: | ||
# Skip first line | ||
f.readline() | ||
for dwi_folder in f.readlines(): | ||
calculate_adc(dwi_folder, set(b_values), dwi_folder) | ||
|
||
|
||
def add_adc_parser(parser) -> None: | ||
parser.add_argument('-dwi_folder', type=str, required=True, help="Path for DWI acquisition folder") | ||
parser.add_argument('-dwi_data', type=str, required=True, help="Path for DWI acquisition folder or input file listing DWI folders") | ||
parser.add_argument('-b', type=int, nargs='+', required=True, help="B-values to use for ADC calculation") | ||
|
||
parser.set_defaults(func=adc_preprocess) |
b470550
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report