FAST
3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
|
#include <Renderer.hpp>
Public Types | |
typedef std::shared_ptr< Renderer > | pointer |
![]() | |
typedef std::shared_ptr< ProcessObject > | pointer |
![]() | |
typedef std::shared_ptr< Object > | pointer |
Public Member Functions | |
virtual void | draw (Matrix4f perspectiveMatrix, Matrix4f viewingMatrix, float zNear, float zFar, bool mode2D)=0 |
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 |
![]() | |
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 |
virtual void | loadAttributes () |
std::shared_ptr< Attribute > | getAttribute (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< DataType > | updateAndGetOutputData (uint portID=0) |
![]() | |
Object () | |
virtual | ~Object () |
Reporter & | getReporter () |
Protected Member Functions | |
Renderer () | |
virtual void | execute () override |
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 () |
![]() | |
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< DataType > | getInputData (uint portID=0) |
template<class DataType > | |
std::shared_ptr< DataType > | getOutputData (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) |
![]() | |
Reporter & | reportError () |
Reporter & | reportWarning () |
Reporter & | reportInfo () |
ReporterEnd | reportEnd () const |
Protected Attributes | |
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::pointer > | mDataToRender |
View * | m_view |
![]() | |
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::pointer > | mDevices |
std::unordered_map< uint, DeviceCriteria > | mDeviceCriteria |
std::unordered_map< uint, DataChannel::pointer > | mInputConnections |
std::unordered_map< uint, std::vector< std::weak_ptr< DataChannel > > > | mOutputConnections |
std::unordered_map< uint, bool > | mInputPorts |
std::unordered_set< uint > | mOutputPorts |
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 |
![]() | |
std::weak_ptr< Object > | mPtr |
Friends | |
class | View |
Additional Inherited Members | |
![]() | |
static std::string | getStaticNameOfClass () |
![]() | |
static std::string | getStaticNameOfClass () |
typedef std::shared_ptr<Renderer> fast::Renderer::pointer |
|
protected |
|
protected |
|
virtual |
Adds a new input connection
port |
Reimplemented in fast::SliceRenderer, fast::VertexRenderer, fast::LineRenderer, and fast::TriangleRenderer.
|
virtual |
Adds a new input connection to a specific data object
data |
Reimplemented in fast::VertexRenderer.
|
protected |
|
protected |
Creates an OpenGL shader program. Should be used in the renderer constructor.
shaderFilenames | |
programName |
|
protected |
|
pure virtual |
Implemented in fast::VolumeRenderer, fast::TextRenderer, fast::HeatmapRenderer, fast::AlphaBlendingVolumeRenderer, fast::SegmentationLabelRenderer, fast::ThresholdVolumeRenderer, fast::MaximumIntensityProjection, fast::VertexRenderer, fast::LineRenderer, fast::ImageRenderer, and fast::BoundingBoxRenderer.
|
overrideprotectedvirtual |
Implements fast::ProcessObject.
Reimplemented in fast::SegmentationLabelRenderer.
|
virtual |
Reimplemented in fast::TextRenderer.
|
protected |
|
protected |
bool fast::Renderer::getSynchronizedRendering | ( | ) | const |
|
virtual |
Get whether this renderer is disabled or not
|
protected |
This will lock the renderer mutex. Used by the compute thread.
|
virtual |
|
virtual |
|
virtual |
Set renderer to disabled or enabled. A disabled renderer will not draw.
disabled |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void fast::Renderer::setSynchronizedRendering | ( | bool | synched | ) |
void fast::Renderer::setView | ( | View * | view | ) |
|
virtual |
Reimplemented in fast::SegmentationPyramidRenderer.
|
protected |
This will unlock the renderer mutex. Used by the compute thread.
|
friend |
|
protected |
A disabled renderer will not draw
|
protected |
|
protected |
|
protected |
This holds the current data to render for each input connection
|
protected |
|
protected |
|
protected |
|
protected |