FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
fast::SegmentationLabelRenderer Class Reference

#include <SegmentationLabelRenderer.hpp>

+ Inheritance diagram for fast::SegmentationLabelRenderer:
+ Collaboration diagram for fast::SegmentationLabelRenderer:

Public Member Functions

void setLabelName (int label, std::string name)
 
void setLabelColor (int label, Color color)
 
void setAreaThreshold (float threshold)
 
void draw (Matrix4f perspectiveMatrix, Matrix4f viewingMatrix, float zNear, float zFar, bool mode2D) override
 
void loadAttributes () override
 
- Public Member Functions inherited from fast::Renderer
virtual void postDraw ()
 
virtual uint addInputConnection (DataChannel::pointer port)
 
virtual uint addInputData (DataObject::pointer data)
 
virtual DataBoundingBox getBoundingBox (bool transform=true)
 
virtual void stopPipeline ()
 
virtual void reset ()
 
virtual void setDisabled (bool disabled)
 
virtual bool isDisabled () const
 
void setView (View *view)
 
void setSynchronizedRendering (bool synched)
 
bool getSynchronizedRendering () const
 
- Public Member Functions inherited from fast::ProcessObject
virtual ~ProcessObject ()
 
void update (int executeToken=-1)
 
RuntimeMeasurement::pointer getRuntime ()
 
RuntimeMeasurement::pointer getRuntime (std::string name)
 
RuntimeMeasurementsManager::pointer getAllRuntimes ()
 
void enableRuntimeMeasurements ()
 
void disableRuntimeMeasurements ()
 
void setMainDevice (ExecutionDevice::pointer device)
 
void setMainDeviceCriteria (const DeviceCriteria &citeria)
 
ExecutionDevice::pointer getMainDevice () const
 
void setDevice (uint deviceNumber, ExecutionDevice::pointer device)
 
void setDeviceCriteria (uint deviceNumber, const DeviceCriteria &criteria)
 
ExecutionDevice::pointer getDevice (uint deviceNumber) const
 
virtual DataChannel::pointer getOutputPort (uint portID=0)
 
virtual DataChannel::pointer getInputPort (uint portID=0)
 
virtual void setInputConnection (DataChannel::pointer port)
 
virtual void setInputConnection (uint portID, DataChannel::pointer port)
 
virtual void setInputData (DataObject::pointer data)
 
virtual void setInputData (uint portID, DataObject::pointer data)
 
int getNrOfInputConnections () const
 
int getNrOfOutputPorts () const
 
virtual std::string getNameOfClass () const =0
 
std::shared_ptr< AttributegetAttribute (std::string id)
 
std::unordered_map< std::string, std::shared_ptr< Attribute > > getAttributes ()
 
void setAttributes (std::vector< std::shared_ptr< Attribute >> attributes)
 
void stopPipeline ()
 
void setModified (bool modified)
 
template<class DataType >
std::shared_ptr< DataTypeupdateAndGetOutputData (uint portID=0)
 
- Public Member Functions inherited from fast::Object
 Object ()
 
virtual ~Object ()
 
ReportergetReporter ()
 

Protected Member Functions

 SegmentationLabelRenderer ()
 
void execute () override
 
- Protected Member Functions inherited from fast::Renderer
 Renderer ()
 
void createShaderProgram (std::vector< std::string > shaderFilenames, std::string programName="default")
 
void attachShader (std::string filename, std::string programName="default")
 
void activateShader (std::string programName="default")
 
void deactivateShader ()
 
uint getShaderProgram (std::string programName="default")
 
void setShaderUniform (std::string name, Matrix4f matrix, std::string shaderProgramName="default")
 
void setShaderUniform (std::string name, Affine3f matrix, std::string shaderProgramName="default")
 
void setShaderUniform (std::string name, Vector3f vector, std::string shaderProgramName="default")
 
void setShaderUniform (std::string name, float value, std::string shaderProgramName="default")
 
void setShaderUniform (std::string name, bool value, std::string shaderProgramName="default")
 
void setShaderUniform (std::string name, int value, std::string shaderProgramName="default")
 
int getShaderUniformLocation (std::string name, std::string shaderProgramName="default")
 
void lock ()
 
void unlock ()
 
- Protected Member Functions inherited from fast::ProcessObject
 ProcessObject ()
 
virtual void preExecute ()
 
virtual void postExecute ()
 
template<class DataType >
void createInputPort (uint portID, bool required=true)
 
template<class DataType >
void createOutputPort (uint portID)
 
template<class DataType >
std::shared_ptr< DataTypegetInputData (uint portID=0)
 
template<class DataType >
std::shared_ptr< DataTypegetOutputData (uint portID=0)
 
void addOutputData (uint portID, DataObject::pointer data)
 
bool hasNewInputData (uint portID)
 
virtual void waitToFinish ()
 
void createOpenCLProgram (std::string sourceFilename, std::string name="")
 
cl::Program getOpenCLProgram (std::shared_ptr< OpenCLDevice > device, std::string name="", std::string buildOptions="")
 
void createFloatAttribute (std::string id, std::string name, std::string description, float initialValue)
 
void createIntegerAttribute (std::string id, std::string name, std::string description, int initialValue)
 
void createBooleanAttribute (std::string id, std::string name, std::string description, bool initialValue)
 
void createStringAttribute (std::string id, std::string name, std::string description, std::string initialValue)
 
float getFloatAttribute (std::string id)
 
int getIntegerAttribute (std::string id)
 
bool getBooleanAttribute (std::string id)
 
std::string getStringAttribute (std::string id)
 
std::vector< float > getFloatListAttribute (std::string id)
 
std::vector< int > getIntegerListAttribute (std::string id)
 
std::vector< bool > getBooleanListAttribute (std::string id)
 
std::vector< std::string > getStringListAttribute (std::string id)
 
void changeDeviceOnInputs (uint deviceNumber, ExecutionDevice::pointer device)
 
void validateInputPortExists (uint portID)
 
void validateOutputPortExists (uint portID)
 
- Protected Member Functions inherited from fast::Object
ReporterreportError ()
 
ReporterreportWarning ()
 
ReporterreportInfo ()
 
ReporterEnd reportEnd () const
 

Protected Attributes

std::unordered_map< uint, uintmTexturesToRender
 
std::unordered_map< uint, uintmVAO
 
std::unordered_map< uint, uintmVBO
 
std::unordered_map< uint, uintmEBO
 
std::unordered_map< uint, std::shared_ptr< RegionList > > m_regions
 
std::unordered_map< uint, std::shared_ptr< Image > > mImageUsed
 
std::unordered_map< uint, uint64_t > mDataTimestamp
 
std::unordered_map< uint, float > mScales
 
std::unordered_map< int, Colorm_labelColors
 
std::unordered_map< int, std::string > m_labelNames
 
uint mFontSize
 
Vector2f m_worldPosition
 
Vector2f m_viewPosition
 
float m_textHeightInMM = 1.0f
 
bool m_centerPosition = true
 
bool m_dynamicSize = true
 
float m_areaThreshold
 
- Protected Attributes inherited from fast::Renderer
bool mHasRendered = true
 
bool mStop = false
 
bool m_synchedRendering = true
 
std::condition_variable_any mRenderedCV
 
std::mutex mMutex
 
bool m_disabled = false
 
std::unordered_map< uint, SpatialDataObject::pointermDataToRender
 
Viewm_view
 
- Protected Attributes inherited from fast::ProcessObject
bool mIsModified
 
int m_lastExecuteToken = -1
 
RuntimeMeasurementsManager::pointer mRuntimeManager
 
std::unordered_map< uint, bool > mRequiredInputs
 
std::unordered_map< uint, std::vector< uint > > mInputDevices
 
std::unordered_map< uint, ExecutionDevice::pointermDevices
 
std::unordered_map< uint, DeviceCriteriamDeviceCriteria
 
std::unordered_map< uint, DataChannel::pointermInputConnections
 
std::unordered_map< uint, std::vector< std::weak_ptr< DataChannel > > > mOutputConnections
 
std::unordered_map< uint, bool > mInputPorts
 
std::unordered_set< uintmOutputPorts
 
std::unordered_map< uint, std::pair< DataObject::pointer, uint64_t > > mLastProcessed
 
std::unordered_map< std::string, std::shared_ptr< OpenCLProgram > > mOpenCLPrograms
 
std::unordered_map< std::string, std::shared_ptr< Attribute > > mAttributes
 
std::unordered_map< std::string, std::string > m_frameData
 
std::unordered_set< std::string > m_lastFrame
 
int m_maximumNrOfFrames = -1
 
- Protected Attributes inherited from fast::Object
std::weak_ptr< ObjectmPtr
 

Additional Inherited Members

- Public Types inherited from fast::Renderer
typedef std::shared_ptr< Rendererpointer
 
- Public Types inherited from fast::ProcessObject
typedef std::shared_ptr< ProcessObjectpointer
 
- Public Types inherited from fast::Object
typedef std::shared_ptr< Objectpointer
 
- Static Public Member Functions inherited from fast::ProcessObject
static std::string getStaticNameOfClass ()
 
- Static Public Member Functions inherited from fast::Object
static std::string getStaticNameOfClass ()
 

Constructor & Destructor Documentation

◆ SegmentationLabelRenderer()

fast::SegmentationLabelRenderer::SegmentationLabelRenderer ( )
protected

Member Function Documentation

◆ draw()

void fast::SegmentationLabelRenderer::draw ( Matrix4f  perspectiveMatrix,
Matrix4f  viewingMatrix,
float  zNear,
float  zFar,
bool  mode2D 
)
overridevirtual

Implements fast::Renderer.

◆ execute()

void fast::SegmentationLabelRenderer::execute ( )
overrideprotectedvirtual

Reimplemented from fast::Renderer.

◆ loadAttributes()

void fast::SegmentationLabelRenderer::loadAttributes ( )
overridevirtual

Reimplemented from fast::ProcessObject.

◆ setAreaThreshold()

void fast::SegmentationLabelRenderer::setAreaThreshold ( float  threshold)

◆ setLabelColor()

void fast::SegmentationLabelRenderer::setLabelColor ( int  label,
Color  color 
)

◆ setLabelName()

void fast::SegmentationLabelRenderer::setLabelName ( int  label,
std::string  name 
)

Member Data Documentation

◆ m_areaThreshold

float fast::SegmentationLabelRenderer::m_areaThreshold
protected

◆ m_centerPosition

bool fast::SegmentationLabelRenderer::m_centerPosition = true
protected

◆ m_dynamicSize

bool fast::SegmentationLabelRenderer::m_dynamicSize = true
protected

◆ m_labelColors

std::unordered_map<int, Color> fast::SegmentationLabelRenderer::m_labelColors
protected

◆ m_labelNames

std::unordered_map<int, std::string> fast::SegmentationLabelRenderer::m_labelNames
protected

◆ m_regions

std::unordered_map<uint, std::shared_ptr<RegionList> > fast::SegmentationLabelRenderer::m_regions
protected

◆ m_textHeightInMM

float fast::SegmentationLabelRenderer::m_textHeightInMM = 1.0f
protected

◆ m_viewPosition

Vector2f fast::SegmentationLabelRenderer::m_viewPosition
protected

◆ m_worldPosition

Vector2f fast::SegmentationLabelRenderer::m_worldPosition
protected

◆ mDataTimestamp

std::unordered_map<uint, uint64_t> fast::SegmentationLabelRenderer::mDataTimestamp
protected

Timestamp used to generate texture

◆ mEBO

std::unordered_map<uint, uint> fast::SegmentationLabelRenderer::mEBO
protected

◆ mFontSize

uint fast::SegmentationLabelRenderer::mFontSize
protected

◆ mImageUsed

std::unordered_map<uint, std::shared_ptr<Image> > fast::SegmentationLabelRenderer::mImageUsed
protected

◆ mScales

std::unordered_map<uint, float> fast::SegmentationLabelRenderer::mScales
protected

◆ mTexturesToRender

std::unordered_map<uint, uint> fast::SegmentationLabelRenderer::mTexturesToRender
protected

◆ mVAO

std::unordered_map<uint, uint> fast::SegmentationLabelRenderer::mVAO
protected

◆ mVBO

std::unordered_map<uint, uint> fast::SegmentationLabelRenderer::mVBO
protected

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