Volume Cartographer 2.27.0
OrderedResampling.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <cstdint>
6#include <iostream>
7#include <stdexcept>
8#include <vector>
9
11
12namespace volcart::meshing
13{
36{
37public:
41
47 OrderedResampling(ITKMesh::Pointer mesh, int inWidth, int inHeight)
48 : input_{mesh}, inWidth_{inWidth}, inHeight_{inHeight}
49 {
50 }
52
65 void setMesh(const ITKMesh::Pointer& mesh, int inWidth, int inHeight);
66
70 ITKMesh::Pointer getOutputMesh() const;
71
75 int getOutputWidth() const { return outWidth_; }
76
80 int getOutputHeight() const { return outHeight_; }
82
87 void compute();
89
90private:
91 ITKMesh::Pointer input_;
92 ITKMesh::Pointer output_;
93
95 int inWidth_; // how many rows
97 int inHeight_; // how many points per row
102
110 void add_cell_(std::uint32_t a, std::uint32_t b, std::uint32_t c);
111};
112} // namespace volcart::meshing
Resample an ITKMesh using point ordering information.
void add_cell_(std::uint32_t a, std::uint32_t b, std::uint32_t c)
Add a face to the output mesh.
int getOutputWidth() const
Get the width of the resampled mesh.
void setMesh(const ITKMesh::Pointer &mesh, int inWidth, int inHeight)
Set the input mesh and the dimensions of the ordering matrix.
int getOutputHeight() const
Get the height of the resampled mesh.
ITKMesh::Pointer getOutputMesh() const
Get the resampled mesh.
OrderedResampling(ITKMesh::Pointer mesh, int inWidth, int inHeight)
void compute()
Compute resampled mesh.
Mesh generation and modification library.