commontk / CTK

A set of common support code for medical imaging, surgical navigation, and related purposes.
https://commontk.org
Apache License 2.0
827 stars 480 forks source link

BUG: Fix lookup of DCMTK binaries in multi-config build tree #1169

Closed jcfr closed 5 months ago

jcfr commented 5 months ago

ctkDICOMTester

In commit 2583a4e2 ("Remove empty build command and set install command empty.", 2014-11-04), the systematic installation of DCMTK during CTK superbuild was disabled. To support looking up binaries in the build tree, commit 0f5da463 ("ENH: Update ctkDICOMTester to lookup DCMTK executables in build tree", 2024-01-12), the directory for searching DCMTK binaries was changed from an install tree to a build tree. While this change was effective for single config builds, it failed in the case of multi-config builds where the exectuables are generated in sub-directories like "Release", "RelWithDebInfo", "MinSizeRel", or "Debug".

Following commit c1d55a13 ("ENH: Streamline test execution setting launch environment (#1168)," 2024-01-13), tests began executing with an updated PATH environment variable. To address the issue, we now expect DCMTK binaries to be automatically located in the PATH.

ctkDICOMApplicationTest1

Follow-up on commit 2583a4e2 ("Remove empty build command and set install command empty.", 2014-11-04) which disabled the systematic installation of DCMTK during the CTK superbuild.

This addresses the binary lookup issue for ctkDICOMApplicationTest1 on Windows by ensuring that all configuration sub-directories are considered during the lookup and by setting the launch environment using the variable CTK_TEST_LAUNCH_BUILD_ENVIRONMENT_MODIFICATION.

It also fixex ctkDICOMApplicationTest1 on Windows configuring hostname in dcmqrscp.cfg. This addresses the following error reported by the server ():

  I: Association Received (HOSTNAME:CTK_AE -> CTK_AE)
  I: Refusing Association (BadAEService)

where HOSTNAME corresponds to the actual hostname.

ctkDICOMRetrieve

Resolve invocation error in ctkDICOMApplicationTest1 for ctkDICOMRetrieve

Fixes the reporting of argument conversion errors in "ctkDICOMRetrieve" and ensures correct arguments are passed when calling it from "ctkDICOMApplicationTest1."

Initially, the test reported the error: Could not convert 11112 to an integer for the calledPoint.

After addressing the reporting of argument conversion errors, a subsequent error was reported, which helped identify the proper fix: Could not convert localhost to an integer for the calledPoint.

Related