ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkContourDirectedMeanDistanceImageFilter.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 __itkContourDirectedMeanDistanceImageFilter_h
19 #define __itkContourDirectedMeanDistanceImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkNumericTraits.h"
23 #include "itkArray.h"
24 #include "itkImage.h"
25 
26 namespace itk
27 {
65 template< class TInputImage1, class TInputImage2 >
67  public ImageToImageFilter< TInputImage1, TInputImage1 >
68 {
69 public:
75 
77  itkNewMacro(Self);
78 
81 
83  typedef TInputImage1 InputImage1Type;
84  typedef TInputImage2 InputImage2Type;
85  typedef typename TInputImage1::Pointer InputImage1Pointer;
86  typedef typename TInputImage2::Pointer InputImage2Pointer;
87  typedef typename TInputImage1::ConstPointer InputImage1ConstPointer;
88  typedef typename TInputImage2::ConstPointer InputImage2ConstPointer;
89 
90  typedef typename TInputImage1::RegionType RegionType;
91  typedef typename TInputImage1::SizeType SizeType;
92  typedef typename TInputImage1::IndexType IndexType;
93 
94  typedef typename TInputImage1::PixelType InputImage1PixelType;
95  typedef typename TInputImage2::PixelType InputImage2PixelType;
96 
98  itkStaticConstMacro(ImageDimension, unsigned int,
99  TInputImage1::ImageDimension);
100 
103 
105  void SetInput1(const InputImage1Type *image);
106 
108  void SetInput2(const InputImage2Type *image);
109 
111  const InputImage1Type * GetInput1(void);
112 
114  const InputImage2Type * GetInput2(void);
115 
117  itkGetConstMacro(ContourDirectedMeanDistance, RealType);
118 
120  itkSetMacro( UseImageSpacing, bool );
121  itkGetConstMacro( UseImageSpacing, bool );
123 
124 #ifdef ITK_USE_CONCEPT_CHECKING
125 
126  itkConceptMacro( InputHasNumericTraitsCheck,
128 
130 #endif
131 
132 protected:
135  void PrintSelf(std::ostream & os, Indent indent) const;
136 
139  void AllocateOutputs();
140 
142  void BeforeThreadedGenerateData();
143 
146  void AfterThreadedGenerateData();
147 
149  void ThreadedGenerateData(const RegionType &
150  outputRegionForThread,
151  ThreadIdType threadId);
152 
153  // Override since the filter needs all the data for the algorithm
154  void GenerateInputRequestedRegion();
155 
156  // Override since the filter produces all of its output
157  void EnlargeOutputRequestedRegion(DataObject *data);
158 
159 private:
160  ContourDirectedMeanDistanceImageFilter(const Self &); //purposely not
161  // implemented
162  void operator=(const Self &); //purposely not
163 
164  // implemented
165 
167 
169 
174 }; // end of class
175 } // end namespace itk
176 
177 #ifndef ITK_MANUAL_INSTANTIATION
178 #include "itkContourDirectedMeanDistanceImageFilter.hxx"
179 #endif
180 
181 #endif
182