Skip to content

Commit

Permalink
Fixed import errors and requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Sep 15, 2023
1 parent 113d182 commit 15d0ab0
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 28 deletions.
56 changes: 33 additions & 23 deletions dcm_tagExtract/dcm_tagExtract.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from chrisapp.base import ChrisApp

# import the pfdicom_tagExtract module
import pfdicom_tagExtract
from pfdicom_tagExtract import pfdicom_tagExtract
import pudb
import sys
import os
Expand Down Expand Up @@ -239,12 +239,18 @@ def define_parameters(self):
dest = 'inputFile',
optional = True,
default = '')
self.add_argument("-e", "--extension",
self.add_argument("-e", "--fileFilter",
help = "DICOM file extension",
type = str,
dest = 'extension',
dest = 'fileFilter',
optional = True,
default = '')
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 = '')
self.add_argument("-F", "--tagFile",
help = "file containing tags to parse",
type = str,
Expand Down Expand Up @@ -277,7 +283,7 @@ def define_parameters(self):
default = '')
self.add_argument("-o", "--outputFileStem",
help = "output file",
optional = False,
optional = True,
type = str,
default = "",
dest = 'outputFileStem')
Expand Down Expand Up @@ -347,27 +353,31 @@ 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())
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
)
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))
if options.version:
print('Plugin Version: %s' % Dcm_tagExtract.VERSION)
print('Internal pfdicom_tagExtract Version: %s' % pf_dicom_tagExtract.str_version)
Expand Down
28 changes: 24 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
chrisapp~=2.4.0
nose~=1.3.7
pillow
pfdicom_tagExtract~=3.1.0
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

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name = 'dcm_tagExtract',
version = '3.2.0',
version = '3.2.1',
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',
Expand Down

0 comments on commit 15d0ab0

Please sign in to comment.