iRoCS Toolbox  1.1.0
BlitzAnalyzeTraits.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * Copyright (C) 2010 Robert Bensch
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 #ifndef BLITZANALYZETRAITS_HH
24 #define BLITZANALYZETRAITS_HH
25 
26 #ifdef HAVE_CONFIG_H
27 #include <config.hh>
28 #endif
29 
30 #include <string>
31 #include <fstream>
32 #include <blitz/array.h>
33 
34 #include "BlitzAnalyzeError.hh" // lib's own error class
35 
36 /*======================================================================*/
43 /*======================================================================*/
44 
45 template<typename T>
47 
48 public:
49 
50  /*======================================================================*/
55  /*======================================================================*/
56  static BlitzAnalyzeTraits* Instance();
57 
58  /*-----------------------------------------------------------------------
59  * Destructor
60  *-----------------------------------------------------------------------*/
62 
63  /*-----------------------------------------------------------------------
64  * data methods
65  *-----------------------------------------------------------------------*/
66 
67  /*======================================================================*/
71  /*======================================================================*/
72  std::string Type();
73  /*======================================================================*/
77  /*======================================================================*/
78  int max( const blitz::Array< T,3>& inArray);
79  /*======================================================================*/
83  /*======================================================================*/
84  int min( const blitz::Array< T,3>& inArray);
85  /*======================================================================*/
89  /*======================================================================*/
90  size_t sizeof_type();
91 
92 protected:
93  /*-----------------------------------------------------------------------
94  * Constructors
95  *-----------------------------------------------------------------------*/
96 
97  /*======================================================================*/
101  /*======================================================================*/
103 
104 private:
105 
106  /*-------------------------------------------------------------------------
107  * private vars
108  *-------------------------------------------------------------------------*/
109  static BlitzAnalyzeTraits* _instance;
110 
111 };
112 
113 #include "BlitzAnalyzeTraits.icc"
114 
115 #endif
static BlitzAnalyzeTraits * Instance()
Public singleton access methode (Instance) to one single instance of the class.
BlitzAnalyzeTraits()
Creates a stub BlitzAnalyzeTraits object.
int max(const blitz::Array< T, 3 > &inArray)
Returns maximum value in inArray or seperately specified value.
int min(const blitz::Array< T, 3 > &inArray)
Returns minimum value in inArray or seperately specified value.
std::string Type()
Selects datatype.
The BlitzAnalyzeTraits class provides type traits for BlitzAnalyzeFile.
size_t sizeof_type()
Returns size of datatype T in Byte.