Skip to content

Commit

Permalink
STYLE: Remove obsolete "DefaultOutputPrecision" parameter
Browse files Browse the repository at this point in the history
This elastix parameter was mainly intended to allow the user to specify the precision of floating point parameters in the transform parameter file. However, with pull request #385 commit af382ee "ENH: Sync Transform WriteToFile with CreateTransformParametersMap" (related to issue #383 "Reconsider string representation of floating points for parameter files and parameter maps"), this is no longer relevant. Floating point values are now written to transform parameter files in a lossless way.
  • Loading branch information
N-Dekker committed Feb 13, 2023
1 parent f09b475 commit b0b49ba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
5 changes: 0 additions & 5 deletions Core/Kernel/elxElastixBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ ElastixBase::BeforeAllBase()
/** Declare the return value and initialize it. */
int returndummy = 0;

/** Set the default precision of floating values in the output. */
this->m_Configuration->ReadParameter(this->m_DefaultOutputPrecision, "DefaultOutputPrecision", 0, false);
log::set_precision(this->m_DefaultOutputPrecision);

/** Check Command line options and print them to the logfile. */
log::info("ELASTIX version: " ELASTIX_VERSION_STRING "\nCommand line options from ElastixBase:");
std::string check = "";
Expand Down Expand Up @@ -321,7 +317,6 @@ ElastixBase::BeforeAllTransformixBase()

/** Print to log file. */
log::info("ELASTIX version: " ELASTIX_VERSION_STRING);
log::set_precision(this->GetDefaultOutputPrecision());

/** Check Command line options and print them to the logfile. */
log::info("Command line options from ElastixBase:");
Expand Down
18 changes: 0 additions & 18 deletions Core/Kernel/elxElastixBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ namespace elastix
* \parameter RandomSeed: Sets a global seed for the random generator.\n
* example: <tt>(RandomSeed 121212)</tt>\n
* It must be a positive integer number. Default: 121212.
* \parameter DefaultOutputPrecision: Set the default precision of floating values in the output.
* Most importantly, it affects the output precision of the parameters in the transform parameter file.\n
* example: <tt>(DefaultOutputPrecision 6)</tt>\n
* Default value: 6.
*
* The command line arguments used by this class are:
* \commandlinearg -f: mandatory argument for elastix with the file name of the fixed image. \n
Expand Down Expand Up @@ -331,17 +327,6 @@ class ElastixBase
SetResultDeformationField(DataObjectPointer result_deformationfield);


/** Get the default precision of the log system.
* (The value assumed when no DefaultOutputPrecision is given in the
* parameter file.
*/
int
GetDefaultOutputPrecision() const
{
return this->m_DefaultOutputPrecision;
}


/** Get whether direction cosines should be taken into account (true)
* or ignored (false). This depends on the UseDirectionCosines
* parameter. */
Expand Down Expand Up @@ -496,9 +481,6 @@ class ElastixBase
private:
IterationInfo m_IterationInfo;

/** The default output precision of elxout is set to 6. */
int m_DefaultOutputPrecision{ 6 };

/** The component containers. These containers contain
* SmartPointer's to itk::Object.
*/
Expand Down

0 comments on commit b0b49ba

Please sign in to comment.