From a87ee77b44bbd70eaeaf197ae649203564f657c1 Mon Sep 17 00:00:00 2001 From: Daljit Singh Date: Wed, 21 Jun 2023 12:32:32 +0100 Subject: [PATCH] Fix generation of list of config file options --- docs/format_config_options | 2 +- docs/generate_user_docs.sh | 2 +- docs/reference/config_file_options.rst | 14 +++++++++----- src/gui/mrview/tool/connectome/selection.cpp | 6 +++--- src/registration/linear.h | 2 +- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/format_config_options b/docs/format_config_options index 048ef85e68..c93b0e12af 100755 --- a/docs/format_config_options +++ b/docs/format_config_options @@ -20,7 +20,7 @@ import sys optionlist = [ ] for line in sys.stdin: - line = line.split ('//CONF')[1][1:] + line = line.split ('// CONF')[1][1:] if line.startswith ('option:'): optionlist += [ [ line[8:].strip(), '', '' ] ] elif line.startswith ('default:'): diff --git a/docs/generate_user_docs.sh b/docs/generate_user_docs.sh index 7a2ae23ef8..44239ae9fc 100755 --- a/docs/generate_user_docs.sh +++ b/docs/generate_user_docs.sh @@ -110,7 +110,7 @@ echo " # Generating list of configuration file options -grep -rn --include=\*.h --include=\*.cpp '^\s*//CONF\b' "${mrtrix_root}" |\ +grep -rn --include=\*.h --include=\*.cpp '^\s*//\sCONF\b' "${mrtrix_root}" |\ "${mrtrix_root}"/docs/format_config_options > ${mrtrix_root}/docs/reference/config_file_options.rst diff --git a/docs/reference/config_file_options.rst b/docs/reference/config_file_options.rst index bf53cc4a80..4f494f33e6 100644 --- a/docs/reference/config_file_options.rst +++ b/docs/reference/config_file_options.rst @@ -109,7 +109,8 @@ List of MRtrix3 configuration file options *default: 0.5* - The fraction of the colour of an edge connected to two selected nodes determined by the fixed selection highlight colour. + The fraction of the colour of an edge connected to two selected nodes determined by the fixed selection + highlight colour. .. option:: ConnectomeEdgeSelectedSizeMultiplier @@ -151,7 +152,8 @@ List of MRtrix3 configuration file options *default: 1.0* - The multiplicative factor to apply to the transparency of nodes not currently selected nor associated with a selected node. + The multiplicative factor to apply to the transparency of nodes not currently selected nor associated with a + selected node. .. option:: ConnectomeNodeOtherColour @@ -163,13 +165,14 @@ List of MRtrix3 configuration file options *default: 0.75* - The fraction of the colour of an unselected, non-associated node determined by the fixed not-selected highlight colour. + The fraction of the colour of an unselected, non-associated node determined by the fixed not-selected .. option:: ConnectomeNodeOtherSizeMultiplier *default: 1.0* - The multiplicative factor to apply to the size of nodes not currently selected nor associated with a selected node. + The multiplicative factor to apply to the size of nodes not currently selected nor associated with a selected + node. .. option:: ConnectomeNodeOtherVisibilityOverride @@ -638,7 +641,8 @@ List of MRtrix3 configuration file options *default: 0.0001* - Linear registration: smallest gradient descent step measured in fraction of a voxel at which to stop registration. + Linear registration: smallest gradient descent step measured in fraction of a voxel at which to stop + registration. .. option:: ScriptScratchDir diff --git a/src/gui/mrview/tool/connectome/selection.cpp b/src/gui/mrview/tool/connectome/selection.cpp index 01d3d7d52b..fa399cdb9d 100644 --- a/src/gui/mrview/tool/connectome/selection.cpp +++ b/src/gui/mrview/tool/connectome/selection.cpp @@ -82,7 +82,7 @@ NodeSelectionSettings::NodeSelectionSettings() // CONF option: ConnectomeEdgeSelectedColourFade // CONF default: 0.5 // CONF The fraction of the colour of an edge connected to two selected nodes determined by the fixed selection - // highlight colour. + // CONF highlight colour. edge_selected_colour_fade = File::Config::get_float("ConnectomeEdgeSelectedColourFade", 0.5f); // CONF option: ConnectomeEdgeSelectedColour // CONF default: 0.9,0.9,1.0 @@ -151,12 +151,12 @@ NodeSelectionSettings::NodeSelectionSettings() // CONF option: ConnectomeNodeOtherSizeMultiplier // CONF default: 1.0 // CONF The multiplicative factor to apply to the size of nodes not currently selected nor associated with a selected - // node. + // CONF node. node_other_size_multiplier = File::Config::get_float("ConnectomeNodeOtherSizeMultiplier", 1.0f); // CONF option: ConnectomeNodeOtherAlphaMultiplier // CONF default: 1.0 // CONF The multiplicative factor to apply to the transparency of nodes not currently selected nor associated with a - // selected node. + // CONF selected node. node_other_alpha_multiplier = File::Config::get_float("ConnectomeNodeOtherAlphaMultiplier", 1.0f); // CONF option: ConnectomeEdgeOtherVisibilityOverride diff --git a/src/registration/linear.h b/src/registration/linear.h index f6eb77c21f..4d7cc4c3e6 100644 --- a/src/registration/linear.h +++ b/src/registration/linear.h @@ -455,7 +455,7 @@ class Linear { // CONF option: RegStopLen // CONF default: 0.0001 // CONF Linear registration: smallest gradient descent step measured in fraction of a voxel at which to stop - // registration. + // CONF registration. default_type reg_stop_len = File::Config::get_float("RegStopLen", 0.0001); stop.array() *= reg_stop_len; DEBUG("coherence length: " + str(coherence));