Orfeo Toolbox
3.16
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
OTB
Code
Fuzzy
otbVectorDataToSpecificDescriptionFilterBase.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 __otbVectorDataToSpecificDescriptionFilterBase_txx
19
#define __otbVectorDataToSpecificDescriptionFilterBase_txx
20
21
#include "
otbVectorDataToSpecificDescriptionFilterBase.h
"
22
23
namespace
otb
24
{
25
26
// Constructor
27
template
<
class
TVectorData>
28
VectorDataToSpecificDescriptionFilterBase<TVectorData>
29
::VectorDataToSpecificDescriptionFilterBase
()
30
{
31
this->SetNumberOfRequiredInputs(1);
32
}
33
34
template
<
class
TVectorData>
35
void
36
VectorDataToSpecificDescriptionFilterBase<TVectorData>
37
::AddSupport
(
const
DataObject
* support,
unsigned
int
idx)
38
{
39
// Process object is not const-correct so the const_cast is required here
40
// input(0) is dedicated to the input vector data, support #i is
41
// stored in input(i+1)
42
this->
itk::ProcessObject::SetNthInput
(idx+1,
43
const_cast<DataObject *>(support));
44
}
45
46
template
<
class
TVectorData>
47
const
typename
VectorDataToSpecificDescriptionFilterBase<TVectorData>
48
::DataObject *
49
VectorDataToSpecificDescriptionFilterBase<TVectorData>
50
::GetSupport
(
unsigned
int
idx)
51
{
52
if
(this->GetNumberOfInputs() < idx+2)
53
{
54
return
0;
55
}
56
57
return
static_cast<
const
DataObject
*
>
58
(this->
itk::ProcessObject::GetInput
(idx+1));
59
}
60
61
// PrintSelf Method
62
template
<
class
TVectorData>
63
void
64
VectorDataToSpecificDescriptionFilterBase<TVectorData>
65
::PrintSelf
(std::ostream& os,
itk::Indent
indent)
const
66
{
67
Superclass::PrintSelf(os, indent);
68
os<<indent<<
"Number of Support: "
<<(int)(this->GetNumberOfInputs())-1<<std::endl;
69
}
70
71
}
// end namespace otb
72
73
#endif
Generated at Sun Feb 3 2013 00:54:21 for
Orfeo Toolbox
with
doxygen 1.8.1.1