fast::TensorToSegmentation class

A process object which converts a Tensor to a Segmentation object.

Base classes

class ProcessObject
Abstract base class for all process objects.

Public functions

auto create(float threshold, bool hasBackgroundClass) -> std::shared_ptr<TensorToSegmentation>
auto getThreshold() const -> float
void setBackgroundClass(bool hasBackgroundClass)
void loadAttributes() virtual

Protected functions

void execute() override

Protected variables

float m_threshold
bool m_hasBackgroundClass

Function documentation

std::shared_ptr<TensorToSegmentation> fast::TensorToSegmentation::create(float threshold, bool hasBackgroundClass)

Parameters
threshold
hasBackgroundClass

Threshold to accept a channel X as being class X.

void fast::TensorToSegmentation::setBackgroundClass(bool hasBackgroundClass)

Parameters
hasBackgroundClass

Set whether channel 0 of segmentation tensor is the "background" class, thereby getting the label 0 in the resulting Segmentation.