5TT format: Rename fifth volume#3331
Conversation
Rename from 'pathological' to 'other'. The behaviour of ACT in these regions is not strictly tied to pathology, that is merely one of the possible use cases. Behaviour is unmodified, this is purely a naming change. Generated-by: Qwen 3.6 <qwen-coder@users.noreply.github.com>
| const float wm_multiplier = get_option_value("wm", default_value_wm); | ||
| const float csf_multiplier = get_option_value("csf", default_value_csf); | ||
| const float path_multiplier = get_option_value("path", default_value_pathology); | ||
| const float other_multiplier = get_option_value("other", default_value_other); |
There was a problem hiding this comment.
warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions]
const float other_multiplier = get_option_value("other", default_value_other);
^| auto f = [&](decltype(input) &in, decltype(output) &out) { | ||
| const DWI::Tractography::ACT::Tissues t(in); | ||
| const float bg = 1.0 - (t.get_cgm() + t.get_sgm() + t.get_wm() + t.get_csf() + t.get_path()); | ||
| const float bg = 1.0 - (t.get_cgm() + t.get_sgm() + t.get_wm() + t.get_csf() + t.get_other()); |
There was a problem hiding this comment.
warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions]
const float bg = 1.0 - (t.get_cgm() + t.get_sgm() + t.get_wm() + t.get_csf() + t.get_other());
^| // Make sure an appropriate cost function minimum has been found, and that | ||
| // this would be an acceptable termination point if it were processed by the tracking algorithm | ||
| if (!tissues.valid() || tissues.is_csf() || tissues.is_path() || !tissues.get_wm() || | ||
| if (!tissues.valid() || tissues.is_csf() || tissues.is_other() || !tissues.get_wm() || |
There was a problem hiding this comment.
warning: implicit conversion 'float' -> bool [readability-implicit-bool-conversion]
| if (!tissues.valid() || tissues.is_csf() || tissues.is_other() || !tissues.get_wm() || | |
| if (!tissues.valid() || tissues.is_csf() || tissues.is_other() || (tissues.get_wm() == 0.0f) || |
| // Make sure an appropriate cost function minimum has been found, and that | ||
| // this would be an acceptable termination point if it were processed by the tracking algorithm | ||
| if (!tissues.valid() || tissues.is_csf() || tissues.is_path() || !tissues.get_wm() || | ||
| if (!tissues.valid() || tissues.is_csf() || tissues.is_other() || !tissues.get_wm() || |
There was a problem hiding this comment.
warning: narrowing conversion from 'float' to 'bool' [bugprone-narrowing-conversions]
if (!tissues.valid() || tissues.is_csf() || tissues.is_other() || !tissues.get_wm() ||
^| csf = (c < 0.0) ? 0.0 : ((c > 1.0) ? 1.0 : c); | ||
| path = (p < 0.0) ? 0.0 : ((p > 1.0) ? 1.0 : p); | ||
| return ((is_valid = ((cgm + sgm + wm + csf + path) >= tissuesum_threshold))); | ||
| other = (p < 0.0) ? 0.0 : ((p > 1.0) ? 1.0 : p); |
There was a problem hiding this comment.
warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions]
other = (p < 0.0) ? 0.0 : ((p > 1.0) ? 1.0 : p);
^| static const float os_offset = 0.5 * os_step; | ||
|
|
||
| size_t cgm_count = 0, sgm_count = 0, wm_count = 0, csf_count = 0, path_count = 0, total_count = 0; | ||
| size_t cgm_count = 0, sgm_count = 0, wm_count = 0, csf_count = 0, other_count = 0, total_count = 0; |
There was a problem hiding this comment.
warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
| size_t cgm_count = 0, sgm_count = 0, wm_count = 0, csf_count = 0, other_count = 0, total_count = 0; | |
| size_t cgm_count = 0; | |
| size_t sgm_count = 0; | |
| size_t wm_count = 0; | |
| size_t csf_count = 0; | |
| size_t other_count = 0; | |
| size_t total_count = 0; |
| wm_count / static_cast<float>(total_count), | ||
| csf_count / static_cast<float>(total_count), | ||
| path_count / static_cast<float>(total_count)); | ||
| other_count / static_cast<float>(total_count)); |
There was a problem hiding this comment.
warning: narrowing conversion from 'size_t' (aka 'unsigned long') to 'float' [bugprone-narrowing-conversions]
other_count / static_cast<float>(total_count));
^
Closes #2869.
Posting as draft PR; may want to tweak a few minor things before merging (
5tt2visintensity, add documentation on rename, check for residual references).