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());
const MaskImageType * GetMaskImage()
virtual ~MaskImageFilter()
virtual void PrintSelf(std::ostream &os, Indent indent) const
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 > *)
OutputImageType * GetOutput(void)
void operator=(const Self &)
void BeforeThreadedGenerateData()
Represents an array whose length can be defined at run-time.
const TMaskImage::PixelType & GetMaskingValue() const
FunctorType & GetFunctor()
virtual void Modified() const
DataObject * GetInput(const DataObjectIdentifierType &key)
SmartPointer< Self > Pointer
void PrintSelf(std::ostream &os, Indent indent) const
Mask an image with a mask.
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)