Orfeo Toolbox  3.16
itkImageAndPathToImageFilter.txx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkImageAndPathToImageFilter.txx,v $
5  Language: C++
6  Date: $Date: 2004-05-03 16:58:49 $
7  Version: $Revision: 1.5 $
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 __itkImageAndPathToImageFilter_txx
19 #define __itkImageAndPathToImageFilter_txx
20 
22 
23 
24 namespace itk
25 {
26 
30 template <class TInputImage, class TInputPath, class TOutputImage>
33 {
34  // Modify superclass default values, can be overridden by subclasses
35  this->SetNumberOfRequiredInputs(2);
36 }
37 
41 template <class TInputImage, class TInputPath, class TOutputImage>
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< InputImageType * >( image ) );
51 }
52 
53 template <class TInputImage, class TInputPath, class TOutputImage>
57 {
58  if (this->GetNumberOfInputs() < 1)
59  {
60  return 0;
61  }
62 
63  return static_cast<const TInputImage * >
64  (this->ProcessObject::GetInput(0) );
65 }
66 
67 template <class TInputImage, class TInputPath, class TOutputImage>
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< InputPathType * >( path ) );
77 }
78 
79 template <class TInputImage, class TInputPath, class TOutputImage>
83 {
84  if (this->GetNumberOfInputs() < 2)
85  {
86  return 0;
87  }
88 
89  return static_cast<const TInputPath * >
90  (this->ProcessObject::GetInput(1) );
91 }
92 
96 template <class TInputImage, class TInputPath, class TOutputImage>
97 void
99 ::PrintSelf(std::ostream& os, Indent indent) const
100 {
101  Superclass::PrintSelf(os, indent);
102 }
103 
104 
105 } // end namespace itk
106 
107 #endif

Generated at Sat Feb 2 2013 23:42:40 for Orfeo Toolbox with doxygen 1.8.1.1