Skip to content

Commit

Permalink
ENH: Let ElastixBase print git revision info, also for library users
Browse files Browse the repository at this point in the history
Previously, the git revision info (SHA and revision date) were only available to users of the executable (by `elastix.exe --extended-version`, as well as in the "elastix.log" file).
  • Loading branch information
N-Dekker committed Feb 20, 2025
1 parent a73dabc commit 666dbd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Core/Kernel/elxElastixBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "elxElastixBase.h"
#include <Core/elxVersionMacros.h>
#include "elxConversion.h"
#include <Core/elxGitRevisionInfo.h>
#include <sstream>
#include "itkMersenneTwisterRandomVariateGenerator.h"

Expand Down Expand Up @@ -177,7 +178,8 @@ ElastixBase::BeforeAllBase()
int returndummy = 0;

/** Check Command line options and print them to the logfile. */
log::info("ELASTIX version: " ELASTIX_VERSION_STRING "\nCommand line options from ElastixBase:");
log::info(std::string("ELASTIX version: " ELASTIX_VERSION_STRING "\nGit revision SHA: ") + gitRevisionSha +
"\nGit revision date: " + gitRevisionDate + "\nCommand line options from ElastixBase:");

if (!BaseComponent::IsElastixLibrary())
{
Expand Down

0 comments on commit 666dbd5

Please # to comment.