ITK  4.6.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< typename TInputImage, typename TOutputImage >
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  // Begin concept checking
83  itkConceptMacro( SignedOutputPixelType,
85  // End concept checking
86 #endif
87 
89  itkSetMacro(Order, unsigned int);
90  itkGetConstMacro(Order, unsigned int);
91  itkSetMacro(Direction, unsigned int);
92  itkGetConstMacro(Direction, unsigned int);
94 
98  { this->SetUseImageSpacing(true); }
99 
103  { this->SetUseImageSpacing(false); }
104 
107  itkSetMacro(UseImageSpacing, bool);
108  itkGetConstMacro(UseImageSpacing, bool);
110 
118  virtual void GenerateInputRequestedRegion();
119 
120 protected:
122  {
123  m_Order = 1;
124  m_Direction = 0;
125  m_UseImageSpacing = true;
126  }
127 
129  void PrintSelf(std::ostream & os, Indent indent) const;
130 
136  void GenerateData();
137 
138 private:
139  DerivativeImageFilter(const Self &); //purposely not implemented
140  void operator=(const Self &); //purposely not implemented
141 
143  unsigned int m_Order;
144 
146  unsigned int m_Direction;
147 
149 };
150 } // end namespace itk
151 
152 #ifndef ITK_MANUAL_INSTANTIATION
153 #include "itkDerivativeImageFilter.hxx"
154 #endif
155 
156 #endif
SmartPointer< const Self > ConstPointer
ImageToImageFilter< TInputImage, TOutputImage > Superclass
virtual void GenerateInputRequestedRegion()
static const unsigned int ImageDimension
TInputImage::InternalPixelType InputInternalPixelType
Base class for all process objects that output image data.
void operator=(const Self &)
virtual void SetUseImageSpacing(bool _arg)
void PrintSelf(std::ostream &os, Indent indent) const
Base class for filters that take an image as input and produce an image as output.
TInputImage::PixelType InputPixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
TOutputImage::InternalPixelType OutputInternalPixelType
#define itkConceptMacro(name, concept)
Computes the directional derivative of an image. The directional derivative at each pixel location is...
TOutputImage::PixelType OutputPixelType