Skip to content

warpcorrect: Detect non-constant triplet fill values #3362

Description

@Lestropie

Previously, the warpcorrect command required manual specification of either a single scalar value or a triplet of values that represents the "fill value" inserted by some other software package in voxels where no warp information is available.

With #3300, warpvalidate can scan the content of the image for prospective fill values, and an attempt to auto-determine the fill value is made based on its prevalence in the input image.

In processing a dataset I've found that ANTs is using fill values that are unique for each input and not equal for all three axes. I therefore think I'm currently forced to manually sample the fill value of each image before running warpcorrect. And I dislike barriers to automation.

  • Modify MR::Registration::Warp::validate_image() to detect fill values that do not have an equivalent value across all three volumes. It will need to build a std::map<Eigen::Array<ValueType, 3, 1>, size_t, Compare>, counting the number of appearances of each value triplet. MR::Registration::Warp::WarpValidation::fill_value will need to be changed to a std::optional<Eigen::Array<default_type, 3, 1>>.
  • In warpcorrect, import the 3-vector out-of-bounds marker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions