1 /*=========================================================================
3 Module: $RCSfile: bbitkAnyImageToTypedImage.cxx,v $
5 Date: $Date: 2008/10/17 08:18:21 $
6 Version: $Revision: 1.4 $
7 =========================================================================*/
9 /* ---------------------------------------------------------------------
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
14 * This software is governed by the CeCILL-B license under French law and
15 * abiding by the rules of distribution of free software. You can use,
16 * modify and/ or redistribute the software under the terms of the CeCILL-B
17 * license as circulated by CEA, CNRS and INRIA at the following URL
18 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
19 * or in the file LICENSE.txt.
21 * As a counterpart to the access to the source code and rights to copy,
22 * modify and redistribute granted by the license, users are provided only
23 * with a limited warranty and the software's author, the holder of the
24 * economic rights, and the successive licensors have only limited
27 * The fact that you are presently reading this means that you have had
28 * knowledge of the CeCILL-B license and that you accept its terms.
29 * ------------------------------------------------------------------------ */
33 #include "bbitkAnyImageToTypedImage.h"
34 #include "bbitkPackage.h"
38 //====================================================================
39 BBTK_BLACK_BOX_TEMPLATE_IMPLEMENTATION(AnyImageToTypedImage,
40 bbtk::AtomicBlackBox);
41 BBTK_BLACK_BOX_TEMPLATE2_IMPLEMENTATION(AnyImageToConstTypedImage,
42 bbtk::AtomicBlackBox);
43 //====================================================================
46 #ifdef BBTK_ITK_IMAGE_DIM_2
47 # ifdef BBTK_ITK_IMAGE_TYPE_int8_t
48 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_int8_t_2_ptr);
50 # ifdef BBTK_ITK_IMAGE_TYPE_int16_t
51 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_int16_t_2_ptr);
53 # ifdef BBTK_ITK_IMAGE_TYPE_int32_t
54 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_int32_t_2_ptr);
56 # ifdef BBTK_ITK_IMAGE_TYPE_uint8_t
57 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_uint8_t_2_ptr);
59 # ifdef BBTK_ITK_IMAGE_TYPE_uint16_t
60 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_uint16_t_2_ptr);
62 # ifdef BBTK_ITK_IMAGE_TYPE_uint32_t
63 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_uint32_t_2_ptr);
65 # ifdef BBTK_ITK_IMAGE_TYPE_float
66 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_float_2_ptr);
68 # ifdef BBTK_ITK_IMAGE_TYPE_double
69 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_double_2_ptr);
75 #ifdef BBTK_ITK_IMAGE_DIM_3
76 # ifdef BBTK_ITK_IMAGE_TYPE_int8_t
77 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_int8_t_3_ptr);
79 # ifdef BBTK_ITK_IMAGE_TYPE_int16_t
80 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_int16_t_3_ptr);
82 # ifdef BBTK_ITK_IMAGE_TYPE_int32_t
83 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_int32_t_3_ptr);
85 # ifdef BBTK_ITK_IMAGE_TYPE_uint8_t
86 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_uint8_t_3_ptr);
88 # ifdef BBTK_ITK_IMAGE_TYPE_uint16_t
89 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_uint16_t_3_ptr);
91 # ifdef BBTK_ITK_IMAGE_TYPE_uint32_t
92 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_uint32_t_3_ptr);
94 # ifdef BBTK_ITK_IMAGE_TYPE_float
95 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_float_3_ptr);
97 # ifdef BBTK_ITK_IMAGE_TYPE_double
98 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_double_3_ptr);
105 #ifdef BBTK_ITK_IMAGE_DIM_4
106 # ifdef BBTK_ITK_IMAGE_TYPE_int8_t
107 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_int8_t_4_ptr);
109 # ifdef BBTK_ITK_IMAGE_TYPE_int16_t
110 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_int16_t_4_ptr);
112 # ifdef BBTK_ITK_IMAGE_TYPE_int32_t
113 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_int32_t_4_ptr);
115 # ifdef BBTK_ITK_IMAGE_TYPE_uint8_t
116 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_uint8_t_4_ptr);
118 # ifdef BBTK_ITK_IMAGE_TYPE_uint16_t
119 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_uint16_t_4_ptr);
121 # ifdef BBTK_ITK_IMAGE_TYPE_uint32_t
122 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_uint32_t_4_ptr);
124 # ifdef BBTK_ITK_IMAGE_TYPE_float
125 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_float_4_ptr);
127 # ifdef BBTK_ITK_IMAGE_TYPE_double
128 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(itk,AnyImageToTypedImage,Image_double_4_ptr);
133 #ifdef BBTK_ITK_IMAGE_DIM_2
134 # ifdef BBTK_ITK_IMAGE_TYPE_int8_t
135 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_int8_t_2_ptr,Image_int8_t_2_cptr);
137 # ifdef BBTK_ITK_IMAGE_TYPE_int16_t
138 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_int16_t_2_ptr,Image_int16_t_2_cptr);
140 # ifdef BBTK_ITK_IMAGE_TYPE_int32_t
141 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_int32_t_2_ptr,Image_int32_t_2_cptr);
143 # ifdef BBTK_ITK_IMAGE_TYPE_uint8_t
144 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_uint8_t_2_ptr,Image_uint8_t_2_cptr);
146 # ifdef BBTK_ITK_IMAGE_TYPE_uint16_t
147 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_uint16_t_2_ptr,Image_uint16_t_2_cptr);
149 # ifdef BBTK_ITK_IMAGE_TYPE_uint32_t
150 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_uint32_t_2_ptr,Image_uint32_t_2_cptr);
152 # ifdef BBTK_ITK_IMAGE_TYPE_float
153 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_float_2_ptr,Image_float_2_cptr);
155 # ifdef BBTK_ITK_IMAGE_TYPE_double
156 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_double_2_ptr,Image_double_2_cptr);
160 #ifdef BBTK_ITK_IMAGE_DIM_3
161 # ifdef BBTK_ITK_IMAGE_TYPE_int8_t
162 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_int8_t_3_ptr,Image_int8_t_3_cptr);
164 # ifdef BBTK_ITK_IMAGE_TYPE_int16_t
165 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_int16_t_3_ptr,Image_int16_t_3_cptr);
167 # ifdef BBTK_ITK_IMAGE_TYPE_int32_t
168 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_int32_t_3_ptr,Image_int32_t_3_cptr);
170 # ifdef BBTK_ITK_IMAGE_TYPE_uint8_t
171 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_uint8_t_3_ptr,Image_uint8_t_3_cptr);
173 # ifdef BBTK_ITK_IMAGE_TYPE_uint16_t
174 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_uint16_t_3_ptr,Image_uint16_t_3_cptr);
176 # ifdef BBTK_ITK_IMAGE_TYPE_uint32_t
177 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_uint32_t_3_ptr,Image_uint32_t_3_cptr);
179 # ifdef BBTK_ITK_IMAGE_TYPE_float
180 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_float_3_ptr,Image_float_3_cptr);
182 # ifdef BBTK_ITK_IMAGE_TYPE_double
183 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_double_3_ptr,Image_double_3_cptr);
187 #ifdef BBTK_ITK_IMAGE_DIM_4
188 # ifdef BBTK_ITK_IMAGE_TYPE_int8_t
189 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_int8_t_4_ptr,Image_int8_t_4_cptr);
191 # ifdef BBTK_ITK_IMAGE_TYPE_int16_t
192 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_int16_t_4_ptr,Image_int16_t_4_cptr);
194 # ifdef BBTK_ITK_IMAGE_TYPE_int32_t
195 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_int32_t_4_ptr,Image_int32_t_4_cptr);
197 # ifdef BBTK_ITK_IMAGE_TYPE_uint8_t
198 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_uint8_t_4_ptr,Image_uint8_t_4_cptr);
200 # ifdef BBTK_ITK_IMAGE_TYPE_uint16_t
201 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_uint16_t_4_ptr,Image_uint16_t_4_cptr);
203 # ifdef BBTK_ITK_IMAGE_TYPE_uint32_t
204 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_uint32_t_4_ptr,Image_uint32_t_4_cptr);
206 # ifdef BBTK_ITK_IMAGE_TYPE_float
207 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_float_4_ptr,Image_float_4_cptr);
209 # ifdef BBTK_ITK_IMAGE_TYPE_double
210 BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(itk,AnyImageToConstTypedImage,Image_double_4_ptr,Image_double_4_cptr);