Skip to content

Commit 00b4fd0

Browse files
committed
WIP: Test ElastixLibBasedExe instead of the elastix executable
1 parent e13fab6 commit 00b4fd0

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

Core/Main/ElastixLibBasedExe.cxx

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
#include "elastixlib.h"
2222
#include "elxConversion.h"
2323
#include "elxElastixMain.h"
24-
#include "itkUseMevisDicomTiff.h"
25-
2624
#include <Core/elxVersionMacros.h>
25+
#include "itkUseMevisDicomTiff.h"
2726

2827
// ITK header files:
2928
#include <itkTimeProbe.h>
@@ -76,17 +75,13 @@ Main(const int argc, const char * const * const argv)
7675
}
7776
else if (argument == "--version")
7877
{
79-
std::cout << std::fixed;
80-
std::cout << std::showpoint;
81-
std::cout << std::setprecision(3);
82-
std::cout << "elastix version: " << ELASTIX_VERSION_STRING << std::endl;
78+
std::cout << "elastix version: " ELASTIX_VERSION_STRING << std::endl;
8379
return 0;
8480
}
8581
else if (argument == "--extended-version")
8682
{
87-
std::cout << std::fixed << std::showpoint << std::setprecision(3) << "elastix version: " << ELASTIX_VERSION_STRING
88-
<< "\nITK version: " << ITK_VERSION_MAJOR << '.' << ITK_VERSION_MINOR << '.' << ITK_VERSION_PATCH
89-
<< "\nBuild date: " << __DATE__ << ' ' << __TIME__
83+
std::cout << "elastix version: " ELASTIX_VERSION_STRING << "\nITK version: " << ITK_VERSION_MAJOR << '.'
84+
<< ITK_VERSION_MINOR << '.' << ITK_VERSION_PATCH << "\nBuild date: " << __DATE__ << ' ' << __TIME__
9085
#ifdef _MSC_FULL_VER
9186
<< "\nCompiler: Visual C++ version " << _MSC_FULL_VER << '.' << _MSC_BUILD
9287
#endif
@@ -151,7 +146,7 @@ Main(const int argc, const char * const * const argv)
151146
if (key == "-out")
152147
{
153148
/** Make sure that last character of the output folder equals a '/' or '\'. */
154-
const char last = value[value.size() - 1];
149+
const char last = value.back();
155150
if (last != '/' && last != '\\')
156151
{
157152
value.append("/");
@@ -322,10 +317,7 @@ void
322317
PrintHelp(void)
323318
{
324319
/** Print the version. */
325-
std::cout << std::fixed;
326-
std::cout << std::showpoint;
327-
std::cout << std::setprecision(3);
328-
std::cout << "elastix version: " << ELASTIX_VERSION_STRING << "\n" << std::endl;
320+
std::cout << "elastix version: " << ELASTIX_VERSION_STRING "\n\n";
329321

330322
/** What is elastix? */
331323
std::cout << "elastix registers a moving image to a fixed image.\n"

Testing/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ macro( elx_add_run_test testbasename howtocompare )
302302
# Set maximum test length to 10 minutes
303303
add_test( NAME ${testname}_OUTPUT
304304
CONFIGURATIONS Release
305-
COMMAND ${EXECUTABLE_OUTPUT_PATH}/elastix
305+
COMMAND ${EXECUTABLE_OUTPUT_PATH}/ElastixLibBasedExe
306306
${elastixargs} -out ${output_dir} )
307307
set_tests_properties( ${testname}_OUTPUT
308308
PROPERTIES TIMEOUT 600 )

0 commit comments

Comments
 (0)