fast::SegmentationRenderer class

Renders 2D segmentation data.

Renders segmentation data using colors and potentially transparency.

Input can be 2D Segmentation, Image or ImagePyramid (of type TYPE_UINT8) objects.

Base classes

class ImageRenderer
Renders 2D Image data objects, both in 2D and 3D.
class LabelColorRenderer

Constructors, destructors, conversion operators

~SegmentationRenderer() virtual

Public functions

auto create(LabelColors colors, float opacity, float borderOpacity, int borderRadius) -> std::shared_ptr<SegmentationRenderer>
void setOpacity(float opacity, float borderOpacity = -1)
void loadAttributes() override

Protected functions

void draw(Matrix4f perspectiveMatrix, Matrix4f viewingMatrix, float zNear, float zFar, bool mode2D) override
void drawPyramid(Matrix4f perspectiveMatrix, Matrix4f viewingMatrix, float zNear, float zFar)
void drawNormal(Matrix4f perspectiveMatrix, Matrix4f viewingMatrix, float zNear, float zFar, bool mode2D)
void deleteAllTextures() override

Protected variables

int mBorderRadius
float mOpacity
float mBorderOpacity
std::list<std::string> m_tileQueue
std::unique_ptr<std::thread> m_bufferThread
std::condition_variable m_queueEmptyCondition
std::mutex m_tileQueueMutex
bool m_stop
std::unordered_set<std::string> m_loaded
int m_currentLevel
std::shared_ptr<ImagePyramid> m_input
std::atomic<uint64_t> m_memoryUsage
std::mutex m_texturesToRenderMutex
std::unordered_map<std::string, uint> mPyramidTexturesToRender
std::unordered_map<std::string, uint> mPyramidVAO
std::unordered_map<std::string, uint> mPyramidVBO
std::unordered_map<std::string, uint> mPyramidEBO