From 2bf2d6ae0a0c1529bebaee7fd7018dc9d00f6309 Mon Sep 17 00:00:00 2001 From: "sandipsamal117@gmail.com" Date: Tue, 19 Sep 2023 17:12:39 -0400 Subject: [PATCH] Updated param list and requirements --- dcm_tagExtract/dcm_tagExtract.py | 62 +++++++++++++++++--------------- requirements.txt | 25 ++----------- setup.py | 2 +- 3 files changed, 38 insertions(+), 51 deletions(-) diff --git a/dcm_tagExtract/dcm_tagExtract.py b/dcm_tagExtract/dcm_tagExtract.py index c413571..b7dba78 100644 --- a/dcm_tagExtract/dcm_tagExtract.py +++ b/dcm_tagExtract/dcm_tagExtract.py @@ -245,12 +245,24 @@ def define_parameters(self): dest = 'fileFilter', optional = True, default = '') + self.add_argument("--fileFilterLogic", + help = "the logic to apply across the file filter", + optional = True, + type = str, + dest = 'fileFilterLogic', + default = 'OR') self.add_argument("-d", "--dirFilter", - help = "a list of comma separated string filters to apply across the input dir space", - type = str, - dest = 'dirFilter', - optional = True, - default = '') + help = "a list of comma separated string filters to apply across the input dir space", + type = str, + dest = 'dirFilter', + optional = True, + default = '') + self.add_argument("--dirFilterLogic", + help = "the logic to apply across the dir filter", + dest = 'dirFilterLogic', + optional = True, + type = str, + default = 'OR') self.add_argument("-F", "--tagFile", help = "file containing tags to parse", type = str, @@ -275,6 +287,14 @@ def define_parameters(self): dest = 'imageFile', optional = True, default = '') + self.add_argument("--syslog", + help = "show outputs in syslog style", + dest = 'syslog', + action = 'store_true', + optional = True, + type = bool, + default = False) + self.add_argument("-s", "--imageScale", help = "scale images with factor and optional :interpolation", type = str, @@ -353,31 +373,17 @@ def run(self, options): """ Define the code to be run by this plugin app. """ - #args = parserDS.parse_args() print(Gstr_title) print('Version: %s' % self.get_version()) - options.str_desc = Gstr_synopsis - options.syslog = "" - # pf_dicom_tagExtract = pfdicom_tagExtract.pfdicom_tagExtract( - # inputDir = options.inputdir, - # inputFile = options.inputFile, - # extension = options.extension, - # outputDir = options.outputdir, - # outputFileStem = options.outputFileStem, - # outputLeafDir = options.outputLeafDir, - # useIndexhtml = options.useIndexhtml, - # outputFileType = options.outputFileType, - # tagFile = options.tagFile, - # tagList = options.tagList, - # printToScreen = options.printToScreen, - # threads = options.threads, - # imageFile = options.imageFile, - # imageScale = options.imageScale, - # verbosity = options.verbosity, - # followLinks = options.followLinks, - # json = options.jsonReturn - # ) - pf_dicom_tagExtract = pfdicom_tagExtract.pfdicom_tagExtract(vars(options)) + options.str_desc = "" + + # Output the space of CLI + d_options = vars(options) + for k, v in d_options.items(): + print("%20s: %-40s" % (k, v)) + print("") + + pf_dicom_tagExtract = pfdicom_tagExtract.pfdicom_tagExtract(d_options) if options.version: print('Plugin Version: %s' % Dcm_tagExtract.VERSION) print('Internal pfdicom_tagExtract Version: %s' % pf_dicom_tagExtract.str_version) diff --git a/requirements.txt b/requirements.txt index 5a77129..44295f8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,24 +1,5 @@ chrisapp==2.4.0 -cycler==0.10.0 -Faker==9.3.1 -jedi==0.18.0 -kiwisolver==1.3.2 -matplotlib==3.4.3 -nose==1.3.7 -numpy==1.21.2 -parso==0.8.2 -pfdicom==2.0.12 -pfdicom-tagExtract==3.1.0 -pfmisc==2.2.8 -pftree==3.4.2 -Pillow==8.4.0 -pudb==2021.1 -pydicom==2.2.2 -pydicom-ext==0.6.1 -Pygments==2.10.0 -pyparsing==2.4.7 -python-dateutil==2.8.2 -six==1.16.0 -text-unidecode==1.3 -urwid==2.1.2 +pftree>=3.2.32 +pfdicom>=2.0.12 +pfdicom_tagExtract>=3.1.0 diff --git a/setup.py b/setup.py index 9b827a8..01be5e6 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name = 'dcm_tagExtract', - version = '3.2.1', + version = '3.2.2', description = 'This app performs a recursive walk down an input tree, and for each location with a DICOM file, will generate a report in the corresponding location in the output tree.', long_description = readme, author = 'Sandip Samal',