Skip to content

Commit 72fa123

Browse files
committed
refactor(clean-pixels): command 'clean-pixels' with --type dicom
1 parent af0afba commit 72fa123

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

deid/main/__init__.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def get_parser():
159159
required=True,
160160
)
161161

162-
pixels = subparsers.add_parser("pixels", help="Clean dicom: scrub burn in pixels")
162+
pixels = subparsers.add_parser("clean-pixels", help="Clean dicom: scrub burn in pixels")
163163
pixels.add_argument(
164164
"--input",
165165
dest="input",
@@ -174,6 +174,13 @@ def get_parser():
174174
type=str,
175175
default=None,
176176
)
177+
pixels.add_argument(
178+
"--type",
179+
dest="type",
180+
help="Input type. Currently only dicom supported.",
181+
choices=['dicom'],
182+
default="dicom",
183+
)
177184

178185
return parser
179186

@@ -202,7 +209,7 @@ def main():
202209
from .identifiers import main
203210
elif args.command == "inspect":
204211
from .inspect import main
205-
elif args.command == "pixels":
212+
elif args.command == "clean-pixels":
206213
from .pixels import main
207214

208215
else:

deid/tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_deidmain_write_identifiers(self):
5353

5454
@patch(
5555
"sys.argv",
56-
"deid --outfolder out/ pixels --deid deid.cfg --input ./".split(" "),
56+
"deid --outfolder out/ clean-pixels --deid deid.cfg --input ./".split(" "),
5757
)
5858
def test_deidmain_clean_pixels(self):
5959
"""

0 commit comments

Comments
 (0)