Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Filterinst.hh
1 /*
2 This file is part of the BIAS library (Basic ImageAlgorithmS).
3 
4 Copyright (C) 2004
5  Johan Skoglund
6  skoglund@isy.liu.se
7  CVL/isy
8  university of Linköping
9  sweden
10 
11 BIAS is free software; you can redistribute it and/or modify
12 it under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
14 (at your option) any later version.
15 
16 BIAS is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU Lesser General Public License for more details.
20 
21 You should have received a copy of the GNU Lesser General Public License
22 along with BIAS; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25 
26 #ifdef __Filterinst_hh__
27 #error Filterinst already defined
28 #endif
29 
30 #define __Filterinst_hh__
31 
32 
33  /** @file Filterinst.hh
34  @brief inline code for instantiation of filter classes
35 
36  usage: define FILTER_INSTANTION_CLASS as your filter class, e.g.
37  #define FILTER_INSTANTION_CLASS Gauss
38  Decide whether you want to allow unsigned output, which makes no sense
39  for gradient filters, because they might produce negative values
40  if you want to prohibit instantiation of unsigned output images,
41  #define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
42  Do all this in the cpp file of your class implementation and then
43  #include "Filterinst.hh"
44  which explicitly creates all instances that are alowed by your current
45  cmake configuration, e.g. BUILD_IMAGE_SHORT, ...
46 
47  WARNING: This class steers the generation of all filter objects of
48  BIAS, dont touch this unless you REALLY know what you are doing.
49  */
50 
51 
52 
53 #ifndef FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
54 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned char, unsigned char>;
55  #if defined(BUILD_IMAGE_USHORT)
56  template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned short,unsigned short>;
57  template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned char, unsigned short>;
58  #endif
59  #if defined(BUILD_IMAGE_UINT)
60  template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned int, unsigned int>;
61  #endif
62 #endif
63 
64 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<float, float>;
65 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned char, float>;
66 
67 #if defined(BUILD_IMAGE_CHAR)
68 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned char, char>;
69 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<char, char>;
70 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<char, float>;
71 #endif
72 
73 #if defined(BUILD_IMAGE_SHORT)
74 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<short, short>;
75 #endif
76 
77 #if defined(BUILD_IMAGE_SHORT)&&defined(BUILD_IMAGE_USHORT)
78 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned short, short>;
79 #endif
80 
81 #if defined(BUILD_IMAGE_INT)
82 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<int,int>;
83 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned char,int>;
84 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<int,float>;
85 #endif
86 
87 #if defined(BUILD_IMAGE_USHORT)
88 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned short,float>;
89 #endif
90 
91 #if defined(BUILD_IMAGE_USHORT) && defined(BUILD_IMAGE_INT)
92 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned short,int>;
93 #endif
94 
95 #if defined(BUILD_IMAGE_DOUBLE)
96 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<double,double>;
97 #endif
98 
99 #undef FILTER_INSTANTIATION_CLASS