Skip to content

Commit

Permalink
Fix generation of list of config file options
Browse files Browse the repository at this point in the history
  • Loading branch information
daljit46 authored and MRtrixBot committed Jul 5, 2023
1 parent 3977735 commit cff5cd8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/format_config_options
Original file line number Diff line number Diff line change
Expand Up @@ -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:'):
Expand Down
2 changes: 1 addition & 1 deletion docs/generate_user_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
14 changes: 9 additions & 5 deletions docs/reference/config_file_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions src/gui/mrview/tool/connectome/selection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/registration/linear.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit cff5cd8

Please sign in to comment.