00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #ifndef MITKALTINSTANTIATEACCESSFUNCTIONS_H_HEADER_INCLUDED 00020 #define MITKALTINSTANTIATEACCESSFUNCTIONS_H_HEADER_INCLUDED 00021 00022 #include <itkCastImageFilter.h> 00023 #include <mitkImageToItk.h> 00024 00025 #ifndef DOXYGEN_SKIP 00026 //--------------------------------- instantiation functions ------------------------------ 00027 //##Documentation 00028 //## @brief Instantiate access function without additional parammeters 00029 //## for all datatypes and dimensions 00030 //## 00031 //## Use this macro once after the definition of your access function. 00032 //## Some compilers have memory problems without the explicit instantiation. 00033 //## You may need to move the access function to a separate file. 00034 //## \sa AltInstantiateAccessFunction_1 00035 //## \sa AltInstantiateAccessFunction_2 00036 //## @ingroup Adaptor 00037 #define AltInstantiateAccessFunction(itkImgFunc) \ 00038 AltInstantiateAccessFunctionForFixedDimension(itkImgFunc, 2) \ 00039 AltInstantiateAccessFunctionForFixedDimension(itkImgFunc, 3) 00040 00041 //##Documentation 00042 //## @brief Instantiate access function with one additional parammeter 00043 //## for all datatypes and dimensions 00044 //## 00045 //## Use this macro once after the definition of your access function. 00046 //## Some compilers have memory problems without the explicit instantiation. 00047 //## You may need to move the access function to a separate file. 00048 //## \sa AltInstantiateAccessFunction 00049 //## \sa AltInstantiateAccessFunction_2 00050 //## @ingroup Adaptor 00051 #define AltInstantiateAccessFunction_1(itkImgFunc, param1Type) \ 00052 AltInstantiateAccessFunctionForFixedDimension_1(itkImgFunc, 2, param1Type) \ 00053 AltInstantiateAccessFunctionForFixedDimension_1(itkImgFunc, 3, param1Type) 00054 00055 //##Documentation 00056 //## @brief Instantiate access function with two additional parammeters 00057 //## for all datatypes and dimensions 00058 //## 00059 //## Use this macro once after the definition of your access function. 00060 //## Some compilers have memory problems without the explicit instantiation. 00061 //## You may need to move the access function to a separate file. 00062 //## \sa AltInstantiateAccessFunction 00063 //## \sa AltInstantiateAccessFunction_1 00064 //## @ingroup Adaptor 00065 #define AltInstantiateAccessFunction_2(itkImgFunc, param1Type, param2Type) \ 00066 AltInstantiateAccessFunctionForFixedDimension_2(itkImgFunc, 2, param1Type, param2Type) \ 00067 AltInstantiateAccessFunctionForFixedDimension_2(itkImgFunc, 3, param1Type, param2Type) 00068 00069 //##Documentation 00070 //## @brief Instantiate access function without additional parammeters 00071 //## for all datatypes, but fixed dimension 00072 //## 00073 //## Use this macro once after the definition of your access function. 00074 //## Some compilers have memory problems without the explicit instantiation. 00075 //## You may need to move the access function to a separate file. 00076 //## \sa AltInstantiateAccessFunctionForFixedDimension_1 00077 //## \sa AltInstantiateAccessFunctionForFixedDimension_2 00078 //## @ingroup Adaptor 00079 #define AltInstantiateAccessFunctionForFixedDimension(itkImgFunc, dimension) \ 00080 template void itkImgFunc(itk::Image<double, dimension>*); \ 00081 template void itkImgFunc(itk::Image<float, dimension>*); \ 00082 template void itkImgFunc(itk::Image<int, dimension>*); \ 00083 template void itkImgFunc(itk::Image<unsigned int, dimension>*); \ 00084 template void itkImgFunc(itk::Image<short, dimension>*); \ 00085 template void itkImgFunc(itk::Image<unsigned short, dimension>*); \ 00086 template void itkImgFunc(itk::Image<char, dimension>*); \ 00087 template void itkImgFunc(itk::Image<unsigned char, dimension>*); 00088 00089 //##Documentation 00090 //## @brief Instantiate access function with one additional parammeter 00091 //## for all datatypes, but fixed dimension 00092 //## 00093 //## Use this macro once after the definition of your access function. 00094 //## Some compilers have memory problems without the explicit instantiation. 00095 //## You may need to move the access function to a separate file. 00096 //## \sa AltInstantiateAccessFunctionForFixedDimension 00097 //## \sa AltInstantiateAccessFunctionForFixedDimension_2 00098 //## @ingroup Adaptor 00099 #define AltInstantiateAccessFunctionForFixedDimension_1(itkImgFunc, dimension, param1Type)\ 00100 template void itkImgFunc(itk::Image<double, dimension>*, param1Type); \ 00101 template void itkImgFunc(itk::Image<float, dimension>*, param1Type); \ 00102 template void itkImgFunc(itk::Image<int, dimension>*, param1Type); \ 00103 template void itkImgFunc(itk::Image<unsigned int, dimension>*, param1Type); \ 00104 template void itkImgFunc(itk::Image<short, dimension>*, param1Type); \ 00105 template void itkImgFunc(itk::Image<unsigned short, dimension>*, param1Type); \ 00106 template void itkImgFunc(itk::Image<char, dimension>*, param1Type); \ 00107 template void itkImgFunc(itk::Image<unsigned char, dimension>*, param1Type); 00108 00109 //##Documentation 00110 //## @brief Instantiate access function with two additional parammeters 00111 //## for all datatypes, but fixed dimension 00112 //## 00113 //## Use this macro once after the definition of your access function. 00114 //## Some compilers have memory problems without the explicit instantiation. 00115 //## You may need to move the access function to a separate file. 00116 //## \sa AltInstantiateAccessFunctionForFixedDimension 00117 //## \sa AltInstantiateAccessFunctionForFixedDimension_1 00118 //## @ingroup Adaptor 00119 #define AltInstantiateAccessFunctionForFixedDimension_2(itkImgFunc, dimension, param1Type, param2Type)\ 00120 template void itkImgFunc(itk::Image<double, dimension>*, param1Type, param2Type); \ 00121 template void itkImgFunc(itk::Image<float, dimension>*, param1Type, param2Type); \ 00122 template void itkImgFunc(itk::Image<int, dimension>*, param1Type, param2Type); \ 00123 template void itkImgFunc(itk::Image<unsigned int, dimension>*, param1Type, param2Type); \ 00124 template void itkImgFunc(itk::Image<short, dimension>*, param1Type, param2Type); \ 00125 template void itkImgFunc(itk::Image<unsigned short, dimension>*, param1Type, param2Type); \ 00126 template void itkImgFunc(itk::Image<char, dimension>*, param1Type, param2Type); \ 00127 template void itkImgFunc(itk::Image<unsigned char, dimension>*, param1Type, param2Type); 00128 00129 //##Documentation 00130 //## @brief Instantiate access function without additional parammeters 00131 //## for a fixed datatype, but all dimensions 00132 //## 00133 //## Use this macro once after the definition of your access function. 00134 //## Some compilers have memory problems without the explicit instantiation. 00135 //## You may need to move the access function to a separate file. 00136 //## \sa AltInstantiateAccessFunctionForFixedPixelType_1 00137 //## \sa AltInstantiateAccessFunctionForFixedPixelType_2 00138 //## @ingroup Adaptor 00139 #define AltInstantiateAccessFunctionForFixedPixelType(itkImgFunc, pixelType) \ 00140 template void itkImgFunc(itk::Image<pixelType, 2>*); \ 00141 template void itkImgFunc(itk::Image<pixelType, 3>*); 00142 00143 //##Documentation 00144 //## @brief Instantiate access function with one additional parammeter 00145 //## for a fixed datatype, but all dimensions 00146 //## 00147 //## Use this macro once after the definition of your access function. 00148 //## Some compilers have memory problems without the explicit instantiation. 00149 //## You may need to move the access function to a separate file. 00150 //## \sa AltInstantiateAccessFunctionForFixedPixelType 00151 //## \sa AltInstantiateAccessFunctionForFixedPixelType_2 00152 //## @ingroup Adaptor 00153 #define AltInstantiateAccessFunctionForFixedPixelType_1(itkImgFunc, pixelType, param1Type) \ 00154 template void itkImgFunc(itk::Image<pixelType, 2>*, param1Type); \ 00155 template void itkImgFunc(itk::Image<pixelType, 3>*, param1Type); 00156 00157 //##Documentation 00158 //## @brief Instantiate access function with two additional parammeters 00159 //## for a fixed datatype, but all dimensions 00160 //## 00161 //## Use this macro once after the definition of your access function. 00162 //## Some compilers have memory problems without the explicit instantiation. 00163 //## You may need to move the access function to a separate file. 00164 //## \sa AltInstantiateAccessFunctionForFixedPixelType 00165 //## \sa AltInstantiateAccessFunctionForFixedPixelType_1 00166 //## @ingroup Adaptor 00167 #define AltInstantiateAccessFunctionForFixedPixelType_2(itkImgFunc, pixelType, param1Type, param2Type)\ 00168 template void itkImgFunc(itk::Image<pixelType, 2>*, param1Type, param2Type); \ 00169 template void itkImgFunc(itk::Image<pixelType, 3>*, param1Type, param2Type); 00170 00171 #endif DOXYGEN_SKIP 00172 00173 #endif // of MITKALTINSTANTIATEACCESSFUNCTIONS_H_HEADER_INCLUDED