You are here: Start » Function Reference » All Functions » Conditional Processing » MakeConditional
This is Filter Equivalent. This function may be present in generated code, but should not be used in hand-written code.
Header: | STD.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Checks a condition and: if the condition is True, then it copies the input object to the output; otherwise returns Nil.
Applications: Introduces conditional data flow on a condition defined by the user. This filter can be used to skip some parts of the program - e.g. when a detected object does not fulfill some quality criteria.
Syntax
void fil::MakeConditional ( const Type& inObject, const bool inCondition, typename ftl::ToConditionalType<Type>::Type& outConditionalObject )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inObject | const Type& | The data to be conditionally passed onto the output or not | |
![]() |
inCondition | const bool | Determines whether the data is passed onto the output or not | |
![]() |
outConditionalObject | typename ToConditionalType<Type>::Type& | The object if the condition is met or nothing otherwise |
Description
This function is a part of Conditional Execution technique in FabImage Studio and should not be used in FabImage Library. This functionality can be achieved using the "if" statement
Hints
- This filter creates a full copy of the input object. Thus, if you need the highest possible speed, use this filter only with primitive types. An alternative is to use Variant Step macrofilters which are fast and elegant.
Examples
![]() |
![]() |
inObject = 5 inCondition = True |
outConditionalObject = 5 |
inObject = 5 inCondition = False |
outConditionalObject = Nil |
Remarks
This filter can be replaced with the following formula:

See Also
- MergeDefault – Copies an object from a conditional input to an non-conditional output, replacing Nil with a predefined default value.