Commit dfc79f9c authored by David Frank's avatar David Frank
Browse files

Add query method for leading direction to traversal

parent 8c831c18
......@@ -162,6 +162,13 @@ namespace elsa
}
}
index_t SliceTraversal::leadingDirection() const
{
index_t idx = 0;
ray_.direction().array().cwiseAbs().maxCoeff(&idx);
return idx;
}
SliceTraversal::Iter SliceTraversal::begin() const { return {startIndex_, ray_, tDelta_, t_}; }
SliceTraversal::Iter SliceTraversal::end() const { return {endIndex_, ray_, tDelta_, t_}; }
......
......@@ -240,5 +240,8 @@ namespace elsa
// Get the index of the one past the last visited voxel
index_t endIndex() const;
// Get the leading direction of the ray
index_t leadingDirection() const;
};
} // namespace elsa
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment