Skip to content

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
bcrickboom committed Dec 2, 2024
2 parents 5f4680c + 06bffe8 commit 70a4a8f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion orthanc_tools/orthanc_test_db_populator.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,19 @@ def _generate_study_thread(self, thread_id):
parser.add_argument('--series', type=int, default=None, help='Number of series in each study')
parser.add_argument('--instances', type=int, default=None, help='Number of instances in each series')
parser.add_argument('--workers', type=int, default=1, help='Number of worker threads')
parser.add_argument('--from_study_date', type=str, default="20000101", help='Minimum date for StudyDates YYYYMMDD')
parser.add_argument('--to_study_date', type=str, default="20241231", help='Maximum date for StudyDates YYYYMMDD')
parser.add_argument('--seed', type=int, default=42, help='Random seed (to make generation repeatable - only if using a single worker)')
args = parser.parse_args()

url = os.environ.get("ORTHANC_URL", args.url)
user = os.environ.get("ORTHANC_USER", args.user)
pwd = os.environ.get("ORTHANC_PWD", args.password)
api_key = os.environ.get("ORTHANC_API_KEY", args.api_key)
from_study_date = os.environ.get("FROM_STUDY_DATE", args.from_study_date)
to_study_date = os.environ.get("TO_STUDY_DATE", args.to_study_date)
from_study_date = helpers.from_dicom_date(from_study_date)
to_study_date = helpers.from_dicom_date(to_study_date)

api_client = None
if api_key is not None:
Expand All @@ -234,7 +240,9 @@ def _generate_study_thread(self, thread_id):
series_count=args.series,
instances_count=args.instances,
random_seed=args.seed,
worker_threads_count=args.workers
worker_threads_count=args.workers,
from_study_date=from_study_date,
to_study_date=to_study_date
)

populator.execute()
Expand Down
4 changes: 4 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ v 0.14.0
========
- `LabelModifier` tool added. Allows to fix a typo in a label with handling of the permissions.

v 0.13.11
========
- `OrthancTestDbPopulator` script now accepts `--from_study_date` and `--to_study_date` arguments.

v 0.13.10
========
- `OrthancFolderImporter` uses worker threads.
Expand Down

0 comments on commit 70a4a8f

Please sign in to comment.