28 #ifndef itkVectorConnectedComponentImageFilter_h
29 #define itkVectorConnectedComponentImageFilter_h
31 #include "vnl/vnl_math.h"
49 template<
typename TInput >
69 return !( *
this != other );
72 bool operator()(
const TInput & a,
const TInput & b)
const
76 for (
unsigned int i = 0; i < NumericTraits<TInput>::GetLength(a); ++i)
78 dotProduct += a[i]*b[i];
80 return ( static_cast<typename TInput::ValueType>( 1.0 - vnl_math_abs(dotProduct) ) <=
m_Threshold );
97 template<
typename TInputImage,
typename TOutputImage,
typename TMaskImage = TInputImage >
100 Functor::SimilarVectorsFunctor< typename TInputImage::ValueType >,
118 typedef typename TInputImage::PixelType::ValueType
InputValueType;
126 #ifdef ITK_USE_CONCEPT_CHECKING
bool operator==(const SimilarVectorsFunctor &other) const
A connected components filter that labels the objects in a vector image. Two vectors are pointing sim...
SmartPointer< Self > Pointer
A connected components filter that labels the objects in a vector image. Two vectors are pointing sim...
A generic connected components filter that labels the objects in an artibitrary image.
virtual ~VectorConnectedComponentImageFilter()
VectorConnectedComponentImageFilter Self
Base class for all process objects that output image data.
FunctorType & GetFunctor()
virtual void SetDistanceThreshold(const InputValueType &thresh)
bool operator()(const TInput &a, const TInput &b) const
TInput::ValueType m_Threshold
TInput::ValueType GetDistanceThreshold()
void SetDistanceThreshold(const typename TInput::ValueType &thresh)
VectorConnectedComponentImageFilter()
SmartPointer< const Self > ConstPointer
TInputImage::PixelType::ValueType InputValueType
bool operator!=(const SimilarVectorsFunctor &) const
virtual InputValueType GetDistanceThreshold()
Define additional traits for native types such as int or float.
#define itkConceptMacro(name, concept)
void operator=(const Self &)
ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, Functor::SimilarVectorsFunctor< typename TInputImage::ValueType >, TMaskImage > Superclass