Skip to content

Commit

Permalink
input json file
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Dec 22, 2023
1 parent 9627cab commit 52b479f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions image_textRemove.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import os
import sys

__version__ = '1.0.4'
__version__ = '1.0.5'

DISPLAY_TITLE = r"""
_ _ _ _ ______
Expand All @@ -35,7 +35,7 @@
help='input file filter(only the extension)')
parser.add_argument('-o', '--outputType', default='png', type=str,
help='output file type(only the extension)')
parser.add_argument('-j', '--filterTextFromJSON', default='', type=str,
parser.add_argument('-j', '--filterTextFromJSON', default='**/*.json', type=str,
help='A dictionary of dicom tags and their values')
parser.add_argument( '--pftelDB',
dest = 'pftelDB',
Expand Down Expand Up @@ -80,8 +80,9 @@ def main(options: Namespace, inputdir: Path, outputdir: Path):
#
# Refer to the documentation for more options, examples, and advanced uses e.g.
# adding a progress bar and parallelism.
json_file_path = os.path.join(options.inputdir, options.filterTextFromJSON)
f = open(json_file_path, 'r')
json_str_glob = '%s/%s' % (options.inputdir, options.filterTextFromJSON)
l_json_datapath = glob.glob(json_str_glob, recursive=True)
f = open(l_json_datapath[0], 'r')
data = json.load(f)

mapper = PathMapper.file_mapper(inputdir, outputdir, glob=f"**/*.{options.fileFilter}")
Expand Down

0 comments on commit 52b479f

Please sign in to comment.