Orfeo Toolbox  4.0
otbModulusAndDirectionImageToImageFilter.txx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef __otbModulusAndDirectionImageToImageFilter_txx
19 #define __otbModulusAndDirectionImageToImageFilter_txx
20 
22 #include "itkProcessObject.h"
23 
24 namespace otb
25 {
26 
30 template <class TInputImage, class TOutputImage, class TOutputImageDirection>
33 {
34  this->SetNumberOfRequiredInputs(2);
35  this->SetNumberOfRequiredInputs(2);
36  this->SetNumberOfRequiredOutputs(1);
37  this->SetNumberOfRequiredOutputs(1);
38 
39  this->SetNthOutput(0, OutputImageType::New());
40 }
41 
42 template <class TInputImage, class TInputImageDirection, class TOutputImage>
43 void
45 SetInput(const InputImageType *input)
46 {
47  // Process object is not const-correct so the const_cast is required here
49  const_cast<InputImageType *>(input));
50 }
51 
52 template <class TInputImage, class TInputImageDirection, class TOutputImage>
53 void
56 {
57  // Process object is not const-correct so the const_cast is required here
59  const_cast<InputImageDirectionType *>(direction));
60 }
61 
63 template <class TInputImage, class TInputImageDirection, class TOutputImage>
66 GetInput(void)
67 {
68  if (this->GetNumberOfInputs() < 1)
69  {
70  return 0;
71  }
72 
73  return static_cast<const TInputImage *>
75 }
76 
78 template <class TInputImage, class TInputImageDirection, class TOutputImage>
79 const typename ModulusAndDirectionImageToImageFilter<TInputImage, TInputImageDirection,
80  TOutputImage>::InputImageDirectionType *
83 {
84  if (this->GetNumberOfInputs() < 2)
85  {
86  return 0;
87  }
88 
89  return static_cast<const TInputImageDirection *>
91 
92 }
93 
97 template <class TInputImage, class TInputImageDirection, class TOutputImage>
98 void
100 PrintSelf(std::ostream& os, itk::Indent indent) const
101 {
102  Superclass::PrintSelf(os, indent);
103 
104 }
105 
106 } // end namespace otb
107 
108 #endif

Generated at Sat Mar 8 2014 16:08:13 for Orfeo Toolbox with doxygen 1.8.3.1