Go to the source code of this file.
Classes | |
class | itk::OStringStream |
Namespaces | |
namespace | itk |
Defines | |
#define | ITK_EMPTY |
#define | ITK_EXPORT_ITKCommon(c, x, n) ITK_EXPORT_TEMPLATE(ITKCommon_EXPORT, c, x, n) |
#define | ITK_EXPORT_TEMPLATE(EXPORT, c, x, y) ITK_TEMPLATE_##c(ITK_TEMPLATE_EXPORT, EXPORT ITK_EMPTY, x, y) |
#define | ITK_IMPORT_ITKCommon(c, x, n) ITK_IMPORT_TEMPLATE(ITKCommon_EXPORT, c, x, n) |
#define | ITK_IMPORT_TEMPLATE(EXPORT, c, x, y) ITK_TEMPLATE_##c(ITK_TEMPLATE_IMPORT, EXPORT ITK_EMPTY, x, y) |
#define | ITK_LOCATION "unknown" |
#define | ITK_NO_RETURN |
#define | ITK_TEMPLATE_1(x1) x1 |
#define | ITK_TEMPLATE_2(x1, x2) x1,x2 |
#define | ITK_TEMPLATE_3(x1, x2, x3) x1,x2,x3 |
#define | ITK_TEMPLATE_4(x1, x2, x3, x4) x1,x2,x3,x4 |
#define | ITK_TEMPLATE_5(x1, x2, x3, x4, x5) x1,x2,x3,x4,x5 |
#define | ITK_TEMPLATE_6(x1, x2, x3, x4, x5, x6) x1,x2,x3,x4,x5,x6 |
#define | ITK_TEMPLATE_7(x1, x2, x3, x4, x5, x6, x7) x1,x2,x3,x4,x5,x6,x7 |
#define | ITK_TEMPLATE_8(x1, x2, x3, x4, x5, x6, x7, x8) x1,x2,x3,x4,x5,x6,x7,x8 |
#define | ITK_TEMPLATE_9(x1, x2, x3, x4, x5, x6, x7, x8, x9) x1,x2,x3,x4,x5,x6,x7,x8,x9 |
#define | ITK_TEMPLATE_DO_NOT_INSTANTIATE 0 |
#define | ITK_TEMPLATE_EXPLICIT 0 |
#define | ITK_TEMPLATE_EXPORT(x) ITK_TEMPLATE_EXPORT_DELAY(x) |
#define | ITK_TEMPLATE_EXPORT_DELAY(x) template ITK_TEMPLATE_##x; |
#define | ITK_TEMPLATE_EXTERN 0 |
#define | ITK_TEMPLATE_IMPORT(x) |
#define | ITK_TEMPLATE_IMPORT_WORKS 0 |
#define | ITK_TEMPLATE_TXX !(ITK_TEMPLATE_CXX || ITK_TEMPLATE_TYPE) |
#define | itkAssertInDebugOrThrowInReleaseMacro(msg) itkGenericExceptionMacro( << msg ); |
#define | itkAssertOrThrowMacro(test, message) |
#define | itkGenericExceptionMacro(x) |
#define | itkGenericLegacyBodyMacro(method, version) itkGenericOutputMacro(#method " was deprecated for ITK " #version " and will be removed in a future version.") |
#define | itkGenericLegacyReplaceBodyMacro(method, version, replace) itkGenericOutputMacro(#method " was deprecated for ITK " #version " and will be removed in a future version. Use " #replace " instead.") |
#define | itkGenericOutputMacro(x) |
#define | itkGetStaticConstMacro(name) (Self::name) |
#define | itkGetStringMacro(name) |
#define | itkGetVectorMacro(name, type, count) |
#define | itkLegacyBodyMacro(method, version) itkWarningMacro(#method " was deprecated for ITK " #version " and will be removed in a future version.") |
#define | itkLegacyMacro(method) method |
#define | itkLegacyReplaceBodyMacro(method, version, replace) itkWarningMacro(#method " was deprecated for ITK " #version " and will be removed in a future version. Use " #replace " instead.") |
#define | itkLogMacro(x, y) |
#define | itkLogMacroStatic(obj, x, y) |
#define | itkNotUsed(x) |
#define | itkStaticConstMacro(name, type, value) static const type name = value |
#define | itkSuperclassTraitMacro(traitnameType) typedef typename Superclass::traitnameType traitnameType; |
#define | itkTypeMacro(thisClass, superclass) |
#define | itkBooleanMacro(name) |
#define | itkDebugMacro(x) |
#define | itkExceptionMacro(x) |
#define | itkFactorylessNewMacro(x) |
#define | itkGetConstMacro(name, type) |
#define | itkGetConstObjectMacro(name, type) |
#define | itkGetConstReferenceMacro(name, type) |
#define | itkGetConstReferenceObjectMacro(name, type) |
#define | itkGetEnumMacro(name, type) |
#define | itkGetInputMacro(name, type, number) |
#define | itkGetMacro(name, type) |
#define | itkGetObjectMacro(name, type) |
#define | itkNewMacro(x) |
#define | itkSetClampMacro(name, type, min, max) |
#define | itkSetConstObjectMacro(name, type) |
#define | itkSetDecoratedInputMacro(name, type, number) |
#define | itkSetDecoratedObjectInputMacro(name, type, number) |
#define | itkSetEnumMacro(name, type) |
#define | itkSetInputMacro(name, type, number) |
#define | itkSetMacro(name, type) |
#define | itkSetObjectMacro(name, type) |
#define | itkSetStringMacro(name) |
#define | itkSetVectorMacro(name, type, count) |
#define | itkWarningMacro(x) |
Functions | |
ITKCommon_EXPORT void | itk::OutputWindowDisplayDebugText (const char *) |
ITKCommon_EXPORT void | itk::OutputWindowDisplayErrorText (const char *) |
ITKCommon_EXPORT void | itk::OutputWindowDisplayGenericOutputText (const char *) |
ITKCommon_EXPORT void | itk::OutputWindowDisplayText (const char *) |
ITKCommon_EXPORT void | itk::OutputWindowDisplayWarningText (const char *) |
#define ITK_EMPTY |
Definition at line 910 of file itkMacro.h.
#define ITK_EXPORT_ITKCommon | ( | c, | |||
x, | |||||
n | ) | ITK_EXPORT_TEMPLATE(ITKCommon_EXPORT, c, x, n) |
Definition at line 957 of file itkMacro.h.
#define ITK_EXPORT_TEMPLATE | ( | EXPORT, | |||
c, | |||||
x, | |||||
y | ) | ITK_TEMPLATE_##c(ITK_TEMPLATE_EXPORT, EXPORT ITK_EMPTY, x, y) |
Definition at line 906 of file itkMacro.h.
#define ITK_IMPORT_ITKCommon | ( | c, | |||
x, | |||||
n | ) | ITK_IMPORT_TEMPLATE(ITKCommon_EXPORT, c, x, n) |
Definition at line 959 of file itkMacro.h.
#define ITK_IMPORT_TEMPLATE | ( | EXPORT, | |||
c, | |||||
x, | |||||
y | ) | ITK_TEMPLATE_##c(ITK_TEMPLATE_IMPORT, EXPORT ITK_EMPTY, x, y) |
Definition at line 908 of file itkMacro.h.
#define ITK_LOCATION "unknown" |
Definition at line 610 of file itkMacro.h.
#define ITK_NO_RETURN |
Definition at line 994 of file itkMacro.h.
#define ITK_TEMPLATE_1 | ( | x1 | ) | x1 |
Definition at line 916 of file itkMacro.h.
#define ITK_TEMPLATE_2 | ( | x1, | |||
x2 | ) | x1,x2 |
Definition at line 917 of file itkMacro.h.
#define ITK_TEMPLATE_3 | ( | x1, | |||
x2, | |||||
x3 | ) | x1,x2,x3 |
Definition at line 918 of file itkMacro.h.
#define ITK_TEMPLATE_4 | ( | x1, | |||
x2, | |||||
x3, | |||||
x4 | ) | x1,x2,x3,x4 |
Definition at line 919 of file itkMacro.h.
#define ITK_TEMPLATE_5 | ( | x1, | |||
x2, | |||||
x3, | |||||
x4, | |||||
x5 | ) | x1,x2,x3,x4,x5 |
Definition at line 920 of file itkMacro.h.
#define ITK_TEMPLATE_6 | ( | x1, | |||
x2, | |||||
x3, | |||||
x4, | |||||
x5, | |||||
x6 | ) | x1,x2,x3,x4,x5,x6 |
Definition at line 921 of file itkMacro.h.
#define ITK_TEMPLATE_7 | ( | x1, | |||
x2, | |||||
x3, | |||||
x4, | |||||
x5, | |||||
x6, | |||||
x7 | ) | x1,x2,x3,x4,x5,x6,x7 |
Definition at line 922 of file itkMacro.h.
#define ITK_TEMPLATE_8 | ( | x1, | |||
x2, | |||||
x3, | |||||
x4, | |||||
x5, | |||||
x6, | |||||
x7, | |||||
x8 | ) | x1,x2,x3,x4,x5,x6,x7,x8 |
Definition at line 923 of file itkMacro.h.
#define ITK_TEMPLATE_9 | ( | x1, | |||
x2, | |||||
x3, | |||||
x4, | |||||
x5, | |||||
x6, | |||||
x7, | |||||
x8, | |||||
x9 | ) | x1,x2,x3,x4,x5,x6,x7,x8,x9 |
Definition at line 924 of file itkMacro.h.
#define ITK_TEMPLATE_DO_NOT_INSTANTIATE 0 |
Definition at line 808 of file itkMacro.h.
#define ITK_TEMPLATE_EXPLICIT 0 |
Definition at line 978 of file itkMacro.h.
#define ITK_TEMPLATE_EXPORT | ( | x | ) | ITK_TEMPLATE_EXPORT_DELAY(x) |
Definition at line 821 of file itkMacro.h.
#define ITK_TEMPLATE_EXPORT_DELAY | ( | x | ) | template ITK_TEMPLATE_##x; |
Definition at line 822 of file itkMacro.h.
#define ITK_TEMPLATE_EXTERN 0 |
Definition at line 811 of file itkMacro.h.
#define ITK_TEMPLATE_IMPORT | ( | x | ) |
Definition at line 846 of file itkMacro.h.
#define ITK_TEMPLATE_IMPORT_WORKS 0 |
Definition at line 847 of file itkMacro.h.
#define ITK_TEMPLATE_TXX !(ITK_TEMPLATE_CXX || ITK_TEMPLATE_TYPE) |
Definition at line 937 of file itkMacro.h.
#define itkAssertInDebugOrThrowInReleaseMacro | ( | msg | ) | itkGenericExceptionMacro( << msg ); |
Definition at line 1039 of file itkMacro.h.
#define itkAssertOrThrowMacro | ( | test, | |||
message | ) |
if( !(test) ) \ { \ ::itk::OStringStream msgstr; \ msgstr << message; \ itkAssertInDebugOrThrowInReleaseMacro( msgstr.str().c_str() ); \ }
Definition at line 1046 of file itkMacro.h.
Referenced by itk::PriorityQueueContainer< TElementWrapper, TElementWrapperInterface, TElementPriority, TElementIdentifier >::DeleteElement(), itk::QuadEdgeMeshCleanFilter< TInput, TOutput >::GenerateData(), itk::RankHistogramMap< TInputPixel, TCompare >::GetValue(), itk::ImageConstIterator< ImageType >::ImageConstIterator(), itk::PriorityQueueContainer< TElementWrapper, TElementWrapperInterface, TElementPriority, TElementIdentifier >::Peek(), itk::RankHistogramVec< TInputPixel, TCompare >::RemovePixel(), itk::MaskedRankHistogramVec< TInputPixel, TCompare >::RemovePixel(), and itk::PriorityQueueContainer< TElementWrapper, TElementWrapperInterface, TElementPriority, TElementIdentifier >::Update().
#define itkBooleanMacro | ( | name | ) |
virtual void name##On () { this->Set##name(true);} \ virtual void name##Off () { this->Set##name(false);}
Create members "name"On() and "name"Off() (e.g., DebugOn() DebugOff()). Set method must be defined to use this macro.
Definition at line 390 of file itkMacro.h.
#define itkDebugMacro | ( | x | ) |
{ if (this->GetDebug() && ::itk::Object::GetGlobalWarningDisplay()) \ { ::itk::OStringStream itkmsg; \ itkmsg << "Debug: In " __FILE__ ", line " << __LINE__ << "\n" \ << this->GetNameOfClass() << " (" << this << "): " x \ << "\n\n"; \ ::itk::OutputWindowDisplayDebugText(itkmsg.str().c_str());} \ }
This macro is used to print debug (or other information). They are also used to catch errors, etc. Example usage looks like: itkDebugMacro(<< "this is debug info" << this->SomeVariable);
Definition at line 517 of file itkMacro.h.
Referenced by itk::QuadEdgeMeshEulerOperatorSplitEdgeFunction< TMesh, TQEType >::Evaluate(), and itk::ActiveShapeModelCalculator< TImage >::PrintSelf().
#define itkExceptionMacro | ( | x | ) |
{ \ ::itk::OStringStream message; \ message << "itk::ERROR: " << this->GetNameOfClass() \ << "(" << this << "): " x; \ ::itk::ExceptionObject e_(__FILE__, __LINE__, message.str().c_str(),ITK_LOCATION); \ throw e_; /* Explicit naming to work around Intel compiler bug. */ \ }
The exception macro is used to print error information (i.e., usually a condition that results in program failure). Example usage looks like: itkExceptionMacro(<< "this is error info" << this->SomeVariable);
Definition at line 618 of file itkMacro.h.
Referenced by itk::VectorIndexSelectionCastImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), itk::SimpleFilterWatcher::EndFilter(), itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::EvaluateAtNeighborhood3D(), itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >::GetDerivative(), itk::Transform< TScalarType, 3, 2 >::GetFixedParameters(), itk::DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType, TGradientImagePixelType, TTensorPixelType >::GetGradientDirection(), itk::Transform< TScalarType, 3, 2 >::GetJacobian(), itk::MultiphaseFiniteDifferenceImageFilter< TInputImage, TFeatureImage, TOutputImage, TFunction, unsigned int >::GetLevelSet(), itk::Transform< TScalarType, 3, 2 >::GetParameters(), itk::LabelPerimeterEstimationCalculator< TInputImage >::GetPerimeter(), itk::STAPLEImageFilter< TInputImage, TOutputImage >::GetSensitivity(), itk::STAPLEImageFilter< TInputImage, TOutputImage >::GetSpecificity(), itk::Statistics::NeighborhoodSampler< TSample >::SetCenter(), itk::Transform< TScalarType, 3, 2 >::SetFixedParameters(), itk::Statistics::ListSampleToHistogramGenerator< TListSample, THistogramMeasurement, TFrequencyContainer, TMeasurementVectorLength >::SetHistogramMax(), itk::Statistics::ListSampleToHistogramGenerator< TListSample, THistogramMeasurement, TFrequencyContainer, TMeasurementVectorLength >::SetHistogramMin(), itk::WatershedImageFilter< TInputImage >::SetInput(), itk::Statistics::ListSampleToHistogramGenerator< TListSample, THistogramMeasurement, TFrequencyContainer, TMeasurementVectorLength >::SetListSample(), itk::GaussianOperator< TPixel, VDimension, TAllocator >::SetMaximumError(), itk::Statistics::ScalarImageToListAdaptor< TImage >::SetMeasurementVectorSize(), itk::Statistics::Sample< ImageJointDomainTraits< TImage >::MeasurementVectorType >::SetMeasurementVectorSize(), itk::Statistics::PointSetToListAdaptor< TPointSet >::SetMeasurementVectorSize(), itk::Statistics::MembershipFunctionBase< TMeasurementVector >::SetMeasurementVectorSize(), itk::Statistics::JointDomainImageToListAdaptor< TImage >::SetMeasurementVectorSize(), itk::Statistics::ImageToListGenerator< TImage, TMaskImage >::SetMeasurementVectorSize(), itk::Statistics::ImageToListAdaptor< TImage, FixedArray< TImage::PixelType, 1 > >::SetMeasurementVectorSize(), itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >::SetMeasurementVectorSize(), itk::Statistics::DistanceMetric< ParameterType >::SetMeasurementVectorSize(), itk::Transform< TScalarType, 3, 2 >::SetParameters(), itk::DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType, TGradientImagePixelType, TTensorPixelType >::SetReferenceImage(), itk::LBFGSBOptimizer::SetScales(), itk::BSplineDeformableTransform< TScalarType, NDimensions, VSplineOrder >::TransformCovariantVector(), and itk::BSplineDeformableTransform< TScalarType, NDimensions, VSplineOrder >::TransformVector().
#define itkFactorylessNewMacro | ( | x | ) |
static Pointer New(void) \ { \ Pointer smartPtr; \ x *rawPtr = new x; \ smartPtr = rawPtr; \ rawPtr->UnRegister(); \ return smartPtr; \ } \ virtual ::itk::LightObject::Pointer CreateAnother(void) const \ { \ ::itk::LightObject::Pointer smartPtr; \ smartPtr = x::New().GetPointer(); \ return smartPtr; \ }
Define two object creation methods. The first method, New(), creates an object from a class but does not defer to a factory. The second method, CreateAnother(), creates an object from an instance, again without deferring to a factory. This second method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
These creation methods first try asking the object factory to create an instance, and then default to the standard "new" operator if the factory fails.
These routines assigns the raw pointer to a smart pointer and then call UnRegister() on the rawPtr to compensate for LightObject's constructor initializing an object's reference count to 1 (needed for proper initialization of process objects and data objects cycles).
Definition at line 471 of file itkMacro.h.
#define itkGenericExceptionMacro | ( | x | ) |
{ \ ::itk::OStringStream message; \ message << "itk::ERROR: " x; \ ::itk::ExceptionObject e_(__FILE__, __LINE__, message.str().c_str(),ITK_LOCATION); \ throw e_; /* Explicit naming to work around Intel compiler bug. */ \ }
Definition at line 628 of file itkMacro.h.
Referenced by itk::Statistics::MeasurementVectorTraits::Assert(), itk::MeasurementVectorTraits::Assert(), itk::Matrix< double, itkGetStaticConstMacro(InputDimension), itkGetStaticConstMacro(InputDimension)>::GetInverse(), itk::Statistics::ListSampleBase< ImageJointDomainTraits< TImage >::MeasurementVectorType >::Search(), itk::Functor::DivideByConstant< TInputImage::PixelType, TConstant, TOutputImage::PixelType >::SetConstant(), itk::ImageLinearConstIteratorWithIndex< TImageType >::SetDirection(), itk::RegularizedHeavisideStepFunction< TInput, TOutput >::SetEpsilon(), itk::Statistics::MeasurementVectorTraits::SetLength(), and itk::MeasurementVectorTraits::SetLength().
#define itkGenericLegacyBodyMacro | ( | method, | |||
version | ) | itkGenericOutputMacro(#method " was deprecated for ITK " #version " and will be removed in a future version.") |
Definition at line 736 of file itkMacro.h.
#define itkGenericLegacyReplaceBodyMacro | ( | method, | |||
version, | |||||
replace | ) | itkGenericOutputMacro(#method " was deprecated for ITK " #version " and will be removed in a future version. Use " #replace " instead.") |
Definition at line 738 of file itkMacro.h.
#define itkGenericOutputMacro | ( | x | ) |
{ if (::itk::Object::GetGlobalWarningDisplay()) \ { ::itk::OStringStream itkmsg; \ itkmsg << "WARNING: In " __FILE__ ", line " << __LINE__ << "\n" \ x << "\n\n"; \ ::itk::OutputWindowDisplayGenericOutputText(itkmsg.str().c_str());} \ }
Definition at line 639 of file itkMacro.h.
#define itkGetConstMacro | ( | name, | |||
type | ) |
virtual type Get##name () const \ { \ itkDebugMacro("returning " << #name " of " << this->m_##name ); \ return this->m_##name; \ }
Get built-in type. Creates member Get"name"() (e.g., GetVisibility()); This is the "const" form of the itkGetMacro. It should be used unless the member can be changed through the "Get" access routine.
Definition at line 229 of file itkMacro.h.
#define itkGetConstObjectMacro | ( | name, | |||
type | ) |
virtual const type * Get##name () const \ { \ itkDebugMacro("returning " #name " address " << this->m_##name ); \ return this->m_##name.GetPointer(); \ }
Get a smart const pointer to an object. Creates the member Get"name"() (e.g., GetPoints()).
Definition at line 370 of file itkMacro.h.
#define itkGetConstReferenceMacro | ( | name, | |||
type | ) |
virtual const type & Get##name () const \ { \ itkDebugMacro("returning " << #name " of " << this->m_##name ); \ return this->m_##name; \ }
Get built-in type. Creates member Get"name"() (e.g., GetVisibility()); This is the "const" form of the itkGetMacro. It should be used unless the member can be changed through the "Get" access routine. This versions returns a const reference to the variable.
Definition at line 241 of file itkMacro.h.
#define itkGetConstReferenceObjectMacro | ( | name, | |||
type | ) |
virtual const typename type::Pointer & Get##name () const \ { \ itkDebugMacro("returning " #name " address " << this->m_##name ); \ return this->m_##name; \ }
Get a const reference to a smart pointer to an object. Creates the member Get"name"() (e.g., GetPoints()).
Definition at line 380 of file itkMacro.h.
#define itkGetEnumMacro | ( | name, | |||
type | ) |
virtual type Get##name () const \ { \ itkDebugMacro("returning " << #name " of " << static_cast<long>(this->m_##name) ); \ return this->m_##name; \ }
Get built-in type. Creates member Get"name"() (e.g., GetVisibility()); This should be use when the type is an enum. It is use to avoid warnings on some compilers with non specified enum types passed to itkDebugMacro.
Definition at line 269 of file itkMacro.h.
#define itkGetInputMacro | ( | name, | |||
type, | |||||
number | ) |
virtual const type * Get##name##Input() const \ { \ itkDebugMacro("returning input " << #name " of " << static_cast<const type *>(this->ProcessObject::GetInput( number )) ); \ return static_cast<const type *>(this->ProcessObject::GetInput( number )); \ } \ virtual const type * GetInput##number() const \ { \ itkDebugMacro("returning input " << #number " of " << static_cast<const type *>(this->ProcessObject::GetInput( number )) ); \ return static_cast<const type *>(this->ProcessObject::GetInput( number )); \ }
Get an input. This defines the Get"name"Input() method
Definition at line 145 of file itkMacro.h.
#define itkGetMacro | ( | name, | |||
type | ) |
virtual type Get##name () \ { \ itkDebugMacro("returning " << #name " of " << this->m_##name ); \ return this->m_##name; \ }
Get built-in type. Creates member Get"name"() (e.g., GetVisibility());
Definition at line 218 of file itkMacro.h.
#define itkGetObjectMacro | ( | name, | |||
type | ) |
virtual type * Get##name () \ { \ itkDebugMacro("returning " #name " address " << this->m_##name ); \ return this->m_##name.GetPointer(); \ }
Get a smart pointer to an object. Creates the member Get"name"() (e.g., GetPoints()).
Definition at line 343 of file itkMacro.h.
#define itkGetStaticConstMacro | ( | name | ) | (Self::name) |
Definition at line 115 of file itkMacro.h.
Referenced by itk::SparseFieldFourthOrderLevelSetImageFilter< TInputImage, TOutputImage >::GetMinimumNumberOfLayers(), itk::SymmetricSecondRankTensor< TComponent, 3 >::GetNumberOfComponents(), itk::HexahedronCell< TCellInterface >::HexahedronCell(), itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelGeometry::LabelGeometry(), itk::LabelStatisticsImageFilter< TInputImage, TLabelImage >::LabelStatistics::LabelStatistics(), itk::LineCell< TCellInterface >::LineCell(), itk::QuadraticEdgeCell< TCellInterface >::QuadraticEdgeCell(), itk::QuadraticTriangleCell< TCellInterface >::QuadraticTriangleCell(), itk::QuadrilateralCell< TCellInterface >::QuadrilateralCell(), itk::TetrahedronCell< TCellInterface >::TetrahedronCell(), and itk::VertexCell< TCellInterface >::VertexCell().
#define itkGetStringMacro | ( | name | ) |
virtual const char* Get##name () const \ { \ return this->m_##name.c_str(); \ }
Get character string. Creates member Get"name"() (e.g., SetFilename(char *)). The macro assumes that the class member (name) is declared as a type std::string.
Definition at line 304 of file itkMacro.h.
#define itkGetVectorMacro | ( | name, | |||
type, | |||||
count | ) |
virtual type *Get##name () const \ { \ return this->m_##name; \ }
Get vector macro. Returns pointer to type (i.e., array of type). This is for efficiency.
Definition at line 413 of file itkMacro.h.
#define itkLegacyBodyMacro | ( | method, | |||
version | ) | itkWarningMacro(#method " was deprecated for ITK " #version " and will be removed in a future version.") |
Definition at line 732 of file itkMacro.h.
Referenced by itk::GrayscaleErodeImageFilter< TInputImage, TOutputImage, TKernel >::GetBoundaryCondition(), itk::GrayscaleDilateImageFilter< TInputImage, TOutputImage, TKernel >::GetBoundaryCondition(), itk::HMinimaImageFilter< TInputImage, TOutputImage >::GetNumberOfIterationsUsed(), itk::HMaximaImageFilter< TInputImage, TOutputImage >::GetNumberOfIterationsUsed(), itk::HConvexImageFilter< TInputImage, TOutputImage >::GetNumberOfIterationsUsed(), itk::HConcaveImageFilter< TInputImage, TOutputImage >::GetNumberOfIterationsUsed(), itk::GrayscaleGrindPeakImageFilter< TInputImage, TOutputImage >::GetNumberOfIterationsUsed(), itk::GrayscaleFillholeImageFilter< TInputImage, TOutputImage >::GetNumberOfIterationsUsed(), itk::GrayscaleConnectedOpeningImageFilter< TInputImage, TOutputImage >::GetNumberOfIterationsUsed(), itk::GrayscaleConnectedClosingImageFilter< TInputImage, TOutputImage >::GetNumberOfIterationsUsed(), itk::DoubleThresholdImageFilter< TInputImage, TOutputImage >::GetNumberOfIterationsUsed(), itk::GrayscaleErodeImageFilter< TInputImage, TOutputImage, TKernel >::OverrideBoundaryCondition(), itk::GrayscaleDilateImageFilter< TInputImage, TOutputImage, TKernel >::OverrideBoundaryCondition(), itk::GrayscaleErodeImageFilter< TInputImage, TOutputImage, TKernel >::ResetBoundaryCondition(), itk::GrayscaleDilateImageFilter< TInputImage, TOutputImage, TKernel >::ResetBoundaryCondition(), itk::LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage >::SetFixedImage(), and itk::LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage >::SetMovingImage().
#define itkLegacyMacro | ( | method | ) | method |
Definition at line 709 of file itkMacro.h.
#define itkLegacyReplaceBodyMacro | ( | method, | |||
version, | |||||
replace | ) | itkWarningMacro(#method " was deprecated for ITK " #version " and will be removed in a future version. Use " #replace " instead.") |
Definition at line 734 of file itkMacro.h.
Referenced by itk::CannyEdgeDetectionImageFilter< ImageType, ImageType >::GetThreshold(), and itk::CannyEdgeDetectionImageFilter< ImageType, ImageType >::SetThreshold().
#define itkLogMacro | ( | x, | |||
y | ) |
{ \
if (this->GetLogger() ) \
{ \
this->GetLogger()->Write(::itk::LoggerBase::x, y); \
} \
}
Definition at line 651 of file itkMacro.h.
#define itkLogMacroStatic | ( | obj, | |||
x, | |||||
y | ) |
{ \
if (obj->GetLogger() ) \
{ \
obj->GetLogger()->Write(::itk::LoggerBase::x, y); \
} \
}
Definition at line 660 of file itkMacro.h.
#define itkNewMacro | ( | x | ) |
static Pointer New(void) \ { \ Pointer smartPtr = ::itk::ObjectFactory<x>::Create(); \ if(smartPtr.GetPointer() == NULL) \ { \ smartPtr = new x; \ } \ smartPtr->UnRegister(); \ return smartPtr; \ } \ virtual ::itk::LightObject::Pointer CreateAnother(void) const \ { \ ::itk::LightObject::Pointer smartPtr; \ smartPtr = x::New().GetPointer(); \ return smartPtr; \ }
Define two object creation methods. The first method, New(), creates an object from a class, potentially deferring to a factory. The second method, CreateAnother(), creates an object from an instance, potentially deferring to a factory. This second method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
These creation methods first try asking the object factory to create an instance, and then default to the standard "new" operator if the factory fails.
These routines assigns the raw pointer to a smart pointer and then call UnRegister() on the rawPtr to compensate for LightObject's constructor initializing an object's reference count to 1 (needed for proper initialization of process objects and data objects cycles).
Definition at line 435 of file itkMacro.h.
#define itkNotUsed | ( | x | ) |
A convenience macro marks variables as not being used by a method, avoiding compile-time warnings.
Definition at line 64 of file itkMacro.h.
#define itkSetClampMacro | ( | name, | |||
type, | |||||
min, | |||||
max | ) |
virtual void Set##name (type _arg) \ { \ itkDebugMacro("setting " << #name " to " << _arg ); \ if (this->m_##name != (_arg<min?min:(_arg>max?max:_arg))) \ { \ this->m_##name = (_arg<min?min:(_arg>max?max:_arg)); \ this->Modified(); \ } \ }
Set built-in type where value is constrained between min/max limits. Create member Set"name"() (e.q., SetRadius()). defines are convienience for clamping open-ended values.
Definition at line 313 of file itkMacro.h.
#define itkSetConstObjectMacro | ( | name, | |||
type | ) |
virtual void Set##name (const type* _arg) \ { \ itkDebugMacro("setting " << #name " to " << _arg ); \ if (this->m_##name != _arg) \ { \ this->m_##name = _arg; \ this->Modified(); \ } \ }
Set const pointer to object; uses Object reference counting methodology. Creates method Set"name"() (e.g., SetPoints()). Note that using smart pointers requires using real pointers when setting input, but returning smart pointers on output.
Definition at line 355 of file itkMacro.h.
#define itkSetDecoratedInputMacro | ( | name, | |||
type, | |||||
number | ) |
itkSetInputMacro(name, SimpleDataObjectDecorator<type>, number); \ itkGetInputMacro(name, SimpleDataObjectDecorator<type>, number); \ virtual void Set##name(const type &_arg) \ { \ typedef SimpleDataObjectDecorator< type > DecoratorType; \ itkDebugMacro("setting input " #name " to " << _arg); \ const DecoratorType * oldInput = \ static_cast< const DecoratorType * >( \ this->ProcessObject::GetInput(number) ); \ if( oldInput && oldInput->Get() == _arg ) \ { \ return; \ } \ typename DecoratorType::Pointer newInput = DecoratorType::New(); \ newInput->Set( _arg ); \ this->Set##name##Input( newInput ); \ }
Set a decorated input. This defines the Set"name"() method. It invokes SetInputMacro() and GetInputMacro() for the decorated object
Definition at line 160 of file itkMacro.h.
#define itkSetDecoratedObjectInputMacro | ( | name, | |||
type, | |||||
number | ) |
itkSetInputMacro(name, DataObjectDecorator<type>, number); \ itkGetInputMacro(name, DataObjectDecorator<type>, number); \ virtual void Set##name(const type *_arg) \ { \ typedef DataObjectDecorator< type > DecoratorType; \ itkDebugMacro("setting input " #name " to " << _arg); \ const DecoratorType * oldInput = \ static_cast< const DecoratorType * >( \ this->ProcessObject::GetInput(number) ); \ if( oldInput && oldInput->Get() == _arg ) \ { \ return; \ } \ typename DecoratorType::Pointer newInput = DecoratorType::New(); \ newInput->Set( _arg ); \ this->Set##name##Input( newInput ); \ }
Set a decorated input that derives from itk::Object, but not from itk::DataObject. This defines the Set"name"() method. It invokes SetInputMacro() and GetInputMacro() for the decorated object
Definition at line 183 of file itkMacro.h.
#define itkSetEnumMacro | ( | name, | |||
type | ) |
virtual void Set##name (const type _arg) \ { \ itkDebugMacro("setting " #name " to " << static_cast<long>(_arg)); \ if (this->m_##name != _arg) \ { \ this->m_##name = _arg; \ this->Modified(); \ } \ }
Set built-in type. Creates member Set"name"() (e.g., SetVisibility()); This should be use when the type is an enum. It is use to avoid warnings on some compilers with non specified enum types passed to itkDebugMacro.
Definition at line 253 of file itkMacro.h.
#define itkSetInputMacro | ( | name, | |||
type, | |||||
number | ) |
virtual void Set##name##Input(const type *_arg) \ { \ itkDebugMacro("setting input " #name " to " << _arg); \ if (_arg != static_cast<type *>(this->ProcessObject::GetInput( number ))) \ { \ this->ProcessObject::SetNthInput( number, const_cast<type *>(_arg) ); \ this->Modified(); \ } \ } \ virtual void SetInput##number(const type *_arg) \ { \ itkDebugMacro("setting input " #number " to " << _arg); \ if (_arg != static_cast<type *>(this->ProcessObject::GetInput( number ))) \ { \ this->ProcessObject::SetNthInput( number, const_cast<type *>(_arg) ); \ this->Modified(); \ } \ }
Set an input. This defines the Set"name"Input() method
Definition at line 119 of file itkMacro.h.
#define itkSetMacro | ( | name, | |||
type | ) |
virtual void Set##name (const type _arg) \ { \ itkDebugMacro("setting " #name " to " << _arg); \ if (this->m_##name != _arg) \ { \ this->m_##name = _arg; \ this->Modified(); \ } \ }
Set built-in type. Creates member Set"name"() (e.g., SetVisibility());
Definition at line 205 of file itkMacro.h.
#define itkSetObjectMacro | ( | name, | |||
type | ) |
virtual void Set##name (type* _arg) \ { \ itkDebugMacro("setting " << #name " to " << _arg ); \ if (this->m_##name != _arg) \ { \ this->m_##name = _arg; \ this->Modified(); \ } \ }
Set pointer to object; uses Object reference counting methodology. Creates method Set"name"() (e.g., SetPoints()). Note that using smart pointers requires using real pointers when setting input, but returning smart pointers on output.
Definition at line 329 of file itkMacro.h.
#define itkSetStringMacro | ( | name | ) |
virtual void Set##name (const char* _arg) \ { \ if ( _arg && (_arg == this->m_##name) ) { return;} \ if (_arg) \ { \ this->m_##name = _arg;\ } \ else \ { \ this->m_##name = ""; \ } \ this->Modified(); \ } \ virtual void Set##name (const std::string & _arg) \ { \ this->Set##name( _arg.c_str() ); \ } \
Set character string. Creates member Set"name"() (e.g., SetFilename(char *)). The macro assumes that the class member (name) is declared a type std::string.
Definition at line 280 of file itkMacro.h.
#define itkSetVectorMacro | ( | name, | |||
type, | |||||
count | ) |
virtual void Set##name(type data[]) \ { \ unsigned int i; \ for (i=0; i<count; i++) { if ( data[i] != this->m_##name[i] ) { break; }} \ if ( i < count ) \ { \ this->Modified(); \ for (i=0; i<count; i++) { this->m_##name[i] = data[i]; }\ } \ }
General set vector macro creates a single method that copies specified number of values into object. Examples: void SetColor(c,3)
Definition at line 398 of file itkMacro.h.
#define itkStaticConstMacro | ( | name, | |||
type, | |||||
value | ) | static const type name = value |
Macro to initialize static constants. This is used frequently to replace the use of enum's within a class. Some compilers do not allow an enum of one class to be passed as template argument to another class. Other uses of this macro as possible.
This is based (verbatim) on the BOOST_STATIC_CONSTANT macro. The original Boost documentation is below.
BOOST_STATIC_CONSTANT workaround --------------------------------------- // On compilers which don't allow in-class initialization of static integral constant members, we must use enums as a workaround if we want the constants to be available at compile-time. This macro gives us a convenient way to declare such constants.
Definition at line 109 of file itkMacro.h.
#define itkSuperclassTraitMacro | ( | traitnameType | ) | typedef typename Superclass::traitnameType traitnameType; |
Macro used to redefine a type from the superclass.
Definition at line 141 of file itkMacro.h.
#define itkTypeMacro | ( | thisClass, | |||
superclass | ) |
virtual const char *GetNameOfClass() const \ {return #thisClass;}
Macro used to add standard methods to all classes, mainly type information.
Definition at line 490 of file itkMacro.h.
#define itkWarningMacro | ( | x | ) |
{ if (::itk::Object::GetGlobalWarningDisplay()) \ { ::itk::OStringStream itkmsg; \ itkmsg << "WARNING: In " __FILE__ ", line " << __LINE__ << "\n" \ << this->GetNameOfClass() << " (" << this << "): " x \ << "\n\n"; \ ::itk::OutputWindowDisplayWarningText(itkmsg.str().c_str());} \ }
This macro is used to print warning information (i.e., unusual circumstance but not necessarily fatal.) Example usage looks like: itkWarningMacro(<< "this is warning info" << this->SomeVariable);
Definition at line 535 of file itkMacro.h.
Referenced by itk::Rigid2DTransform< TScalarType >::BackTransform(), itk::AffineTransform< TScalarType, NDimensions >::BackTransform(), itk::PointBasedSpatialObject< TDimension >::ComputeLocalBoundingBox(), itk::ImageFunction< TInputImage, TOutput, TOutput >::ConvertPointToContinousIndex(), itk::DicomImageIO::DicomImageIO(), itk::MatchCardinalityImageToImageMetric< TFixedImage, TMovingImage >::GetDerivative(), itk::SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >::GetMaximumIterations(), itk::NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, Image< TOutputPixelType,::itk::GetImageDimension< TInputImage >::ImageDimension > >::GetMaximumIterations(), itk::AntiAliasBinaryImageFilter< TInputImage, TOutputImage >::GetMaximumIterations(), itk::PointBasedSpatialObject< TDimension >::GetNumberOfPoints(), itk::PointBasedSpatialObject< TDimension >::GetPoint(), itk::RealTimeClock::GetTimestamp(), itk::SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >::GetUseNegativeFeatures(), itk::NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, Image< TOutputPixelType,::itk::GetImageDimension< TInputImage >::ImageDimension > >::GetUseNegativeFeatures(), itk::VectorCurvatureAnisotropicDiffusionImageFilter< TInputImage, TOutputImage >::InitializeIteration(), itk::CurvatureAnisotropicDiffusionImageFilter< TInputImage, TOutputImage >::InitializeIteration(), itk::ArrowSpatialObject< TDimension >::SetLenght(), itk::SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >::SetMaximumIterations(), itk::NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, Image< TOutputPixelType,::itk::GetImageDimension< TInputImage >::ImageDimension > >::SetMaximumIterations(), itk::AntiAliasBinaryImageFilter< TInputImage, TOutputImage >::SetMaximumIterations(), itk::NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, Image< TOutputPixelType,::itk::GetImageDimension< TInputImage >::ImageDimension > >::SetMaximumRMSError(), itk::Statistics::ImageToCooccurrenceListAdaptor< TImage >::SetMeasurementVectorSize(), itk::SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >::SetUseNegativeFeatures(), itk::NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, Image< TOutputPixelType,::itk::GetImageDimension< TInputImage >::ImageDimension > >::SetUseNegativeFeatures(), itk::SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >::SetUseNegativeFeaturesOff(), itk::NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, Image< TOutputPixelType,::itk::GetImageDimension< TInputImage >::ImageDimension > >::SetUseNegativeFeaturesOff(), itk::SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >::SetUseNegativeFeaturesOn(), and itk::NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, Image< TOutputPixelType,::itk::GetImageDimension< TInputImage >::ImageDimension > >::SetUseNegativeFeaturesOn().