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 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
45 template <typename TImage>
46 class ITK_TEMPLATE_EXPORT CheckerBoardImageFilter : public ImageToImageFilter<TImage, TImage>
47 {
48 public:
49  ITK_DISALLOW_COPY_AND_MOVE(CheckerBoardImageFilter);
50 
56 
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);
89 protected:
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 
107 private:
108  PatternArrayType m_CheckerPattern{};
109 };
110 } // end namespace itk
111 
112 #ifndef ITK_MANUAL_INSTANTIATION
113 # include "itkCheckerBoardImageFilter.hxx"
114 #endif
115 
116 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::CheckerBoardImageFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkCheckerBoardImageFilter.h:59
itk::CheckerBoardImageFilter::ImageRegionType
typename OutputImageType::RegionType ImageRegionType
Definition: itkCheckerBoardImageFilter.h:61
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::CheckerBoardImageFilter::InputImageType
TImage InputImageType
Definition: itkCheckerBoardImageFilter.h:57
itk::CheckerBoardImageFilter
Combines two images in a checkerboard pattern.
Definition: itkCheckerBoardImageFilter.h:46
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::CheckerBoardImageFilter::OutputImageType
TImage OutputImageType
Definition: itkCheckerBoardImageFilter.h:58
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::CheckerBoardImageFilter::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkCheckerBoardImageFilter.h:60
itkImageToImageFilter.h
itk::FixedArray< unsigned int, TImage::ImageDimension >
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24