ITK  4.2.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,
74 
76  void SetInput1(const TImage *image1);
77 
79  void SetInput2(const TImage *image2);
80 
82  itkSetMacro(CheckerPattern, PatternArrayType);
83  itkGetConstReferenceMacro(CheckerPattern, PatternArrayType);
84 protected:
87  void PrintSelf(std::ostream & os, Indent indent) const;
89 
98  void ThreadedGenerateData(const ImageRegionType & outputRegionForThread,
99  ThreadIdType threadId);
100 
101 private:
102  CheckerBoardImageFilter(const Self &); //purposely not implemented
103  void operator=(const Self &); //purposely not implemented
104 
106 };
107 } // end namespace itk
108 
109 #ifndef ITK_MANUAL_INSTANTIATION
110 #include "itkCheckerBoardImageFilter.hxx"
111 #endif
112 
113 #endif
114