18 #ifndef itkMaskImageFilter_h
19 #define itkMaskImageFilter_h
35 template<
typename TInput,
typename TMask,
typename TOutput = TInput >
54 return !( *
this != other );
57 inline TOutput
operator()(
const TInput & A,
const TMask & B)
const
61 return static_cast< TOutput
>( A );
95 template <
typename TPixelType >
101 template <
typename TValue >
145 template<
typename TInputImage,
typename TMaskImage,
typename TOutputImage = TInputImage >
150 typename TInputImage::PixelType,
151 typename TMaskImage::PixelType,
152 typename TOutputImage::PixelType > >
160 typename TInputImage::PixelType,
161 typename TMaskImage::PixelType,
162 typename TOutputImage::PixelType >
185 this->
SetNthInput( 1, const_cast< MaskImageType * >( maskImage ) );
228 typedef typename TOutputImage::PixelType PixelType;
232 #ifdef ITK_USE_CONCEPT_CHECKING
238 typename TOutputImage::PixelType > ) );
249 os << indent <<
"OutsideValue: " << this->
GetOutsideValue() << std::endl;
255 template <
typename TPixelType >
258 template <
typename TValue >
271 if ( currentValue == zeroVector )
273 zeroVector.SetSize( this->
GetOutput()->GetVectorLength() );
281 <<
"Number of components in OutsideValue: "
283 <<
" is not the same as the "
284 <<
"number of components in the image: "
285 << this->
GetOutput()->GetVectorLength());
void PrintSelf(std::ostream &os, Indent indent) const override
const MaskImageType * GetMaskImage()
virtual ~MaskImageFilter() override
SmartPointer< const Self > ConstPointer
const TOutputImage::PixelType & GetOutsideValue() const
BinaryFunctorImageFilter< TInputImage, TMaskImage, TOutputImage, Functor::MaskInput< typename TInputImage::PixelType, typename TMaskImage::PixelType, typename TOutputImage::PixelType > > Superclass
Base class for all process objects that output image data.
unsigned int GetSize(void) const
void CheckOutsideValue(const VariableLengthVector< TValue > *)
Represents an array whose length can be defined at run-time.
virtual void PrintSelf(std::ostream &os, Indent indent) const override
const TMaskImage::PixelType & GetMaskingValue() const
void BeforeThreadedGenerateData() override
FunctorType & GetFunctor()
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
virtual void Modified() const
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
SmartPointer< Self > Pointer
Mask an image with a mask.
OutputImageType * GetOutput()
Control indentation during Print() invocation.
void CheckOutsideValue(const TPixelType *)
Define additional traits for native types such as int or float.
virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input)
void SetMaskImage(const MaskImageType *maskImage)
void Fill(TValue const &v)
#define itkConceptMacro(name, concept)
Implements pixel-wise generic operation of two images, or of an image and a constant.
void SetMaskingValue(const typename TMaskImage::PixelType &maskingValue)
void SetOutsideValue(const typename TOutputImage::PixelType &outsideValue)