OpenWalnut
1.4.0
|
Thread for computing directional color coding of fibers. More...
#include <WCreateColorArraysThread.h>
Public Member Functions | |
WCreateColorArraysThread (int left, int right, boost::shared_ptr< std::vector< float > >vertices, boost::shared_ptr< std::vector< size_t > > lineLengths, boost::shared_ptr< std::vector< float > > globalColors, boost::shared_ptr< std::vector< float > > localColors, boost::shared_ptr< std::vector< float > > tangents) | |
default constructor | |
virtual | ~WCreateColorArraysThread () |
destructor | |
virtual void | threadMain () |
entry for the run command | |
bool | isFinished () |
Return the value of the finished flag. | |
![]() | |
WThreadedRunner () | |
Default constructor. | |
virtual | ~WThreadedRunner () |
Destructor. | |
virtual void | run () |
Run thread. | |
void | run (THREADFUNCTION f) |
Run thread. | |
void | wait (bool requestFinish=false) |
Wait for the thread to be finished. | |
virtual void | requestStop () |
This method's purpose is to request a stop without waiting for it. | |
virtual boost::signals2::connection | subscribeSignal (THREAD_SIGNAL signal, t_ThreadErrorSignalHandlerType notifier) |
Connects a specified notify function with a signal this thread instance is offering. | |
const WBoolFlag & | isCrashed () const |
Checks whether this thread has been crashed. | |
const std::string & | getCrashMessage () const |
Get the message of the exception finally causing the crash. | |
void | setThreadName (std::string name) |
Set the name of the thread. | |
std::string | getThreadName () const |
Returns the current thread name. |
Private Attributes | |
bool | m_myThreadFinished |
Has the thread finished? | |
int | m_left |
left boundary | |
int | m_right |
right boundary | |
boost::shared_ptr< const std::vector< float > > | m_vertices |
Point vector for all fibers. | |
boost::shared_ptr< std::vector < float > > | m_tangents |
Point vector for tangents at each vertex, used for fake tubes. | |
boost::shared_ptr< std::vector < float > > | m_globalColors |
Storing the global color value of the fibers for each point. | |
boost::shared_ptr< std::vector < float > > | m_localColors |
Storing the local color value of the fibers for each point. | |
boost::shared_ptr< const std::vector< size_t > > | m_lineLengths |
Line vector that contains the number of vertices for each line. |
Additional Inherited Members | |
![]() | |
typedef boost::function< void(void) > | THREADFUNCTION |
Type used for simple thread functions. | |
![]() | |
static void | setThisThreadName (std::string name) |
Static function to set the name of the calling thread. | |
![]() | |
virtual void | notifyStop () |
Gets called when the thread should be stopped. | |
void | yield () const |
Give remaining execution timeslice to another thread. | |
void | sleep (const int32_t t) const |
Sets thread asleep. | |
void | msleep (const int32_t t) const |
Sets thread asleep. | |
void | waitForStop () |
Let the thread sleep until a stop request was given. | |
virtual void | onThreadException (const WException &e) |
This method is called if an exception was caught, which came from the custom thread code. | |
void | handleDeadlyException (const WException &e, std::string sender="WThreadedRunner") |
Handle the specified exception which was not caught in the thread, which basically means the thread has crashed. | |
![]() | |
boost::thread | m_thread |
Thread instance. | |
WBoolFlag | m_shutdownFlag |
Condition getting fired whenever the thread should quit. | |
WBoolFlag | m_isCrashed |
True whenever an exception is thrown during threadMain. | |
std::string | m_crashMessage |
The crash message. |
Thread for computing directional color coding of fibers.
Definition at line 35 of file WCreateColorArraysThread.h.
WCreateColorArraysThread::WCreateColorArraysThread | ( | int | left, |
int | right, | ||
boost::shared_ptr< std::vector< float > > | vertices, | ||
boost::shared_ptr< std::vector< size_t > > | lineLengths, | ||
boost::shared_ptr< std::vector< float > > | globalColors, | ||
boost::shared_ptr< std::vector< float > > | localColors, | ||
boost::shared_ptr< std::vector< float > > | tangents | ||
) |
default constructor
left | start position of the first line to comput colors for |
right | last line for which the color is computed |
vertices | vertices of all lines |
lineLengths | line length in vertex array |
globalColors | where to write global coloring |
localColors | where to write local coloring |
tangents |
Definition at line 31 of file WCreateColorArraysThread.cpp.
|
virtual |
destructor
Definition at line 48 of file WCreateColorArraysThread.cpp.
|
inline |
Return the value of the finished flag.
Definition at line 138 of file WCreateColorArraysThread.cpp.
References m_myThreadFinished.
|
virtual |
entry for the run command
Reimplemented from WThreadedRunner.
Definition at line 52 of file WCreateColorArraysThread.cpp.
References m_globalColors, m_left, m_lineLengths, m_localColors, m_myThreadFinished, m_right, m_tangents, and m_vertices.
|
private |
Storing the global color value of the fibers for each point.
Definition at line 93 of file WCreateColorArraysThread.h.
Referenced by threadMain().
|
private |
|
private |
Line vector that contains the number of vertices for each line.
Definition at line 104 of file WCreateColorArraysThread.h.
Referenced by threadMain().
|
private |
Storing the local color value of the fibers for each point.
Definition at line 99 of file WCreateColorArraysThread.h.
Referenced by threadMain().
|
private |
Has the thread finished?
Definition at line 74 of file WCreateColorArraysThread.h.
Referenced by isFinished(), and threadMain().
|
private |
right boundary
Definition at line 78 of file WCreateColorArraysThread.h.
Referenced by threadMain().
|
private |
Point vector for tangents at each vertex, used for fake tubes.
Definition at line 88 of file WCreateColorArraysThread.h.
Referenced by threadMain().
|
private |
Point vector for all fibers.
Definition at line 83 of file WCreateColorArraysThread.h.
Referenced by threadMain().