ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkHigherOrderAccurateGradientImageFilter.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 itkHigherOrderAccurateGradientImageFilter_h
19 #define itkHigherOrderAccurateGradientImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkCovariantVector.h"
23 
24 namespace itk
25 {
26 
53 template< class TInputImage, class TOperatorValueType = float,
54  class TOutputValueType = float >
56  Image< CovariantVector< TOutputValueType, TInputImage::ImageDimension >, TInputImage::ImageDimension > >
57 {
58 public:
60  itkStaticConstMacro(ImageDimension, unsigned int,
61  TInputImage::ImageDimension);
62 
65 
67  typedef TInputImage InputImageType;
68  typedef typename InputImageType::Pointer InputImagePointer;
69  typedef Image< CovariantVector<
70  TOutputValueType, itkGetStaticConstMacro(OutputImageDimension) >,
71  itkGetStaticConstMacro(OutputImageDimension) >
75 
80 
82  itkNewMacro(Self);
83 
86 
88  typedef typename InputImageType::PixelType InputPixelType;
89  typedef TOperatorValueType OperatorValueType;
90  typedef TOutputValueType OutputValueType;
91  typedef CovariantVector<
92  OutputValueType, itkGetStaticConstMacro(OutputImageDimension) >
95 
98  itkSetMacro(UseImageSpacing, bool);
99  itkGetConstMacro(UseImageSpacing, bool);
100  itkBooleanMacro(UseImageSpacing);
102 
103 #ifdef ITK_USE_CONCEPT_CHECKING
104 
105  itkConceptMacro( InputConvertibleToOutputCheck,
107  itkConceptMacro( OutputHasNumericTraitsCheck,
109 
111 #endif
112 
123  itkSetMacro(UseImageDirection, bool);
124  itkGetConstMacro(UseImageDirection, bool);
125  itkBooleanMacro(UseImageDirection);
127 
130  itkSetMacro( OrderOfAccuracy, unsigned int );
131  itkGetConstMacro( OrderOfAccuracy, unsigned int )
132 
133 protected:
136  virtual void PrintSelf(std::ostream & os, Indent indent) const;
137 
144  virtual void GenerateInputRequestedRegion();
145 
156  virtual void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE;
157 
158 private:
159  HigherOrderAccurateGradientImageFilter( const Self & ); // purposely not implemented
160  void operator=( const Self & ); // purposely not implemented
161 
163 
164  // flag to take or not the image direction into account
165  // when computing the derivatives.
167 
168  unsigned int m_OrderOfAccuracy;
169 };
170 
171 } // end namespace itk
172 
173 #ifndef ITK_MANUAL_INSTANTIATION
174 #include "itkHigherOrderAccurateGradientImageFilter.hxx"
175 #endif
176 
177 #endif
Superclass::RegionType RegionType
Definition: itkImage.h:140
Light weight base class for most itk classes.
ImageToImageFilter< InputImageType, OutputImageType > Superclass
Calculate the image gradient from a higher order accurate central-difference derivative kernel...
Image< CovariantVector< TOutputValueType, itkGetStaticConstMacro(OutputImageDimension) >, itkGetStaticConstMacro(OutputImageDimension) > OutputImageType
CovariantVector< OutputValueType, itkGetStaticConstMacro(OutputImageDimension) > OutputPixelType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
virtual void PrintSelf(std::ostream &os, Indent indent) const
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
A templated class holding a n-Dimensional covariant vector.
virtual void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
Templated n-dimensional image class.
Definition: itkImage.h:75