Skip to content

5TT format: Rename fifth volume#3331

Draft
Lestropie wants to merge 1 commit into
devfrom
5tt_rename_fifth_volume
Draft

5TT format: Rename fifth volume#3331
Lestropie wants to merge 1 commit into
devfrom
5tt_rename_fifth_volume

Conversation

@Lestropie
Copy link
Copy Markdown
Member

Closes #2869.

Posting as draft PR; may want to tweak a few minor things before merging (5tt2vis intensity, add documentation on rename, check for residual references).

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>
@Lestropie Lestropie self-assigned this Apr 30, 2026
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread cpp/cmd/5tt2vis.cpp
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);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions]

  const float other_multiplier = get_option_value("other", default_value_other);
                                 ^

Comment thread cpp/cmd/5tt2vis.cpp
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());
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() ||
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: implicit conversion 'float' -> bool [readability-implicit-bool-conversion]

Suggested change
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() ||
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]

Suggested change
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));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: narrowing conversion from 'size_t' (aka 'unsigned long') to 'float' [bugprone-narrowing-conversions]

                        other_count / static_cast<float>(total_count));
                        ^

@Lestropie Lestropie mentioned this pull request Apr 30, 2026
@Lestropie Lestropie added this to the 3.1.0 updates milestone Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant