ITK  5.4.0
Insight Toolkit
itkCheckerBoardImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkCheckerBoardImageFilter_h
19#define itkCheckerBoardImageFilter_h
20
22
23namespace itk
24{
45template <typename TImage>
46class ITK_TEMPLATE_EXPORT CheckerBoardImageFilter : public ImageToImageFilter<TImage, TImage>
47{
48public:
49 ITK_DISALLOW_COPY_AND_MOVE(CheckerBoardImageFilter);
50
57 using InputImageType = TImage;
58 using OutputImageType = TImage;
62
64 itkNewMacro(Self);
65
67 itkOverrideGetNameOfClassMacro(CheckerBoardImageFilter);
68
70 static constexpr unsigned int ImageDimension = TImage::ImageDimension;
71
74
76 void
77 SetInput1(const TImage * image1);
78
80 void
81 SetInput2(const TImage * image2);
82
85 itkSetMacro(CheckerPattern, PatternArrayType);
86 itkGetConstReferenceMacro(CheckerPattern, PatternArrayType);
89protected:
91 ~CheckerBoardImageFilter() override = default;
92 void
93 PrintSelf(std::ostream & os, Indent indent) const override;
94
103 void
104 DynamicThreadedGenerateData(const ImageRegionType & outputRegionForThread) override;
105
106
107private:
108 PatternArrayType m_CheckerPattern{};
109};
110} // end namespace itk
111
112#ifndef ITK_MANUAL_INSTANTIATION
113# include "itkCheckerBoardImageFilter.hxx"
114#endif
115
116#endif
Combines two images in a checkerboard pattern.
typename OutputImageType::Pointer OutputImagePointer
typename InputImageType::ConstPointer InputImageConstPointer
typename OutputImageType::RegionType ImageRegionType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....