Volume Cartographer 2.27.0
TransformsImpl.hpp
1#pragma once
2
4auto operator<<(std::ostream& os, const volcart::AffineTransform& t)
5 -> std::ostream&;
6
7namespace volcart
8{
9
10template <class PointSetT>
11auto ApplyTransform(const PointSetT& ps, const Transform3D::Pointer& transform)
12 -> PointSetT
13{
14 PointSetT output(ps);
15 std::transform(
16 output.begin(), output.end(), output.begin(),
17 [transform](const auto& a) { return transform->applyPoint(a); });
18 return output;
19}
20
21} // namespace volcart
3D affine transform
Definition: Transforms.hpp:243
std::ostream & operator<<(std::ostream &s, const volcart::Tensor3D< DType > &tensor)
Write a Tensor3D to an output stream.
Definition: Tensor3D.hpp:155
std::shared_ptr< Transform3D > Pointer
Definition: Transforms.hpp:56
Volume Cartographer library
auto ApplyTransform(const ITKMesh::Pointer &mesh, const Transform3D::Pointer &transform, bool normalize=true) -> ITKMesh::Pointer
Apply a transform to an ITKMesh.