template<typename TMask, typename TImage>
class itk::TernaryOperatorImageFilter< TMask, TImage >
Return the value of input 2 if input 1 is false, and that of input 3 otherwise.
- Author
- Davis Vigneault
This class is templated over the mask type and image type. Inputs two and three and the output image are all templated over the same type. If the value of Input1 evaluates to true, the value of Input2 is taken; otherwise, the value of Input3 is taken. This is equivalent to applying the ternary operator pixelwise across the three images:
Output = Input1 ? Input2 : Input3
As an example of where this filter could be useful, consider the case where you have the following images:
- Foreground: An image containing an object of interest.
- Background: An image containing a background for the object.
- Mask: A boolean image where pixels corresponding to the object are true.
A new image with the foreground object placed on the background can be obtained as follows:
ternaryFilter->SetInput1( maskImage );
ternaryFilter->SetInput2( foregroundImage );
ternaryFilter->SetInput3( backgroundImage );
Definition at line 67 of file itkTernaryOperatorImageFilter.h.
|
using | ConstPointer = SmartPointer< const Self > |
|
using | FunctorType = Functor::TernaryOperator< typename TMask::PixelType, typename TImage::PixelType, typename TImage::PixelType, typename TImage::PixelType > |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = TernaryOperatorImageFilter |
|
using | Superclass = TernaryGeneratorImageFilter< TMask, TImage, TImage, TImage > |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | ConstRefFunctionType = OutputImagePixelType(const Input1ImagePixelType &, const Input2ImagePixelType &, const Input3ImagePixelType &) |
|
using | DecoratedInput1ImagePixelType = SimpleDataObjectDecorator< Input1ImagePixelType > |
|
using | DecoratedInput2ImagePixelType = SimpleDataObjectDecorator< Input2ImagePixelType > |
|
using | DecoratedInput3ImagePixelType = SimpleDataObjectDecorator< Input3ImagePixelType > |
|
using | FunctionType = OutputImagePixelType(*)(const Input1ImagePixelType &, const Input2ImagePixelType &, const Input3ImagePixelType &) |
|
using | Input1ImagePixelType = typename Input1ImageType::PixelType |
|
using | Input1ImagePointer = typename Input1ImageType::ConstPointer |
|
using | Input1ImageRegionType = typename Input1ImageType::RegionType |
|
using | Input1ImageType = TMask |
|
using | Input2ImagePixelType = typename Input2ImageType::PixelType |
|
using | Input2ImagePointer = typename Input2ImageType::ConstPointer |
|
using | Input2ImageRegionType = typename Input2ImageType::RegionType |
|
using | Input2ImageType = TImage |
|
using | Input3ImagePixelType = typename Input3ImageType::PixelType |
|
using | Input3ImagePointer = typename Input3ImageType::ConstPointer |
|
using | Input3ImageRegionType = typename Input3ImageType::RegionType |
|
using | Input3ImageType = TImage |
|
using | OutputImagePixelType = typename OutputImageType::PixelType |
|
using | OutputImagePointer = typename OutputImageType::Pointer |
|
using | OutputImageRegionType = typename OutputImageType::RegionType |
|
using | OutputImageType = TImage |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = TernaryGeneratorImageFilter |
|
using | Superclass = InPlaceImageFilter< TMask, TImage > |
|
using | ValueFunctionType = OutputImagePixelType(Input1ImagePixelType, Input2ImagePixelType, Input3ImagePixelType) |
|
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 = TMask |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = InPlaceImageFilter |
|
using | Superclass = ImageToImageFilter< TMask, TImage > |
|
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 = TMask |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = ImageToImageFilter |
|
using | Superclass = ImageSource< TImage > |
|
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 = TImage |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = ImageSource |
|
using | Superclass = 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 |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = Object |
|
using | Superclass = LightObject |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = LightObject |
|
|
| TernaryOperatorImageFilter () |
|
| ~TernaryOperatorImageFilter () override=default |
|
void | GenerateOutputInformation () override |
|
| TernaryGeneratorImageFilter () |
|
| ~TernaryGeneratorImageFilter () override=default |
|
void | DynamicThreadedGenerateDataWithFunctor (const TFunctor &, const OutputImageRegionType &outputRegionForThread) |
|
void | DynamicThreadedGenerateData (const OutputImageRegionType &outputRegionForThread) override |
|
virtual bool | GetRunningInPlace () const |
|
| InPlaceImageFilter ()=default |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
void | ReleaseInputs () override |
|
| ~InPlaceImageFilter () override=default |
|
void | AllocateOutputs () override |
|
virtual void | CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion) |
|
virtual void | CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
|
void | GenerateInputRequestedRegion () override |
|
| ImageToImageFilter () |
|
void | VerifyInputInformation () const override |
|
| ~ImageToImageFilter () override=default |
|
virtual void | PushBackInput (const DataObject *input) |
|
virtual void | PushFrontInput (const DataObject *input) |
|
virtual void | AfterThreadedGenerateData () |
|
virtual void | BeforeThreadedGenerateData () |
|
void | ClassicMultiThread (ThreadFunctionType callbackFunction) |
|
void | GenerateData () override |
|
virtual const ImageRegionSplitterBase * | GetImageRegionSplitter () const |
|
| ImageSource () |
|
virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion) |
|
| ~ImageSource () override=default |
|
virtual void | ThreadedGenerateData (const OutputImageRegionType ®ion, ThreadIdType threadId) |
|
virtual bool | GetDynamicMultiThreading () const |
|
virtual void | SetDynamicMultiThreading (bool _arg) |
|
virtual void | DynamicMultiThreadingOn () |
|
virtual void | AddInput (DataObject *input) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
virtual void | AddOutput (DataObject *output) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
virtual void | CacheInputReleaseDataFlags () |
|
virtual void | GenerateOutputRequestedRegion (DataObject *output) |
|
DataObject * | GetInput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () const |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () const |
|
bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
|
bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
|
bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
|
DataObjectPointerArraySizeType | MakeIndexFromInputName (const DataObjectIdentifierType &name) const |
|
DataObjectPointerArraySizeType | MakeIndexFromOutputName (const DataObjectIdentifierType &name) const |
|
DataObjectIdentifierType | MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectIdentifierType | MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const |
|
| ProcessObject () |
|
virtual void | PropagateResetPipeline () |
|
virtual void | PushBackInput (const DataObject *input) |
|
virtual void | PushFrontInput (const DataObject *input) |
|
virtual void | RemoveInput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveInput (DataObjectPointerArraySizeType) |
|
virtual void | RemoveOutput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveOutput (DataObjectPointerArraySizeType idx) |
|
bool | RemoveRequiredInputName (const DataObjectIdentifierType &) |
|
virtual void | RestoreInputReleaseDataFlags () |
|
virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
|
virtual void | SetNthInput (DataObjectPointerArraySizeType idx, DataObject *input) |
|
virtual void | SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output) |
|
void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
|
void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
|
virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
|
virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
|
virtual void | SetOutput (const DataObjectIdentifierType &name, DataObject *output) |
|
virtual void | SetPrimaryInput (DataObject *object) |
|
virtual void | SetPrimaryOutput (DataObject *object) |
|
void | SetRequiredInputNames (const NameArray &) |
|
virtual void | VerifyPreconditions () const |
|
| ~ProcessObject () override |
|
DataObject * | GetInput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetInput (DataObjectPointerArraySizeType idx) const |
|
DataObject * | GetPrimaryInput () |
|
const DataObject * | GetPrimaryInput () const |
|
virtual void | SetPrimaryInputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryInputName () const |
|
DataObject * | GetOutput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetOutput (const DataObjectIdentifierType &key) const |
|
virtual void | SetPrimaryOutputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryOutputName () const |
|
DataObject * | GetOutput (DataObjectPointerArraySizeType i) |
|
const DataObject * | GetOutput (DataObjectPointerArraySizeType i) const |
|
DataObject * | GetPrimaryOutput () |
|
const DataObject * | GetPrimaryOutput () const |
|
virtual bool | GetThreaderUpdateProgress () const |
|
virtual void | ThreaderUpdateProgressOn () |
|
virtual void | SetThreaderUpdateProgress (bool arg) |
|
| Object () |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
|
| ~Object () override |
|
virtual LightObject::Pointer | InternalClone () const |
|
| LightObject () |
|
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
|
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
|
virtual | ~LightObject () |
|