#include <itkMaskNegatedImageFilter.h>
Mask an image with the negation (or logical compliment) of 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!=. 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 143 of file itkMaskNegatedImageFilter.h.
Public Member Functions | |
virtual::itk::LightObject::Pointer | CreateAnother () const |
const MaskImageType * | GetMaskImage () |
const TMaskImage::PixelType & | GetMaskingValue () const |
const char * | GetNameOfClass () const override |
const TOutputImage::PixelType & | GetOutsideValue () const |
void | SetMaskImage (const MaskImageType *maskImage) |
void | SetOutsideValue (const typename TOutputImage::PixelType &outsideValue) |
void | SetMaskingValue (const typename TMaskImage::PixelType &maskingValue) |
![]() | |
virtual const Input1ImagePixelType & | GetConstant1 () const |
virtual const Input2ImagePixelType & | GetConstant2 () const |
virtual void | SetConstant1 (const Input1ImagePixelType &input1) |
void | SetFunctor (const std::function< ValueFunctionType > &f) |
void | SetFunctor (ValueFunctionType *funcPointer) |
virtual void | SetInput1 (const TInputImage *image1) |
virtual void | SetInput1 (const DecoratedInput1ImagePixelType *input1) |
virtual void | SetInput1 (const Input1ImagePixelType &input1) |
virtual void | SetInput2 (const TMaskImage *image2) |
virtual void | SetInput2 (const DecoratedInput2ImagePixelType *input2) |
virtual void | SetInput2 (const Input2ImagePixelType &input2) |
virtual void | SetConstant2 (const Input2ImagePixelType &input2) |
void | SetConstant (Input2ImagePixelType ct) |
const Input2ImagePixelType & | GetConstant () const |
void | SetFunctor (const std::function< ConstRefFunctionType > &f) |
void | SetFunctor (ConstRefFunctionType *funcPointer) |
void | SetFunctor (const TFunctor &functor) |
![]() | |
virtual bool | CanRunInPlace () const |
virtual void | SetInPlace (bool _arg) |
virtual bool | GetInPlace () const |
virtual void | InPlaceOn () |
virtual void | InPlaceOff () |
![]() | |
const InputImageType * | GetInput () const |
const InputImageType * | GetInput () const |
const InputImageType * | GetInput (unsigned int idx) const |
const InputImageType * | GetInput (unsigned int idx) const |
void | PopBackInput () override |
void | PopBackInput () override |
void | PopFrontInput () override |
void | PopFrontInput () override |
virtual void | PushBackInput (const InputImageType *input) |
virtual void | PushBackInput (const InputImageType *input) |
virtual void | PushFrontInput (const InputImageType *input) |
virtual void | PushFrontInput (const InputImageType *input) |
virtual void | SetInput (const InputImageType *input) |
virtual void | SetInput (const InputImageType *input) |
virtual void | SetInput (unsigned int, const TInputImage *image) |
virtual void | SetInput (unsigned int, const TInputImage *image) |
virtual void | SetCoordinateTolerance (double _arg) |
virtual double | GetCoordinateTolerance () const |
virtual void | SetCoordinateTolerance (double _arg) |
virtual double | GetCoordinateTolerance () const |
virtual void | SetDirectionTolerance (double _arg) |
virtual double | GetDirectionTolerance () const |
virtual void | SetDirectionTolerance (double _arg) |
virtual double | GetDirectionTolerance () const |
![]() | |
OutputImageType * | GetOutput (unsigned int idx) |
OutputImageType * | GetOutput () |
const OutputImageType * | GetOutput () const |
virtual void | GraftOutput (DataObject *graft) |
virtual void | GraftOutput (const DataObjectIdentifierType &key, DataObject *graft) |
virtual void | GraftNthOutput (unsigned int idx, DataObject *graft) |
ProcessObject::DataObjectPointer | MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override |
ProcessObject::DataObjectPointer | MakeOutput (const ProcessObject::DataObjectIdentifierType &) override |
![]() | |
virtual void | AbortGenerateDataOff () |
virtual void | AbortGenerateDataOn () |
virtual void | EnlargeOutputRequestedRegion (DataObject *output) |
virtual const bool & | GetAbortGenerateData () const |
DataObjectPointerArray | GetIndexedInputs () |
DataObjectPointerArray | GetIndexedOutputs () |
NameArray | GetInputNames () const |
DataObjectPointerArray | GetInputs () |
MultiThreaderType * | GetMultiThreader () const |
const char * | GetNameOfClass () const override |
DataObjectPointerArraySizeType | GetNumberOfIndexedInputs () const |
DataObjectPointerArraySizeType | GetNumberOfIndexedOutputs () const |
DataObjectPointerArraySizeType | GetNumberOfInputs () const |
DataObjectPointerArraySizeType | GetNumberOfOutputs () const |
virtual DataObjectPointerArraySizeType | GetNumberOfValidRequiredInputs () const |
NameArray | GetOutputNames () const |
DataObjectPointerArray | GetOutputs () |
virtual float | GetProgress () const |
NameArray | GetRequiredInputNames () const |
bool | HasInput (const DataObjectIdentifierType &key) const |
bool | HasOutput (const DataObjectIdentifierType &key) const |
void | IncrementProgress (float increment) |
virtual void | PrepareOutputs () |
virtual void | PropagateRequestedRegion (DataObject *output) |
virtual void | ResetPipeline () |
virtual void | SetAbortGenerateData (bool _arg) |
void | SetMultiThreader (MultiThreaderType *threader) |
virtual void | Update () |
virtual void | UpdateLargestPossibleRegion () |
virtual void | UpdateOutputData (DataObject *output) |
virtual void | UpdateOutputInformation () |
void | UpdateProgress (float progress) |
virtual void | SetReleaseDataFlag (bool val) |
virtual bool | GetReleaseDataFlag () const |
void | ReleaseDataFlagOn () |
void | ReleaseDataFlagOff () |
virtual void | SetReleaseDataBeforeUpdateFlag (bool _arg) |
virtual const bool & | GetReleaseDataBeforeUpdateFlag () const |
virtual void | ReleaseDataBeforeUpdateFlagOn () |
virtual void | ReleaseDataBeforeUpdateFlagOff () |
virtual void | SetNumberOfWorkUnits (ThreadIdType _arg) |
virtual const ThreadIdType & | GetNumberOfWorkUnits () const |
![]() | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) const |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
![]() | |
Pointer | Clone () const |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
Private Member Functions | |
template<typename TPixelType> | |
void | CheckOutsideValue (const TPixelType *) |
template<typename TValue> | |
void | CheckOutsideValue (const VariableLengthVector< TValue > *) |
FunctorType & | GetFunctor () |
virtual const FunctorType & | GetFunctor () const |
Private Attributes | |
FunctorType | m_Functor {} |
Additional Inherited Members | |
![]() | |
static constexpr unsigned int | InputImage1Dimension |
static constexpr unsigned int | InputImage2Dimension |
static constexpr unsigned int | OutputImageDimension |
![]() | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
![]() | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
static constexpr unsigned int | OutputImageDimension |
![]() | |
static constexpr unsigned int | OutputImageDimension |
![]() | |
using | InputToOutputRegionCopierType |
using | OutputToInputRegionCopierType |
![]() | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
![]() | |
template<typename TSourceObject> | |
static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
static constexpr float | progressFixedToFloat (uint32_t fixed) |
static uint32_t | progressFloatToFixed (float f) |
![]() | |
bool | m_DynamicMultiThreading |
![]() | |
TimeStamp | m_OutputInformationMTime {} |
bool | m_Updating {} |
![]() | |
std::atomic< int > | m_ReferenceCount {} |
using itk::MaskNegatedImageFilter< TInputImage, TMaskImage, TOutputImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 156 of file itkMaskNegatedImageFilter.h.
using itk::MaskNegatedImageFilter< TInputImage, TMaskImage, TOutputImage >::FunctorType |
Definition at line 153 of file itkMaskNegatedImageFilter.h.
using itk::MaskNegatedImageFilter< TInputImage, TMaskImage, TOutputImage >::MaskImageType = TMaskImage |
Typedefs
Definition at line 165 of file itkMaskNegatedImageFilter.h.
using itk::MaskNegatedImageFilter< TInputImage, TMaskImage, TOutputImage >::Pointer = SmartPointer<Self> |
Definition at line 155 of file itkMaskNegatedImageFilter.h.
using itk::MaskNegatedImageFilter< TInputImage, TMaskImage, TOutputImage >::Self = MaskNegatedImageFilter |
Standard class type aliases.
Definition at line 150 of file itkMaskNegatedImageFilter.h.
using itk::MaskNegatedImageFilter< TInputImage, TMaskImage, TOutputImage >::Superclass = BinaryGeneratorImageFilter<TInputImage, TMaskImage, TOutputImage> |
Definition at line 151 of file itkMaskNegatedImageFilter.h.
|
protecteddefault |
Referenced by GetNameOfClass().
|
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< TInputImage >.
Definition at line 237 of file itkMaskNegatedImageFilter.h.
References CheckOutsideValue(), GetFunctor(), and itk::BinaryGeneratorImageFilter< TInputImage, TMaskImage, TInputImage >::SetFunctor().
|
inlineprivate |
Definition at line 258 of file itkMaskNegatedImageFilter.h.
Referenced by BeforeThreadedGenerateData().
|
inlineprivate |
Definition at line 263 of file itkMaskNegatedImageFilter.h.
References GetFunctor(), itk::ImageSource< TInputImage >::GetOutput(), and GetOutsideValue().
|
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::BinaryGeneratorImageFilter< TInputImage, TMaskImage, TInputImage >.
|
inlineprivate |
Definition at line 249 of file itkMaskNegatedImageFilter.h.
References m_Functor.
|
privatevirtual |
Referenced by BeforeThreadedGenerateData(), CheckOutsideValue(), GetMaskingValue(), GetOutsideValue(), SetMaskingValue(), and SetOutsideValue().
|
inline |
Definition at line 216 of file itkMaskNegatedImageFilter.h.
References itk::ProcessObject::GetInput().
|
inline |
Method to get the masking value of the mask.
Definition at line 199 of file itkMaskNegatedImageFilter.h.
References GetFunctor().
Referenced by SetMaskingValue().
|
overridevirtual |
Reimplemented from itk::BinaryGeneratorImageFilter< TInputImage, TMaskImage, TInputImage >.
References MaskNegatedImageFilter().
|
inline |
Definition at line 180 of file itkMaskNegatedImageFilter.h.
References GetFunctor().
Referenced by CheckOutsideValue(), PrintSelf(), and 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, TInputImage >.
Definition at line 230 of file itkMaskNegatedImageFilter.h.
References GetOutsideValue(), and itk::ImageSource< TOutputImage >::PrintSelf().
|
inline |
Set/Get the mask image. Pixels set to zero in the mask image will retain the original value of the input image while non-zero pixels in the mask will be set to the "OutsideValue".
Definition at line 209 of file itkMaskNegatedImageFilter.h.
References itk::ProcessObject::SetNthInput().
|
inline |
Method to explicitly set the masking value of the mask. Defaults to 0
Definition at line 187 of file itkMaskNegatedImageFilter.h.
References GetFunctor(), GetMaskingValue(), and itk::Object::Modified().
|
inline |
Method to explicitly set the outside value of the mask. Defaults to 0
Definition at line 169 of file itkMaskNegatedImageFilter.h.
References GetFunctor(), GetOutsideValue(), itk::Object::Modified(), and itk::Math::NotExactlyEquals().
|
private |
Definition at line 254 of file itkMaskNegatedImageFilter.h.
Referenced by GetFunctor().