18 #ifndef itkMaskImageFilter_h
19 #define itkMaskImageFilter_h
34 template<
typename TInput,
typename TMask,
typename TOutput = TInput >
53 return !( *
this != other );
56 inline TOutput
operator()(
const TInput & A,
const TMask & B)
const
60 return static_cast< TOutput
>( A );
94 template <
typename TPixelType >
100 template <
typename TValue >
144 template<
typename TInputImage,
typename TMaskImage,
typename TOutputImage = TInputImage >
149 typename TInputImage::PixelType,
150 typename TMaskImage::PixelType,
151 typename TOutputImage::PixelType > >
159 typename TInputImage::PixelType,
160 typename TMaskImage::PixelType,
161 typename TOutputImage::PixelType >
184 this->
SetNthInput( 1, const_cast< MaskImageType * >( maskImage ) );
227 typedef typename TOutputImage::PixelType PixelType;
231 #ifdef ITK_USE_CONCEPT_CHECKING
237 typename TOutputImage::PixelType > ) );
248 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()
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 > *)
void operator=(const Self &)
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()
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)