Go to the documentation of this file.
18 #ifndef sitkProcessObject_h
19 #define sitkProcessObject_h
36 template <
typename T,
unsigned int NVectorDimension>
96 SetDebug(
bool debugFlag);
105 GlobalDefaultDebugOn();
107 GlobalDefaultDebugOff();
112 GetGlobalDefaultDebug();
114 SetGlobalDefaultDebug(
bool debugFlag);
126 GlobalWarningDisplayOn();
128 GlobalWarningDisplayOff();
130 SetGlobalWarningDisplay(
bool flag);
132 GetGlobalWarningDisplay();
148 GetGlobalDefaultCoordinateTolerance();
150 SetGlobalDefaultCoordinateTolerance(
double);
153 GetGlobalDefaultDirectionTolerance();
155 SetGlobalDefaultDirectionTolerance(
double);
183 SetGlobalDefaultThreader(
const std::string & threader);
185 GetGlobalDefaultThreader();
202 SetGlobalDefaultNumberOfThreads(
unsigned int n);
204 GetGlobalDefaultNumberOfThreads();
222 SetNumberOfThreads(
unsigned int n);
224 GetNumberOfThreads()
const;
238 SetNumberOfWorkUnits(
unsigned int n);
240 GetNumberOfWorkUnits()
const;
357 virtual unsigned long
362 RemoveITKObserver(EventCommand & e);
375 OnActiveProcessDelete();
385 template <
class TImageType>
386 static typename TImageType::ConstPointer
389 typename TImageType::ConstPointer itkImage =
dynamic_cast<const TImageType *
>(img.
GetITKBase());
391 if (itkImage.IsNull())
395 <<
"\" to ITK image of dimension: " << TImageType::GetImageDimension() <<
" and pixel type: \""
401 template <
class TImageType>
409 template <
class TPixelType,
410 unsigned int VImageDimension,
411 unsigned int VLength,
412 template <
typename,
unsigned int>
421 return Image(out.GetPointer());
424 template <
unsigned int VImageDimension,
unsigned int VLength,
template <
unsigned int>
class TVector>
432 return Image(out.GetPointer());
444 template <
typename T>
445 static std::ostream &
451 static std::ostream &
452 ToStringHelper(std::ostream & os,
const char & v);
453 static std::ostream &
454 ToStringHelper(std::ostream & os,
const signed char & v);
455 static std::ostream &
456 ToStringHelper(std::ostream & os,
const unsigned char & v);
466 AddObserverToActiveProcessObject(EventCommand & e);
472 RemoveObserverFromActiveProcessObject(EventCommand & e);
The Image class for SimpleITK.
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
std::list< EventCommand > m_Commands
EventEnum
Events which can be observed from ProcessObject.
itk::DataObject * GetITKBase()
SITKCommon_HIDDEN itk::VectorImage< TPixelType, NImageDimension >::Pointer GetVectorImageFromImage(itk::Image< itk::Vector< TPixelType, NLength >, NImageDimension > *img, bool transferOwnership=false)
Utility methods to convert between itk image types efficiently by sharing the buffer between the inpu...
An implementation of the Command design pattern for callback.
float m_ProgressMeasurement
std::string GetPixelIDTypeAsString() const
unsigned int m_NumberOfThreads
bool operator==(const EventCommand &o) const
const std::string SITKCommon_EXPORT GetPixelIDValueAsString(PixelIDValueType type)
unsigned int GetDimension() const
static TImageType::ConstPointer CastImageToITK(const Image &img)
#define SITKCommon_EXPORT
An inheritable class to disable copying of a class.
class ITK_FORWARD_EXPORT Command
unsigned int m_NumberOfWorkUnits
itk::ProcessObject * m_ActiveProcess
static Image CastITKToImage(itk::Image< TVector< VLength >, VImageDimension > *img)
class ITK_FORWARD_EXPORT ProcessObject
Base class for SimpleITK classes based on ProcessObject.
static Image CastITKToImage(TImageType *img)
#define sitkExceptionMacro(x)
static Image CastITKToImage(itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img)
static std::ostream & ToStringHelper(std::ostream &os, const T &v)