18#ifndef itkBinaryGeneratorImageFilter_h
19#define itkBinaryGeneratorImageFilter_h
55template <
typename TInputImage1,
typename TInputImage2,
typename TOutputImage>
130 this->SetConstant2(ct);
132 const Input2ImagePixelType &
135 return this->GetConstant2();
141 virtual const Input2ImagePixelType &
144#if !defined(ITK_WRAPPING_PARSER)
153 m_DynamicThreadedGenerateDataFunction = [
this, f](
const OutputImageRegionType & outputRegionForThread) {
154 return this->DynamicThreadedGenerateDataWithFunctor(f, outputRegionForThread);
164 m_DynamicThreadedGenerateDataFunction = [
this, f](
const OutputImageRegionType & outputRegionForThread) {
165 return this->DynamicThreadedGenerateDataWithFunctor(f, outputRegionForThread);
178 m_DynamicThreadedGenerateDataFunction = [
this, funcPointer](
const OutputImageRegionType & outputRegionForThread) {
179 return this->DynamicThreadedGenerateDataWithFunctor(funcPointer, outputRegionForThread);
188 m_DynamicThreadedGenerateDataFunction = [
this, funcPointer](
const OutputImageRegionType & outputRegionForThread) {
189 return this->DynamicThreadedGenerateDataWithFunctor(funcPointer, outputRegionForThread);
204 template <
typename TFunctor>
209 m_DynamicThreadedGenerateDataFunction = [
this, functor](
const OutputImageRegionType & outputRegionForThread) {
210 return this->DynamicThreadedGenerateDataWithFunctor(functor, outputRegionForThread);
220 static constexpr unsigned int InputImage1Dimension = TInputImage1::ImageDimension;
221 static constexpr unsigned int InputImage2Dimension = TInputImage2::ImageDimension;
222 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
224#ifdef ITK_USE_CONCEPT_CHECKING
246 template <
typename TFunctor>
254 this->UpdateProgress(1.0);
268#ifndef ITK_MANUAL_INSTANTIATION
269# include "itkBinaryGeneratorImageFilter.hxx"
Implements pixel-wise generic operation of two images, or of an image and a constant.
typename Input2ImageType::PixelType Input2ImagePixelType
OutputImagePixelType(Input1ImagePixelType, Input2ImagePixelType) ValueFunctionType
BinaryGeneratorImageFilter()
TInputImage2 Input2ImageType
virtual const Input2ImagePixelType & GetConstant2() const
virtual void SetInput1(const DecoratedInput1ImagePixelType *input1)
typename Input1ImageType::ConstPointer Input1ImagePointer
OutputImagePixelType(*)(const Input1ImagePixelType &, const Input2ImagePixelType &) FunctionType
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
void SetConstant(Input2ImagePixelType ct)
void DynamicThreadedGenerateDataWithFunctor(const TFunctor &, const OutputImageRegionType &outputRegionForThread)
typename Input2ImageType::ConstPointer Input2ImagePointer
virtual void SetInput2(const DecoratedInput2ImagePixelType *input2)
virtual void SetConstant1(const Input1ImagePixelType &input1)
void AfterThreadedGenerateData() override
virtual void SetInput2(const TInputImage2 *image2)
void SetFunctor(const TFunctor &functor)
~BinaryGeneratorImageFilter() override=default
virtual void SetConstant2(const Input2ImagePixelType &input2)
virtual void SetInput1(const Input1ImagePixelType &input1)
typename Input1ImageType::RegionType Input1ImageRegionType
virtual const Input1ImagePixelType & GetConstant1() const
void SetFunctor(ValueFunctionType *funcPointer)
void SetFunctor(const std::function< ValueFunctionType > &f)
void GenerateOutputInformation() override
TInputImage1 Input1ImageType
OutputImagePixelType(const Input1ImagePixelType &, const Input2ImagePixelType &) ConstRefFunctionType
virtual void SetInput2(const Input2ImagePixelType &input2)
typename Input1ImageType::PixelType Input1ImagePixelType
typename Input2ImageType::RegionType Input2ImageRegionType
void SetFunctor(const std::function< ConstRefFunctionType > &f)
virtual void SetInput1(const TInputImage1 *image1)
const Input2ImagePixelType & GetConstant() const
void SetFunctor(ConstRefFunctionType *funcPointer)
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename OutputImageType::Pointer OutputImagePointer
Base class for filters that take an image as input and overwrite that image as the output.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
ImageBaseType::RegionType RegionType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....