ITK  4.4.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< class TImage >
45 class ITK_EXPORT CheckerBoardImageFilter:
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;
90 
99  void ThreadedGenerateData(const ImageRegionType & outputRegionForThread,
100  ThreadIdType threadId);
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
115