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;
254 void operator=(const
Self &) ITK_DELETE_FUNCTION;
256 template < typename TPixelType >
259 template <
typename TValue >
272 if ( currentValue == zeroVector )
274 zeroVector.SetSize( this->
GetOutput()->GetVectorLength() );
282 <<
"Number of components in OutsideValue: "
284 <<
" is not the same as the "
285 <<
"number of components in the image: "
286 << this->
GetOutput()->GetVectorLength());
void PrintSelf(std::ostream &os, Indent indent) const override
const MaskImageType * GetMaskImage()
virtual ~MaskImageFilter()
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.
void CheckOutsideValue(const VariableLengthVector< TValue > *)
void Fill(TValue const &v) noexcept
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)
unsigned int GetSize(void) const noexcept
void SetMaskImage(const MaskImageType *maskImage)
#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)