ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkDerivativeImageFilter.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 __itkDerivativeImageFilter_h
19 #define __itkDerivativeImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
47 template< class TInputImage, class TOutputImage >
48 class ITK_EXPORT DerivativeImageFilter:
49  public ImageToImageFilter< TInputImage, TOutputImage >
50 {
51 public:
57 
60  typedef typename TOutputImage::PixelType OutputPixelType;
61  typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
62  typedef typename TInputImage::PixelType InputPixelType;
63  typedef typename TInputImage::InternalPixelType InputInternalPixelType;
64 
67  itkStaticConstMacro(ImageDimension, unsigned int,
68  TOutputImage::ImageDimension);
69 
71  typedef TInputImage InputImageType;
72  typedef TOutputImage OutputImageType;
73 
75  itkNewMacro(Self);
76 
79 
81 #ifdef ITK_USE_CONCEPT_CHECKING
82 
84  itkConceptMacro( SignedOutputPixelType,
86 
88 #endif
89 
91  itkSetMacro(Order, unsigned int);
92  itkGetConstMacro(Order, unsigned int);
93  itkSetMacro(Direction, unsigned int);
94  itkGetConstMacro(Direction, unsigned int);
96 
99  void SetUseImageSpacingOn()
100  { this->SetUseImageSpacing(true); }
101 
104  void SetUseImageSpacingOff()
105  { this->SetUseImageSpacing(false); }
106 
109  itkSetMacro(UseImageSpacing, bool);
110  itkGetConstMacro(UseImageSpacing, bool);
112 
120  virtual void GenerateInputRequestedRegion()
122 
123 protected:
125  {
126  m_Order = 1;
127  m_Direction = 0;
128  m_UseImageSpacing = true;
129  }
130 
132  void PrintSelf(std::ostream & os, Indent indent) const;
133 
139  void GenerateData();
140 
141 private:
142  DerivativeImageFilter(const Self &); //purposely not implemented
143  void operator=(const Self &); //purposely not implemented
144 
146  unsigned int m_Order;
147 
149  unsigned int m_Direction;
150 
152 };
153 } // end namespace itk
154 
155 #ifndef ITK_MANUAL_INSTANTIATION
156 #include "itkDerivativeImageFilter.hxx"
157 #endif
158 
159 #endif
160