ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkDifferenceImageFilter.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 __itkDifferenceImageFilter_h
19 #define __itkDifferenceImageFilter_h
20 
21 #include "itkConfigure.h" //Needed to determine value of ITKV3_COMPATIBILITY
22 #ifdef ITKV3_COMPATIBILITY
23 
25 
26 namespace itk
27 {
35 template< class TInputImage, class TOutputImage >
36 class ITK_EXPORT DifferenceImageFilter:
37  public Testing::ComparisonImageFilter< TInputImage, TOutputImage >
38 {
39 public:
41  typedef DifferenceImageFilter Self;
42  typedef Testing::ComparisonImageFilter< TInputImage, TOutputImage > Superclass;
43  typedef SmartPointer< Self > Pointer;
44  typedef SmartPointer< const Self > ConstPointer;
45 
47  itkNewMacro(Self);
48 
50  itkTypeMacro(DifferenceImageFilter, Testing::ComparisonImageFilter);
51 
53  typedef TInputImage InputImageType;
54  typedef TOutputImage OutputImageType;
55  typedef typename OutputImageType::PixelType OutputPixelType;
56  typedef typename OutputImageType::RegionType OutputImageRegionType;
57  typedef typename NumericTraits< OutputPixelType >::RealType RealType;
58  typedef typename NumericTraits< RealType >::AccumulateType AccumulateType;
59 
60  DifferenceImageFilter() {}
61  virtual ~DifferenceImageFilter() {}
62 protected:
63 private:
64  DifferenceImageFilter(const Self &); //purposely not implemented
65  void operator=(const Self &); //purposely not implemented
66 
67 };
68 } // end namespace itk
69 #else
70 #error For ITKv4 compatibility, use itk::Testing::ComparisonImageFilter instead of itk::DifferenceImageFilter
71 #endif
72 
73 #endif
74