18 #ifndef sitkProcessObject_h
19 #define sitkProcessObject_h
35 template<
typename T,
unsigned int NVectorDimension >
class Vector;
69 virtual std::string ToString()
const;
72 virtual std::string GetName()
const = 0;
80 virtual void DebugOn();
81 virtual void DebugOff();
87 virtual bool GetDebug()
const;
88 virtual void SetDebug(
bool debugFlag);
96 static void GlobalDefaultDebugOn();
97 static void GlobalDefaultDebugOff();
101 static bool GetGlobalDefaultDebug();
102 static void SetGlobalDefaultDebug(
bool debugFlag);
113 static void GlobalWarningDisplayOn();
114 static void GlobalWarningDisplayOff();
115 static void SetGlobalWarningDisplay(
bool flag);
116 static bool GetGlobalWarningDisplay();
131 static double GetGlobalDefaultCoordinateTolerance();
132 static void SetGlobalDefaultCoordinateTolerance(
double );
134 static double GetGlobalDefaultDirectionTolerance();
135 static void SetGlobalDefaultDirectionTolerance(
double);
162 static bool SetGlobalDefaultThreader(
const std::string &threader);
163 static std::string GetGlobalDefaultThreader();
179 static void SetGlobalDefaultNumberOfThreads(
unsigned int n);
180 static unsigned int GetGlobalDefaultNumberOfThreads();
197 virtual void SetNumberOfThreads(
unsigned int n);
198 virtual unsigned int GetNumberOfThreads()
const;
211 virtual void SetNumberOfWorkUnits(
unsigned int n);
212 virtual unsigned int GetNumberOfWorkUnits()
const;
258 virtual void RemoveAllCommands();
273 virtual float GetProgress( )
const;
290 virtual void Abort();
299 : m_Event(e), m_Command(c), m_ITKTag(std::numeric_limits<unsigned long>::max())
322 virtual void RemoveITKObserver( EventCommand &e );
332 virtual void OnActiveProcessDelete( );
341 template<
class TImageType >
344 typename TImageType::ConstPointer itkImage =
345 dynamic_cast < const TImageType*
> ( img.
GetITKBase() );
347 if ( itkImage.IsNull() )
352 << TImageType::GetImageDimension() <<
" and pixel type: \""
359 template<
class TImageType >
366 template<
class TPixelType,
unsigned int VImageDimension,
unsigned int VLength,
367 template<
typename,
unsigned int>
class TVector >
374 return Image(out.GetPointer());
385 template <
typename T>
391 static std::ostream & ToStringHelper(std::ostream &os,
const char &v);
392 static std::ostream & ToStringHelper(std::ostream &os,
const signed char &v);
393 static std::ostream & ToStringHelper(std::ostream &os,
const unsigned char &v);
403 unsigned long AddObserverToActiveProcessObject( EventCommand &e );
408 void RemoveObserverFromActiveProcessObject( EventCommand &e );