|
Volume Cartographer 2.28.0
|
Generate a Texture of layered images. More...
#include <vc/texturing/LayerTexture.hpp>
Public Types | |
| using | Pointer = std::shared_ptr< LayerTexture > |
| using | ImageCompleteSignal = Signal< std::size_t, std::size_t, cv::Mat > |
Public Types inherited from volcart::texturing::TexturingAlgorithm | |
| using | Pointer = std::shared_ptr< TexturingAlgorithm > |
| using | Texture = std::vector< cv::Mat > |
Public Member Functions | |
| LayerTexture ()=default | |
| ~LayerTexture () override=default | |
| LayerTexture (LayerTexture &)=default | |
| LayerTexture (LayerTexture &&)=default | |
| auto | operator= (const LayerTexture &) -> LayerTexture &=default |
| auto | operator= (LayerTexture &&) -> LayerTexture &=default |
| void | setGenerator (LineGenerator::Pointer g) |
| Set the Neighborhood generator. More... | |
| void | setEagerMode (bool enable) |
| Enable or disable eager rendering mode. More... | |
| auto | getEagerMode () const -> bool |
| Returns whether eager rendering mode is enabled. | |
| void | setEagerCache (bool enable) |
| Enable or disable caching of layer images in eager mode. More... | |
| auto | getEagerCache () const -> bool |
| Returns whether layer caching is enabled in eager mode. More... | |
| auto | compute () -> Texture override |
| Compute the Texture. More... | |
Public Member Functions inherited from volcart::texturing::TexturingAlgorithm | |
| virtual | ~TexturingAlgorithm ()=default |
| void | setPerPixelMap (PerPixelMap::Pointer ppm) |
| Set the input PerPixelMap. | |
| void | setVolume (Volume::Pointer vol) |
| Set the input Volume. | |
| virtual auto | compute () -> Texture=0 |
| Compute the Texture. More... | |
| auto | getTexture () -> Texture |
| Get the generated Texture. | |
| auto | progressIterations () const -> std::size_t override |
| Returns the maximum progress value. More... | |
| virtual std::size_t | progressIterations () const =0 |
Static Public Member Functions | |
| static auto | New () -> Pointer |
Public Attributes | |
| ImageCompleteSignal | imageComplete |
| Signal emitted after each layer image is completed in eager mode. More... | |
Public Attributes inherited from volcart::IterationsProgress | |
| Signal | progressStarted |
| Signal< std::size_t > | progressUpdated |
| Signal | progressComplete |
Private Attributes | |
| LineGenerator::Pointer | gen_ |
| bool | eager_ {false} |
| bool | eagerCache_ {false} |
Additional Inherited Members | |
Protected Member Functions inherited from volcart::texturing::TexturingAlgorithm | |
| TexturingAlgorithm ()=default | |
| TexturingAlgorithm (TexturingAlgorithm &)=default | |
| TexturingAlgorithm (TexturingAlgorithm &&)=default | |
| auto | operator= (const TexturingAlgorithm &) -> TexturingAlgorithm &=default |
| auto | operator= (TexturingAlgorithm &&) -> TexturingAlgorithm &=default |
Protected Attributes inherited from volcart::texturing::TexturingAlgorithm | |
| PerPixelMap::Pointer | ppm_ |
| Volume::Pointer | vol_ |
| Texture | result_ |
Generate a Texture of layered images.
The Texture generated by this class contains multiple texture images. Each image is the projection of the mesh some distance through the Volume along each point's surface normal. For well-formed meshes and parameterizations, this amounts to resampling the Volume into a flattened subvolume with the segmentation mesh forming a straight line at its center.
Definition at line 28 of file LayerTexture.hpp.
| using volcart::texturing::LayerTexture::ImageCompleteSignal = Signal<std::size_t, std::size_t, cv::Mat> |
Signal type
Definition at line 35 of file LayerTexture.hpp.
| using volcart::texturing::LayerTexture::Pointer = std::shared_ptr<LayerTexture> |
Pointer type
Definition at line 32 of file LayerTexture.hpp.
|
default |
Default constructor
|
overridedefault |
Default destructor
|
default |
Default copy constructor
|
default |
Default move constructor
|
overridevirtual |
Compute the Texture.
Implements volcart::texturing::TexturingAlgorithm.
| auto volcart::texturing::LayerTexture::getEagerCache | ( | ) | const -> bool |
Returns whether layer caching is enabled in eager mode.
|
static |
Make shared pointer
|
default |
Default copy operator
|
default |
Default move operator
| void volcart::texturing::LayerTexture::setEagerCache | ( | bool | enable | ) |
Enable or disable caching of layer images in eager mode.
When eager mode is enabled and caching is enabled, completed layer images are stored internally so they can be returned by compute(). When caching is disabled (the default), layers are only emitted via the imageComplete signal and compute() returns an empty result. Disabling the cache reduces peak memory usage when layers are being written to disk incrementally.
Has no effect when eager mode is disabled.
| void volcart::texturing::LayerTexture::setEagerMode | ( | bool | enable | ) |
Enable or disable eager rendering mode.
When enabled, the algorithm generates one complete layer image at a time (iterating over pixels for each layer offset), rather than the default mode which iterates over pixels and computes all layer offsets per pixel. Eager mode emits the imageComplete signal after each layer is finished, allowing incremental output (e.g., writing layers to disk as they are produced).
| void volcart::texturing::LayerTexture::setGenerator | ( | LineGenerator::Pointer | g | ) |
Set the Neighborhood generator.
This class only supports LineGenerator
|
private |
Eager mode
Definition at line 116 of file LayerTexture.hpp.
|
private |
Whether to cache images when eager mode is enabled
Definition at line 118 of file LayerTexture.hpp.
|
private |
Neighborhood Generator
Definition at line 113 of file LayerTexture.hpp.
| ImageCompleteSignal volcart::texturing::LayerTexture::imageComplete |
Signal emitted after each layer image is completed in eager mode.
The signal is emitted with the layer index, the total number of layers, and the completed layer image (as a cv::Mat).
Definition at line 105 of file LayerTexture.hpp.