OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WSphericalHarmonicsCoefficientsThread< T > Class Template Reference

Module for the creation of a spherical harmonic data set from raw HARDI data. More...

#include <WSphericalHarmonicsCoefficientsThread.h>

+ Inheritance diagram for WSphericalHarmonicsCoefficientsThread< T >:
+ Collaboration diagram for WSphericalHarmonicsCoefficientsThread< T >:

Public Member Functions

 WSphericalHarmonicsCoefficientsThread (WSphericalHarmonicsCoefficientsThread<>::ThreadParameter parameter, std::pair< size_t, size_t > range)
 The constructor. More...
 
void threadMain ()
 The main function of the thread. More...
 
double getError () const
 Returns the average error of the thread. More...
 
- Public Member Functions inherited from WThreadedRunner
 WThreadedRunner ()
 Default constructor. More...
 
virtual ~WThreadedRunner ()
 Destructor. More...
 
virtual void run ()
 Run thread. More...
 
void run (THREADFUNCTION f)
 Run thread. More...
 
void wait (bool requestFinish=false)
 Wait for the thread to be finished. More...
 
virtual void requestStop ()
 This method's purpose is to request a stop without waiting for it. More...
 
virtual boost::signals2::connection subscribeSignal (THREAD_SIGNAL signal, t_ThreadErrorSignalHandlerType notifier)
 Connects a specified notify function with a signal this thread instance is offering. More...
 
const WBoolFlagisCrashed () const
 Checks whether this thread has been crashed. More...
 
const std::string & getCrashMessage () const
 Get the message of the exception finally causing the crash. More...
 
void setThreadName (std::string name)
 Set the name of the thread. More...
 
std::string getThreadName () const
 Returns the current thread name. More...
 

Private Attributes

double m_overallError
 accumulated error More...
 
unsigned int m_errorCount
 number of accumulated errors, necessary for average error calculation More...
 
WSphericalHarmonicsCoefficientsThread ::ThreadParameter m_parameter
 collection of parameter and so on (description in more detail above) More...
 
std::pair< size_t, size_t > m_range
 the range (start and end) of input data this thread use More...
 

Additional Inherited Members

- Public Types inherited from WThreadedRunner
typedef std::shared_ptr< WThreadedRunnerSPtr
 Abbreviation to a shared_ptr to this type. More...
 
typedef std::shared_ptr< const WThreadedRunnerConstSPtr
 Abbreviation to a const shared_ptr to this type. More...
 
typedef boost::function< void(void) > THREADFUNCTION
 Type used for simple thread functions. More...
 
- Static Public Member Functions inherited from WThreadedRunner
static void setThisThreadName (std::string name)
 Static function to set the name of the calling thread. More...
 
- Protected Member Functions inherited from WThreadedRunner
virtual void notifyStop ()
 Gets called when the thread should be stopped. More...
 
void yield () const
 Give remaining execution timeslice to another thread. More...
 
void sleep (const int32_t t) const
 Sets thread asleep. More...
 
void msleep (const int32_t t) const
 Sets thread asleep. More...
 
void waitForStop ()
 Let the thread sleep until a stop request was given. More...
 
virtual void onThreadException (const WException &e)
 This method is called if an exception was caught, which came from the custom thread code. More...
 
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. More...
 
- Protected Attributes inherited from WThreadedRunner
boost::thread m_thread
 Thread instance. More...
 
WBoolFlag m_shutdownFlag
 Condition getting fired whenever the thread should quit. More...
 
WBoolFlag m_isCrashed
 True whenever an exception is thrown during threadMain. More...
 
std::string m_crashMessage
 The crash message. More...
 

Detailed Description

template<typename T>
class WSphericalHarmonicsCoefficientsThread< T >

Module for the creation of a spherical harmonic data set from raw HARDI data.

Definition at line 176 of file WSphericalHarmonicsCoefficientsThread.h.

Constructor & Destructor Documentation

◆ WSphericalHarmonicsCoefficientsThread()

template<typename T >
WSphericalHarmonicsCoefficientsThread< T >::WSphericalHarmonicsCoefficientsThread ( WSphericalHarmonicsCoefficientsThread<>::ThreadParameter  parameter,
std::pair< size_t, size_t >  range 
)

The constructor.

Parameters
parametercollection of parameter and so on (description in more detail above)
rangethe range (start and end) of input data this thread should use

Definition at line 206 of file WSphericalHarmonicsCoefficientsThread.h.

Member Function Documentation

◆ getError()

template<typename T >
double WSphericalHarmonicsCoefficientsThread< T >::getError

Returns the average error of the thread.

Returns
error measure

Definition at line 336 of file WSphericalHarmonicsCoefficientsThread.h.

◆ threadMain()

template<typename T >
void WSphericalHarmonicsCoefficientsThread< T >::threadMain
virtual

The main function of the thread.

Here the calculation of the spherical harmonics coefficients is done.

Reimplemented from WThreadedRunner.

Definition at line 215 of file WSphericalHarmonicsCoefficientsThread.h.

References WSymmetricSphericalHarmonic< T >::getValue().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_errorCount

template<typename T >
unsigned int WSphericalHarmonicsCoefficientsThread< T >::m_errorCount
private

number of accumulated errors, necessary for average error calculation

Definition at line 200 of file WSphericalHarmonicsCoefficientsThread.h.

◆ m_overallError

template<typename T >
double WSphericalHarmonicsCoefficientsThread< T >::m_overallError
private

accumulated error

Definition at line 199 of file WSphericalHarmonicsCoefficientsThread.h.

◆ m_parameter

template<typename T >
WSphericalHarmonicsCoefficientsThread ::ThreadParameter WSphericalHarmonicsCoefficientsThread< T >::m_parameter
private

collection of parameter and so on (description in more detail above)

Definition at line 201 of file WSphericalHarmonicsCoefficientsThread.h.

◆ m_range

template<typename T >
std::pair< size_t, size_t > WSphericalHarmonicsCoefficientsThread< T >::m_range
private

the range (start and end) of input data this thread use

Definition at line 202 of file WSphericalHarmonicsCoefficientsThread.h.


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