Orfeo Toolbox
3.16
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
OTB
Code
Learning
otbROIdataConversion.h
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
Copyright (c) GET / ENST Bretagne. All rights reserved.
13
See GETCopyright.txt for details.
14
15
This software is distributed WITHOUT ANY WARRANTY; without even
16
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
17
PURPOSE. See the above copyright notices for more information.
18
19
=========================================================================*/
20
21
#ifndef __otbROIdataConversion_h
22
#define __otbROIdataConversion_h
23
24
#include <vector>
25
#include "
otbImage.h
"
26
#include "
itkImageToImageFilter.h
"
27
28
namespace
otb
29
{
30
37
template
<
class
TInputImage,
class
TInputROIImage>
38
class
ROIdataConversion
39
:
public
itk::ImageToImageFilter
<TInputImage, otb::Image<typename TInputImage::PixelType, 1> >
40
{
41
public
:
42
typedef
ROIdataConversion
Self
;
43
typedef
itk::ImageToImageFilter<TInputImage, otb::Image<typename TInputImage::PixelType, 1>
>
Superclass
;
44
typedef
itk::SmartPointer<Self>
Pointer
;
45
typedef
itk::SmartPointer<const Self>
ConstPointer
;
46
47
itkNewMacro(
Self
);
48
itkTypeMacro(
ROIdataConversion
,
itk::ImageToImageFilter
);
49
50
typedef
TInputImage
InputImageType
;
51
typedef
typename
TInputImage::PixelType
InputImagePixelType
;
52
typedef
typename
TInputImage::Pointer
InputImagePointerType
;
53
typedef
TInputROIImage
InputROIImageType
;
54
typedef
typename
TInputROIImage::Pointer
InputROIImagePointerType
;
55
typedef
typename
Superclass::OutputImageType
OutputImageType
;
56
typedef
typename
OutputImageType::Pointer
OutputImagePointerType
;
57
58
typedef
typename
OutputImageType::SizeType::SizeValueType
SizeValueType
;
59
61
const
InputImageType
*
GetInputImage
()
62
{
63
return
this->
Superclass::GetInput
();
64
}
65
void
SetInputImage
(
const
InputImageType
* img)
66
{
67
this->
Superclass::SetInput
(img);
68
}
69
71
InputROIImageType
*
GetROIImage
()
72
{
73
return
static_cast<
InputROIImageType
*
>
(this->
itk::ProcessObject::GetInput
(1));
74
}
75
void
SetROIImage
(
const
InputROIImageType
* img)
76
{
77
this->
itk::ProcessObject::SetNthInput
(1, const_cast<InputROIImageType *>(img));
78
}
79
80
protected
:
81
ROIdataConversion
();
82
virtual
~ROIdataConversion
() {}
83
virtual
void
GenerateOutputInformation
();
84
virtual
void
GenerateInputRequestedRegion
();
85
void
PrintSelf
(std::ostream& os,
itk::Indent
indent)
const
86
{
87
Superclass::PrintSelf
(os, indent);
88
}
89
91
virtual
void
GenerateData
();
92
94
SizeValueType
GetNumberOfSample
();
95
};
96
97
}
// end of namespace otb
98
99
#ifndef OTB_MANUAL_INSTANTIATION
100
#include "
otbROIdataConversion.txx
"
101
#endif
102
103
#endif
Generated at Sun May 19 2013 00:47:14 for
Orfeo Toolbox
with
doxygen 1.8.3.1