Volume Cartographer 2.28.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
volcart::texturing::LayerTexture Class Reference

Generate a Texture of layered images. More...

#include <vc/texturing/LayerTexture.hpp>

Inheritance diagram for volcart::texturing::LayerTexture:
[legend]
Collaboration diagram for volcart::texturing::LayerTexture:
[legend]

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_
 

Detailed Description

Generate a Texture of layered images.

Author
Seth Parker
Date
11/24/2016

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.

Member Typedef Documentation

◆ ImageCompleteSignal

using volcart::texturing::LayerTexture::ImageCompleteSignal = Signal<std::size_t, std::size_t, cv::Mat>

Signal type

Definition at line 35 of file LayerTexture.hpp.

◆ Pointer

Pointer type

Definition at line 32 of file LayerTexture.hpp.

Constructor & Destructor Documentation

◆ LayerTexture() [1/3]

volcart::texturing::LayerTexture::LayerTexture ( )
default

Default constructor

◆ ~LayerTexture()

volcart::texturing::LayerTexture::~LayerTexture ( )
overridedefault

Default destructor

◆ LayerTexture() [2/3]

volcart::texturing::LayerTexture::LayerTexture ( LayerTexture )
default

Default copy constructor

◆ LayerTexture() [3/3]

volcart::texturing::LayerTexture::LayerTexture ( LayerTexture &&  )
default

Default move constructor

Member Function Documentation

◆ compute()

auto volcart::texturing::LayerTexture::compute ( ) -> Texture
overridevirtual

Compute the Texture.

Implements volcart::texturing::TexturingAlgorithm.

◆ getEagerCache()

auto volcart::texturing::LayerTexture::getEagerCache ( ) const -> bool

Returns whether layer caching is enabled in eager mode.

See also
setEagerCache()

◆ New()

static auto volcart::texturing::LayerTexture::New ( ) -> Pointer
static

Make shared pointer

◆ operator=() [1/2]

auto volcart::texturing::LayerTexture::operator= ( const LayerTexture ) -> LayerTexture &=default
default

Default copy operator

◆ operator=() [2/2]

auto volcart::texturing::LayerTexture::operator= ( LayerTexture &&  ) -> LayerTexture &=default
default

Default move operator

◆ setEagerCache()

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.

See also
setEagerMode()

◆ setEagerMode()

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).

◆ setGenerator()

void volcart::texturing::LayerTexture::setGenerator ( LineGenerator::Pointer  g)

Set the Neighborhood generator.

This class only supports LineGenerator

Member Data Documentation

◆ eager_

bool volcart::texturing::LayerTexture::eager_ {false}
private

Eager mode

Definition at line 116 of file LayerTexture.hpp.

◆ eagerCache_

bool volcart::texturing::LayerTexture::eagerCache_ {false}
private

Whether to cache images when eager mode is enabled

Definition at line 118 of file LayerTexture.hpp.

◆ gen_

LineGenerator::Pointer volcart::texturing::LayerTexture::gen_
private

Neighborhood Generator

Definition at line 113 of file LayerTexture.hpp.

◆ imageComplete

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).

See also
setEagerMode()

Definition at line 105 of file LayerTexture.hpp.


The documentation for this class was generated from the following file: