4#ifndef __itkAndConstantToImageFilter_h
5#define __itkAndConstantToImageFilter_h
7#include "itkUnaryFunctorImageFilter.h"
8#include "itkNumericTraits.h"
20template<
class TInput,
class TConstant,
class TOutput>
28 return !(*
this == other);
38 return static_cast<TOutput
>( ((A &
m_Constant) > 0) );
47template <
class TInputImage,
class TConstant,
class TOutputImage>
50UnaryFunctorImageFilter<TInputImage,TOutputImage,
51 Functor::AndConstantTo<
52 typename TInputImage::PixelType, TConstant,
53 typename TOutputImage::PixelType> >
58 typedef UnaryFunctorImageFilter<
59 TInputImage,TOutputImage,
61 typename TInputImage::PixelType, TConstant,
78 if( ct != this->GetFunctor().GetConstant() )
80 this->GetFunctor().SetConstant(ct);
86 return this->GetFunctor().GetConstant();
89#ifdef ITK_USE_CONCEPT_CHECKING
91 itkConceptMacro(InputConvertibleToOutputCheck,
92 (Concept::Convertible<
typename TInputImage::PixelType,
93 typename TOutputImage::PixelType>));
94 itkConceptMacro(Input1Input2OutputAndOperatorCheck,
95 (Concept::AdditiveOperators<
typename TInputImage::PixelType,
97 typename TOutputImage::PixelType>));
107 Superclass::PrintSelf(os, indent);
108 os << indent <<
"Constant: "
109 <<
static_cast<typename NumericTraits<TConstant>::PrintType
>(this->GetConstant())
115 void operator=(
const Self&);
Definition itkAndConstantToImageFilter.h:54
SmartPointer< const Self > ConstPointer
Definition itkAndConstantToImageFilter.h:65
SmartPointer< Self > Pointer
Definition itkAndConstantToImageFilter.h:64
UnaryFunctorImageFilter< TInputImage, TOutputImage, Functor::AndConstantTo< typename TInputImage::PixelType, TConstant, typename TOutputImage::PixelType > > Superclass
Definition itkAndConstantToImageFilter.h:62
itkTypeMacro(AndConstantToImageFilter, UnaryFunctorImageFilter)
const TConstant & GetConstant() const
Definition itkAndConstantToImageFilter.h:84
void SetConstant(TConstant ct)
Definition itkAndConstantToImageFilter.h:76
AndConstantToImageFilter()
Definition itkAndConstantToImageFilter.h:102
void PrintSelf(std::ostream &os, Indent indent) const
Definition itkAndConstantToImageFilter.h:105
virtual ~AndConstantToImageFilter()
Definition itkAndConstantToImageFilter.h:103
AndConstantToImageFilter Self
Definition itkAndConstantToImageFilter.h:57
Definition itkAndConstantToImageFilter.h:22
bool operator!=(const AndConstantTo &other) const
Definition itkAndConstantToImageFilter.h:26
bool operator==(const AndConstantTo &other) const
Definition itkAndConstantToImageFilter.h:30
AndConstantTo()
Definition itkAndConstantToImageFilter.h:24
void SetConstant(TConstant ct)
Definition itkAndConstantToImageFilter.h:40
const TConstant & GetConstant() const
Definition itkAndConstantToImageFilter.h:41
~AndConstantTo()
Definition itkAndConstantToImageFilter.h:25
TOutput operator()(const TInput &A) const
Definition itkAndConstantToImageFilter.h:34
TConstant m_Constant
Definition itkAndConstantToImageFilter.h:43
Definition direction_cosines.h:19