iRoCS Toolbox
1.1.0
src
libBlitz2DGraphics
Blitz2Dgeometry.hh
Go to the documentation of this file.
1
/**************************************************************************
2
*
3
* Copyright (C) 2008 Alexandra Teynor
4
*
5
* Image Analysis Lab, University of Freiburg, Germany
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software Foundation,
19
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
*
21
**************************************************************************/
22
23
/**********************************************************
24
*
25
* Blitz2Dgeometry
26
* Basic geometry routines like scaling, rotation (and
27
* possibly later other distortions as well)
28
*
29
* author: Alex Teynor (teynor@informatik.uni-freiburg.de)
30
* March. 2009
31
*
32
*********************************************************/
33
34
#ifndef _BLITZ2DGEOMETRY
35
#define _BLITZ2DGEOMETRY
36
37
#ifdef HAVE_CONFIG_H
38
#include <config.hh>
39
#endif
40
41
// Blitz arrays
42
#include <blitz/array.h>
43
44
enum
scaleType
{
45
BILINEAR
=0,
46
BICUBIC
=1
47
};
48
50
class
Blitz2Dgeometry
{
51
52
public
:
53
54
55
/*======================================================================*/
65
/*======================================================================*/
66
67
template
<
typename
T>
68
static
void
scale
(
const
blitz::Array<T,2>& origImage,
69
blitz::Array<T,2>& scaledImage,
70
float
facy,
float
facx,
71
scaleType
type);
72
73
74
};
75
76
#include "Blitz2Dgeometry.icc"
77
78
79
#endif
80
scaleType
scaleType
Definition:
Blitz2Dgeometry.hh:44
Blitz2Dgeometry::scale
static void scale(const blitz::Array< T, 2 > &origImage, blitz::Array< T, 2 > &scaledImage, float facy, float facx, scaleType type)
Scales an image.
BILINEAR
Definition:
Blitz2Dgeometry.hh:45
BICUBIC
Definition:
Blitz2Dgeometry.hh:46
Blitz2Dgeometry
Basic geometry changing routines for blitz images.
Definition:
Blitz2Dgeometry.hh:50
Generated on Wed Jul 31 2019 12:33:02 for iRoCS Toolbox by
1.8.13