isce3
0.25.0
Loading...
Searching...
No Matches
cxx
isce3
image
Tile.h
1
#ifndef ISCE_IMAGE_TILE_H
2
#define ISCE_IMAGE_TILE_H
3
#pragma once
4
5
#include "forward.h"
6
7
#include <complex>
8
#include <valarray>
9
10
// pyre
11
#include <pyre/journal.h>
12
13
// Definition
14
template
<
typename
T>
15
class
isce3::image::Tile
{
16
17
public
:
18
// Constructors
19
inline
Tile();
20
inline
Tile(
const
Tile &);
21
22
// Getters for geometry
23
inline
size_t
length()
const
;
24
inline
size_t
width()
const
;
25
inline
size_t
rowStart()
const
;
26
inline
size_t
rowEnd()
const
;
27
inline
size_t
firstImageRow()
const
;
28
inline
size_t
lastImageRow()
const
;
29
30
// Setters for geometry
31
inline
void
width(
size_t
);
32
inline
void
rowStart(
size_t
);
33
inline
void
rowEnd(
size_t
);
34
inline
void
firstImageRow(
size_t
);
35
inline
void
lastImageRow(
size_t
);
36
37
// Allocate memory
38
inline
void
allocate();
39
40
// Print out relevant attributes
41
inline
void
declare(pyre::journal::info_t &)
const
;
42
43
// Overload subscript operator to access valarray data
44
inline
T & operator[](
size_t
index) {
return
_data[index];}
45
// Read-only subscript operator
46
inline
const
T & operator[](
size_t
index)
const
{
return
_data[index];}
47
48
// Overload () operator for 2D access
49
inline
T & operator()(
size_t
row,
size_t
col) {
return
_data[row*_width+col];}
50
51
// Read-only () operator for 2D access
52
inline
const
T & operator()(
size_t
row,
size_t
col)
const
{
return
_data[row*_width+col];}
53
54
// Get reference to underlying data
55
inline
std::valarray<T> & data();
56
57
private
:
58
// Geometry
59
size_t
_width;
60
61
// First row of original tile without buffer needed to account for
62
// offset and half of chip size. Defined w.r.t. source raster.
63
size_t
_rowStart;
64
65
// Last row of original tile without buffer needed to account for
66
// offset and half of chip size. Defined w.r.t. source raster.
67
size_t
_rowEnd;
68
69
// First row of original tile to read from. Includes buffer needed to
70
// account for offset and half of chip size. Defined w.r.t. source raster.
71
size_t
_firstImageRow;
72
73
// Last row of original tile to read from. Includes buffer needed to
74
// account for offset and half of chip size. Defined w.r.t. source raster.
75
size_t
_lastImageRow;
76
77
// Data
78
std::valarray<T> _data;
79
};
80
81
// Get inline implementations of Tile
82
#define ISCE_IMAGE_TILE_ICC
83
#include "Tile.icc"
84
#undef ISCE_IMAGE_TILE_ICC
85
86
#endif
isce3::image::Tile
Definition
Tile.h:15
Generated for ISCE3.0 by
1.13.2.