Volume Cartographer 2.27.0
|
Generates a PerPixelMap from an ITKMesh and a UVMap. More...
#include <vc/texturing/PPMGenerator.hpp>
Public Member Functions | |
auto | progressIterations () const -> std::size_t override |
Returns the maximum progress value. More... | |
void | setMesh (const ITKMesh::Pointer &m) |
Set the input mesh. | |
void | setUVMap (const UVMap::Pointer &u) |
Set the input UV map. | |
void | setDimensions (std::size_t h, std::size_t w) |
Set the dimensions of the output PPM. | |
void | setShading (Shading s) |
Set the normal shading method. | |
auto | compute () -> PerPixelMap::Pointer |
Compute the PerPixelMap. | |
auto | getPPM () const -> PerPixelMap::Pointer |
Get the generated PerPixelMap. | |
virtual std::size_t | progressIterations () const =0 |
Private Attributes | |
ITKMesh::Pointer | inputMesh_ |
UVMap::Pointer | uvMap_ |
ITKMesh::Pointer | workingMesh_ |
PerPixelMap::Pointer | ppm_ |
Shading | shading_ {Shading::Smooth} |
std::size_t | width_ {0} |
std::size_t | height_ {0} |
enum class | Shading { Flat = 0 , Smooth } |
Pixel normal shading method. More... | |
PPMGenerator ()=default | |
PPMGenerator (std::size_t h, std::size_t w) | |
Additional Inherited Members | |
![]() | |
Signal | progressStarted |
Signal< std::size_t > | progressUpdated |
Signal | progressComplete |
Generates a PerPixelMap from an ITKMesh and a UVMap.
Rasters a UVMap and embeds the raster with 2D-to-3D lookup information. Each pixel in the PPM stores a vector of six double-precision floats which correspond to the 3D position and normal vector associated with that pixel: {x, y, z, nx, ny, nz}
This class uses raytracing functionality provided by the bvh library.
Definition at line 28 of file PPMGenerator.hpp.
|
strong |
Pixel normal shading method.
Enumerator | |
---|---|
Flat | Each pixel inherits the face's normal. |
Smooth | Each pixel's normal is a linear interpolation of the face's vertex normals. This is similar to Phong shading. |
Definition at line 33 of file PPMGenerator.hpp.
|
default |
Default constructor
volcart::texturing::PPMGenerator::PPMGenerator | ( | std::size_t | h, |
std::size_t | w | ||
) |
Construct with dimension parameters
|
overridevirtual |
Returns the maximum progress value.
Implements volcart::IterationsProgress.
|
private |
Output height of the PerPixelMap
Definition at line 94 of file PPMGenerator.hpp.
|
private |
Input mesh
Definition at line 81 of file PPMGenerator.hpp.
|
private |
Output PerPixelMap
Definition at line 88 of file PPMGenerator.hpp.
|
private |
Output shading
Definition at line 90 of file PPMGenerator.hpp.
|
private |
Input UV Map
Definition at line 83 of file PPMGenerator.hpp.
|
private |
Output width of the PerPixelMap
Definition at line 92 of file PPMGenerator.hpp.
|
private |
Working mesh
Definition at line 86 of file PPMGenerator.hpp.