ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkCheckerBoardImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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 {
44 template< typename TImage >
46  public ImageToImageFilter< TImage, TImage >
47 {
48 public:
54 
55  typedef TImage InputImageType;
56  typedef TImage OutputImageType;
57  typedef typename InputImageType::ConstPointer InputImageConstPointer;
58  typedef typename OutputImageType::Pointer OutputImagePointer;
59  typedef typename OutputImageType::RegionType ImageRegionType;
60 
62  itkNewMacro(Self);
63 
66 
68  itkStaticConstMacro(ImageDimension, unsigned int,
69  TImage::ImageDimension);
70 
72  typedef FixedArray< unsigned int,
73  TImage ::ImageDimension > PatternArrayType;
74 
76  void SetInput1(const TImage *image1);
77 
79  void SetInput2(const TImage *image2);
80 
82  itkSetMacro(CheckerPattern, PatternArrayType);
83  itkGetConstReferenceMacro(CheckerPattern, PatternArrayType);
85 
86 protected:
89  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
90 
99  void ThreadedGenerateData(const ImageRegionType & outputRegionForThread,
100  ThreadIdType threadId) ITK_OVERRIDE;
101 
102 private:
103  CheckerBoardImageFilter(const Self &); //purposely not implemented
104  void operator=(const Self &); //purposely not implemented
105 
107 };
108 } // end namespace itk
109 
110 #ifndef ITK_MANUAL_INSTANTIATION
111 #include "itkCheckerBoardImageFilter.hxx"
112 #endif
113 
114 #endif
void ThreadedGenerateData(const ImageRegionType &outputRegionForThread, ThreadIdType threadId) override
Light weight base class for most itk classes.
InputImageType::ConstPointer InputImageConstPointer
void PrintSelf(std::ostream &os, Indent indent) const override
FixedArray< unsigned int, TImage::ImageDimension > PatternArrayType
SmartPointer< const Self > ConstPointer
Simulate a standard C array with copy semnatics.
Definition: itkFixedArray.h:50
void operator=(const Self &)
Combines two images in a checkerboard pattern.
OutputImageType::Pointer OutputImagePointer
void SetInput1(const TImage *image1)
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
static const unsigned int ImageDimension
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ImageToImageFilter< TImage, TImage > Superclass
void SetInput2(const TImage *image2)
OutputImageType::RegionType ImageRegionType