Skip to content

Commit

Permalink
WIP: Test ElastixLibBasedExe instead of the elastix executable
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Dekker committed Nov 7, 2021
1 parent 203f731 commit 749a705
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
20 changes: 6 additions & 14 deletions Core/Main/ElastixLibBasedExe.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
#include "elastixlib.h"
#include "elxConversion.h"
#include "elxElastixMain.h"
#include "itkUseMevisDicomTiff.h"

#include <Core/elxVersionMacros.h>
#include "itkUseMevisDicomTiff.h"

// ITK header files:
#include <itkTimeProbe.h>
Expand Down Expand Up @@ -76,17 +75,13 @@ Main(const int argc, const char * const * const argv)
}
else if (argument == "--version")
{
std::cout << std::fixed;
std::cout << std::showpoint;
std::cout << std::setprecision(3);
std::cout << "elastix version: " << ELASTIX_VERSION_STRING << std::endl;
std::cout << "elastix version: " ELASTIX_VERSION_STRING << std::endl;
return 0;
}
else if (argument == "--extended-version")
{
std::cout << std::fixed << std::showpoint << std::setprecision(3) << "elastix version: " << ELASTIX_VERSION_STRING
<< "\nITK version: " << ITK_VERSION_MAJOR << '.' << ITK_VERSION_MINOR << '.' << ITK_VERSION_PATCH
<< "\nBuild date: " << __DATE__ << ' ' << __TIME__
std::cout << "elastix version: " ELASTIX_VERSION_STRING << "\nITK version: " << ITK_VERSION_MAJOR << '.'
<< ITK_VERSION_MINOR << '.' << ITK_VERSION_PATCH << "\nBuild date: " << __DATE__ << ' ' << __TIME__
#ifdef _MSC_FULL_VER
<< "\nCompiler: Visual C++ version " << _MSC_FULL_VER << '.' << _MSC_BUILD
#endif
Expand Down Expand Up @@ -151,7 +146,7 @@ Main(const int argc, const char * const * const argv)
if (key == "-out")
{
/** Make sure that last character of the output folder equals a '/' or '\'. */
const char last = value[value.size() - 1];
const char last = value.back();
if (last != '/' && last != '\\')
{
value.append("/");
Expand Down Expand Up @@ -322,10 +317,7 @@ void
PrintHelp(void)
{
/** Print the version. */
std::cout << std::fixed;
std::cout << std::showpoint;
std::cout << std::setprecision(3);
std::cout << "elastix version: " << ELASTIX_VERSION_STRING << "\n" << std::endl;
std::cout << "elastix version: " << ELASTIX_VERSION_STRING "\n\n";

/** What is elastix? */
std::cout << "elastix registers a moving image to a fixed image.\n"
Expand Down
2 changes: 1 addition & 1 deletion Testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ macro( elx_add_run_test testbasename howtocompare )
# Set maximum test length to 10 minutes
add_test( NAME ${testname}_OUTPUT
CONFIGURATIONS Release
COMMAND ${EXECUTABLE_OUTPUT_PATH}/elastix
COMMAND ${EXECUTABLE_OUTPUT_PATH}/ElastixLibBasedExe
${elastixargs} -out ${output_dir} )
set_tests_properties( ${testname}_OUTPUT
PROPERTIES TIMEOUT 600 )
Expand Down

0 comments on commit 749a705

Please sign in to comment.