Orfeo Toolbox  3.16
itkPathAndImageToPathFilter.txx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkPathAndImageToPathFilter.txx,v $
5  Language: C++
6  Date: $Date: 2004-05-03 16:58:49 $
7  Version: $Revision: 1.3 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef __itkPathAndImageToPathFilter_txx
19 #define __itkPathAndImageToPathFilter_txx
20 
22 
23 
24 namespace itk
25 {
26 
30 template <class TInputPath, class TInputImage, class TOutputPath>
33 {
34  // Modify superclass default values, can be overridden by subclasses
35  this->SetNumberOfRequiredInputs(2);
36 }
37 
41 template <class TInputPath, class TInputImage, class TOutputPath>
42 void
45 {
46  // We have 2 inputs: a path and an image
47 
48  // Process object is not const-correct so the const_cast is required here
50  const_cast< InputPathType * >( path ) );
51 }
52 
53 template <class TInputPath, class TInputImage, class TOutputPath>
57 {
58  if (this->GetNumberOfInputs() < 1)
59  {
60  return 0;
61  }
62 
63  return static_cast<const TInputPath * >
64  (this->ProcessObject::GetInput(0) );
65 }
66 
67 template <class TInputPath, class TInputImage, class TOutputPath>
68 void
71 {
72  // We have 2 inputs: a path and an image
73 
74  // Process object is not const-correct so the const_cast is required here
76  const_cast< InputImageType * >( image ) );
77 }
78 
79 template <class TInputPath, class TInputImage, class TOutputPath>
83 {
84  if (this->GetNumberOfInputs() < 2)
85  {
86  return 0;
87  }
88 
89  return static_cast<const TInputImage * >
90  (this->ProcessObject::GetInput(1) );
91 }
92 
96 template <class TInputPath, class TInputImage, class TOutputPath>
97 void
100 {
101  // ProcessObject::GenerateInputRequestedRegion() will (for each input) call
102  // Path::SetRequestedRegionToLargestPossibleRegion(), which is empty.
103  Superclass::GenerateInputRequestedRegion();
104 }
105 
109 template <class TInputPath, class TInputImage, class TOutputPath>
110 void
112 ::PrintSelf(std::ostream& os, Indent indent) const
113 {
114  Superclass::PrintSelf(os, indent);
115 }
116 
117 
118 } // end namespace itk
119 
120 #endif

Generated at Sat Jun 15 2013 23:59:42 for Orfeo Toolbox with doxygen 1.8.3.1