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

#include <View.hpp>

+ Inheritance diagram for fast::View:
+ Collaboration diagram for fast::View:

Public Member Functions

void addRenderer (Renderer::pointer renderer)
 
void removeRenderer (Renderer::pointer renderer)
 
void removeAllRenderers ()
 
void keyPressEvent (QKeyEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void mousePressEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 
void wheelEvent (QWheelEvent *event)
 
void setMaximumFramerate (unsigned int framerate)
 
void setCameraInputConnection (DataChannel::pointer port)
 
void set2DMode ()
 
void set3DMode ()
 
void setLookAt (Vector3f cameraPosition, Vector3f targetPosition, Vector3f cameraUpVector, float zNear=0.1, float zFar=1000)
 
void quit ()
 
void reinitialize ()
 
bool hasQuit () const
 
 ~View ()
 
void recalculateCamera ()
 
void setBackgroundColor (Color color)
 
void setAutoUpdateCamera (bool autoUpdate)
 
Vector4f getOrthoProjectionParameters ()
 
std::string getNameOfClass () const
 
 View ()
 
std::vector< Renderer::pointergetRenderers ()
 
Matrix4f getViewMatrix () const
 
Matrix4f getPerspectiveMatrix () const
 
void loadAttributes () override
 
void setZoom (float zoom)
 
- 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
 
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 ()
 

Static Public Member Functions

static QGLFormat getGLFormat ()
 
- Static Public Member Functions inherited from fast::ProcessObject
static std::string getStaticNameOfClass ()
 
- Static Public Member Functions inherited from fast::Object
static std::string getStaticNameOfClass ()
 

Protected Member Functions

void getMinMaxFromBoundingBoxes (bool transform, Vector3f &min, Vector3f &max)
 
void initializeGL ()
 
void paintGL ()
 
void resizeGL (int width, int height)
 
void updateRenderersInput (int executeToken)
 
void updateRenderers ()
 
void lockRenderers ()
 
void unlockRenderers ()
 
void stopRenderers ()
 
void resetRenderers ()
 
- 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::mutex m_mutex
 
- 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
 

Friends

class ComputationThread
 

Additional Inherited Members

- Public Types inherited from fast::ProcessObject
typedef std::shared_ptr< ProcessObjectpointer
 
- Public Types inherited from fast::Object
typedef std::shared_ptr< Objectpointer
 

Constructor & Destructor Documentation

◆ ~View()

fast::View::~View ( )

◆ View()

fast::View::View ( )

Member Function Documentation

◆ addRenderer()

void fast::View::addRenderer ( Renderer::pointer  renderer)

◆ getGLFormat()

static QGLFormat fast::View::getGLFormat ( )
static

◆ getMinMaxFromBoundingBoxes()

void fast::View::getMinMaxFromBoundingBoxes ( bool  transform,
Vector3f &  min,
Vector3f &  max 
)
protected

◆ getNameOfClass()

std::string fast::View::getNameOfClass ( ) const
inlinevirtual

Implements fast::ProcessObject.

◆ getOrthoProjectionParameters()

Vector4f fast::View::getOrthoProjectionParameters ( )

◆ getPerspectiveMatrix()

Matrix4f fast::View::getPerspectiveMatrix ( ) const

◆ getRenderers()

std::vector<Renderer::pointer> fast::View::getRenderers ( )

◆ getViewMatrix()

Matrix4f fast::View::getViewMatrix ( ) const

◆ hasQuit()

bool fast::View::hasQuit ( ) const

◆ initializeGL()

void fast::View::initializeGL ( )
protected

◆ keyPressEvent()

void fast::View::keyPressEvent ( QKeyEvent *  event)

◆ loadAttributes()

void fast::View::loadAttributes ( )
overridevirtual

Reimplemented from fast::ProcessObject.

◆ lockRenderers()

void fast::View::lockRenderers ( )
protected

◆ mouseMoveEvent()

void fast::View::mouseMoveEvent ( QMouseEvent *  event)

◆ mousePressEvent()

void fast::View::mousePressEvent ( QMouseEvent *  event)

◆ mouseReleaseEvent()

void fast::View::mouseReleaseEvent ( QMouseEvent *  event)

◆ paintGL()

void fast::View::paintGL ( )
protected

◆ quit()

void fast::View::quit ( )

◆ recalculateCamera()

void fast::View::recalculateCamera ( )

◆ reinitialize()

void fast::View::reinitialize ( )

◆ removeAllRenderers()

void fast::View::removeAllRenderers ( )

◆ removeRenderer()

void fast::View::removeRenderer ( Renderer::pointer  renderer)

◆ resetRenderers()

void fast::View::resetRenderers ( )
protected

◆ resizeGL()

void fast::View::resizeGL ( int  width,
int  height 
)
protected

◆ set2DMode()

void fast::View::set2DMode ( )

◆ set3DMode()

void fast::View::set3DMode ( )

◆ setAutoUpdateCamera()

void fast::View::setAutoUpdateCamera ( bool  autoUpdate)

◆ setBackgroundColor()

void fast::View::setBackgroundColor ( Color  color)

◆ setCameraInputConnection()

void fast::View::setCameraInputConnection ( DataChannel::pointer  port)

◆ setLookAt()

void fast::View::setLookAt ( Vector3f  cameraPosition,
Vector3f  targetPosition,
Vector3f  cameraUpVector,
float  zNear = 0.1,
float  zFar = 1000 
)

◆ setMaximumFramerate()

void fast::View::setMaximumFramerate ( unsigned int  framerate)

◆ setZoom()

void fast::View::setZoom ( float  zoom)

Function for setting the zoom level of the view. Level 1 is no zooming. Level 0.5 makes images in the view half its size. Level 2 makes images in the view double in size.

◆ stopRenderers()

void fast::View::stopRenderers ( )
protected

◆ unlockRenderers()

void fast::View::unlockRenderers ( )
protected

◆ updateRenderers()

void fast::View::updateRenderers ( )
protected

◆ updateRenderersInput()

void fast::View::updateRenderersInput ( int  executeToken)
protected

◆ wheelEvent()

void fast::View::wheelEvent ( QWheelEvent *  event)

Friends And Related Function Documentation

◆ ComputationThread

Member Data Documentation

◆ m_mutex

std::mutex fast::View::m_mutex
protected

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