ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#include <itkMaskImageFilter.h>
Mask an image with a mask.
This class is templated over the types of the input image type, the mask image type and the type of the output image. Numeric conversions (castings) are done by the C++ defaults.
The pixel type of the input 2 image must have a valid definition of the operator != with zero. This condition is required because internally this filter will perform the operation
The pixel from the input 1 is cast to the pixel type of the output image.
Note that the input and the mask images must be of the same size.
Definition at line 147 of file itkMaskImageFilter.h.
Public Types | |
using | ConstPointer = SmartPointer< const Self > |
using | FunctorType = Functor::MaskInput< typename TInputImage::PixelType, typename TMaskImage::PixelType, typename TOutputImage::PixelType > |
using | MaskImageType = TMaskImage |
using | Pointer = SmartPointer< Self > |
using | Self = MaskImageFilter |
using | Superclass = BinaryGeneratorImageFilter< TInputImage, TMaskImage, TOutputImage > |
Public Types inherited from itk::BinaryGeneratorImageFilter< TInputImage, TMaskImage, TOutputImage > | |
using | ConstPointer = SmartPointer< const Self > |
using | ConstRefFunctionType = OutputImagePixelType(const Input1ImagePixelType &, const Input2ImagePixelType &) |
using | DecoratedInput1ImagePixelType = SimpleDataObjectDecorator< Input1ImagePixelType > |
using | DecoratedInput2ImagePixelType = SimpleDataObjectDecorator< Input2ImagePixelType > |
using | FunctionType = OutputImagePixelType(*)(const Input1ImagePixelType &, const Input2ImagePixelType &) |
using | Input1ImagePixelType = typename Input1ImageType::PixelType |
using | Input1ImagePointer = typename Input1ImageType::ConstPointer |
using | Input1ImageRegionType = typename Input1ImageType::RegionType |
using | Input1ImageType = TInputImage |
using | Input2ImagePixelType = typename Input2ImageType::PixelType |
using | Input2ImagePointer = typename Input2ImageType::ConstPointer |
using | Input2ImageRegionType = typename Input2ImageType::RegionType |
using | Input2ImageType = TMaskImage |
using | OutputImagePixelType = typename OutputImageType::PixelType |
using | OutputImagePointer = typename OutputImageType::Pointer |
using | OutputImageRegionType = typename OutputImageType::RegionType |
using | OutputImageType = TOutputImage |
using | Pointer = SmartPointer< Self > |
using | Self = BinaryGeneratorImageFilter |
using | Superclass = InPlaceImageFilter< TInputImage, TOutputImage > |
using | ValueFunctionType = OutputImagePixelType(Input1ImagePixelType, Input2ImagePixelType) |
Public Types inherited from itk::InPlaceImageFilter< TInputImage, TOutputImage > | |
using | ConstPointer = SmartPointer< const Self > |
using | InputImageConstPointer = typename InputImageType::ConstPointer |
using | InputImagePixelType = typename InputImageType::PixelType |
using | InputImagePointer = typename InputImageType::Pointer |
using | InputImageRegionType = typename InputImageType::RegionType |
using | InputImageType = TInputImage |
using | OutputImagePixelType = typename Superclass::OutputImagePixelType |
using | OutputImagePointer = typename Superclass::OutputImagePointer |
using | OutputImageRegionType = typename Superclass::OutputImageRegionType |
using | OutputImageType = typename Superclass::OutputImageType |
using | Pointer = SmartPointer< Self > |
using | Self = InPlaceImageFilter |
using | Superclass = ImageToImageFilter< TInputImage, TOutputImage > |
Public Types inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
using | ConstPointer = SmartPointer< const Self > |
using | InputImageConstPointer = typename InputImageType::ConstPointer |
using | InputImagePixelType = typename InputImageType::PixelType |
using | InputImagePointer = typename InputImageType::Pointer |
using | InputImageRegionType = typename InputImageType::RegionType |
using | InputImageType = TInputImage |
using | OutputImagePixelType = typename Superclass::OutputImagePixelType |
using | OutputImageRegionType = typename Superclass::OutputImageRegionType |
using | Pointer = SmartPointer< Self > |
using | Self = ImageToImageFilter |
using | Superclass = ImageSource< TOutputImage > |
Public Types inherited from itk::ImageSource< TOutputImage > | |
using | ConstPointer = SmartPointer< const Self > |
using | DataObjectIdentifierType = Superclass::DataObjectIdentifierType |
using | DataObjectPointer = DataObject::Pointer |
using | DataObjectPointerArraySizeType = Superclass::DataObjectPointerArraySizeType |
using | OutputImagePixelType = typename OutputImageType::PixelType |
using | OutputImagePointer = typename OutputImageType::Pointer |
using | OutputImageRegionType = typename OutputImageType::RegionType |
using | OutputImageType = TOutputImage |
using | Pointer = SmartPointer< Self > |
using | Self = ImageSource |
using | Superclass = ProcessObject |
Public Types inherited from itk::ProcessObject | |
using | ConstPointer = SmartPointer< const Self > |
using | DataObjectIdentifierType = DataObject::DataObjectIdentifierType |
using | DataObjectPointer = DataObject::Pointer |
using | DataObjectPointerArray = std::vector< DataObjectPointer > |
using | DataObjectPointerArraySizeType = DataObjectPointerArray::size_type |
using | MultiThreaderType = MultiThreaderBase |
using | NameArray = std::vector< DataObjectIdentifierType > |
using | Pointer = SmartPointer< Self > |
using | Self = ProcessObject |
using | Superclass = Object |
Public Types inherited from itk::Object | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = Object |
using | Superclass = LightObject |
Public Types inherited from itk::LightObject | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = LightObject |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::BinaryGeneratorImageFilter< TInputImage, TMaskImage, TOutputImage > | |
static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Private Member Functions | |
template<typename TPixelType > | |
void | CheckOutsideValue (const TPixelType *) |
template<typename TValue > | |
void | CheckOutsideValue (const VariableLengthVector< TValue > *) |
virtual const FunctorType & | GetFunctor () const |
FunctorType & | GetFunctor () |
Private Attributes | |
FunctorType | m_Functor |
using itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::ConstPointer = SmartPointer< const Self > |
Definition at line 164 of file itkMaskImageFilter.h.
using itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::FunctorType = Functor::MaskInput< typename TInputImage::PixelType, typename TMaskImage::PixelType, typename TOutputImage::PixelType > |
Definition at line 161 of file itkMaskImageFilter.h.
using itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::MaskImageType = TMaskImage |
Typedefs
Definition at line 174 of file itkMaskImageFilter.h.
using itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::Pointer = SmartPointer< Self > |
Definition at line 163 of file itkMaskImageFilter.h.
using itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::Self = MaskImageFilter |
Standard class type aliases.
Definition at line 156 of file itkMaskImageFilter.h.
using itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::Superclass = BinaryGeneratorImageFilter< TInputImage, TMaskImage, TOutputImage > |
Definition at line 157 of file itkMaskImageFilter.h.
|
protecteddefault |
|
overrideprotecteddefault |
|
inlineoverrideprotectedvirtual |
If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData(). The execution flow in the default GenerateData() method will be: 1) Allocate the output buffer 2) Call BeforeThreadedGenerateData() 3) Spawn threads, calling ThreadedGenerateData() in each thread. 4) Call AfterThreadedGenerateData() Note that this flow of control is only available if a filter provides a ThreadedGenerateData() method and NOT a GenerateData() method.
Reimplemented from itk::ImageSource< TOutputImage >.
Definition at line 244 of file itkMaskImageFilter.h.
References itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::CheckOutsideValue(), itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetFunctor(), and itk::BinaryGeneratorImageFilter< TInputImage, TMaskImage, TOutputImage >::SetFunctor().
|
inlineprivate |
Definition at line 259 of file itkMaskImageFilter.h.
Referenced by itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::BeforeThreadedGenerateData().
|
inlineprivate |
Definition at line 262 of file itkMaskImageFilter.h.
References itk::VariableLengthVector< TValue >::Fill(), itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetFunctor(), itk::ImageSource< TOutputImage >::GetOutput(), itk::Functor::MaskInput< TInput, TMask, TOutput >::GetOutsideValue(), itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetOutsideValue(), itk::VariableLengthVector< TValue >::GetSize(), and itk::Functor::MaskInput< TInput, TMask, TOutput >::SetOutsideValue().
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
|
privatevirtual |
Referenced by itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::BeforeThreadedGenerateData(), itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::CheckOutsideValue(), itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetMaskingValue(), itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetOutsideValue(), itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::SetMaskingValue(), and itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::SetOutsideValue().
|
inlineprivate |
Definition at line 254 of file itkMaskImageFilter.h.
References itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::m_Functor.
|
inline |
Set/Get the mask image. Pixels set in the mask image will retain the original value of the input image while pixels not set in the mask will be set to the "OutsideValue".
Definition at line 185 of file itkMaskImageFilter.h.
References itk::ProcessObject::GetInput().
|
inline |
Method to get the masking value of the mask.
Definition at line 219 of file itkMaskImageFilter.h.
References itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetFunctor(), and itk::Functor::MaskInput< TInput, TMask, TOutput >::GetMaskingValue().
Referenced by itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::SetMaskingValue().
|
virtual |
Runtime information support.
Reimplemented from itk::BinaryGeneratorImageFilter< TInputImage, TMaskImage, TOutputImage >.
|
inline |
Definition at line 202 of file itkMaskImageFilter.h.
References itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetFunctor(), and itk::Functor::MaskInput< TInput, TMask, TOutput >::GetOutsideValue().
Referenced by itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::CheckOutsideValue(), itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::PrintSelf(), and itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::SetOutsideValue().
|
static |
Method for creation through the object factory.
|
inlineoverrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::InPlaceImageFilter< TInputImage, TOutputImage >.
Definition at line 238 of file itkMaskImageFilter.h.
References itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetOutsideValue(), and itk::InPlaceImageFilter< TInputImage, TOutputImage >::PrintSelf().
|
inline |
Set/Get the mask image. Pixels set in the mask image will retain the original value of the input image while pixels not set in the mask will be set to the "OutsideValue".
Definition at line 180 of file itkMaskImageFilter.h.
References itk::ProcessObject::SetNthInput().
|
inline |
Method to explicitly set the masking value of the mask. Defaults to 0
Definition at line 208 of file itkMaskImageFilter.h.
References itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetFunctor(), itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetMaskingValue(), itk::Object::Modified(), and itk::Functor::MaskInput< TInput, TMask, TOutput >::SetMaskingValue().
|
inline |
Method to explicitly set the outside value of the mask. Defaults to 0
Definition at line 192 of file itkMaskImageFilter.h.
References itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetFunctor(), itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetOutsideValue(), itk::Object::Modified(), itk::Math::NotExactlyEquals(), and itk::Functor::MaskInput< TInput, TMask, TOutput >::SetOutsideValue().
|
private |
Definition at line 256 of file itkMaskImageFilter.h.
Referenced by itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >::GetFunctor().