Orfeo Toolbox
3.16
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
OTB
Code
Common
otbRAMDrivenTiledStreamingManager.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 __otbRAMDrivenTiledStreamingManager_txx
19
#define __otbRAMDrivenTiledStreamingManager_txx
20
21
#include "
otbRAMDrivenTiledStreamingManager.h
"
22
#include "
otbMacro.h
"
23
#include "
otbImageRegionSquareTileSplitter.h
"
24
25
namespace
otb
26
{
27
28
template
<
class
TImage>
29
RAMDrivenTiledStreamingManager<TImage>::RAMDrivenTiledStreamingManager
()
30
: m_AvailableRAMInMB(0),
31
m_Bias(1.0)
32
{
33
}
34
35
template
<
class
TImage>
36
RAMDrivenTiledStreamingManager<TImage>::~RAMDrivenTiledStreamingManager
()
37
{
38
}
39
40
template
<
class
TImage>
41
void
42
RAMDrivenTiledStreamingManager<TImage>::PrepareStreaming
(
itk::DataObject
* input,
const
RegionType
®ion )
43
{
44
unsigned
long
nbDivisions =
45
this->EstimateOptimalNumberOfDivisions(input, region, m_AvailableRAMInMB, m_Bias);
46
47
this->m_Splitter =
otb::ImageRegionSquareTileSplitter<itkGetStaticConstMacro(ImageDimension)>::New
();
48
this->m_ComputedNumberOfSplits = this->m_Splitter->
GetNumberOfSplits
(region, nbDivisions);
49
otbMsgDevMacro
(<<
"Number of split : "
<< this->m_ComputedNumberOfSplits)
50
this->m_Region = region;
51
}
52
53
}
// End namespace otb
54
55
#endif
56
Generated at Sun Feb 3 2013 00:43:42 for
Orfeo Toolbox
with
doxygen 1.8.1.1