From 1d93f10f32528c9ef0002c051c2140f8485b39fb Mon Sep 17 00:00:00 2001 From: srit Date: Thu, 22 Apr 2010 10:55:49 +0000 Subject: [PATCH] Added macro ADD_DEFAULT_IMAGE_TYPES to ensure that the same types are compiled for default tools and facilitate removal of some types for faster compilation during dev. --- common/clitkImageToImageGenericFilterBase.h | 7 +++++++ filters/clitkBinarizeImageGenericFilter.txx | 9 +-------- filters/clitkFooImageGenericFilter.txx | 8 +------- filters/clitkImageArithmGenericFilter.txx | 8 +------- filters/clitkImageConvertGenericFilter.cxx | 8 +------- filters/clitkImageResampleGenericFilter.cxx | 8 +------- filters/clitkMedianImageGenericFilter.txx | 8 +------- filters/clitkSplitImageGenericFilter.cxx | 6 +----- filters/clitkUnsharpMaskGenericFilter.txx | 8 +------- 9 files changed, 15 insertions(+), 55 deletions(-) diff --git a/common/clitkImageToImageGenericFilterBase.h b/common/clitkImageToImageGenericFilterBase.h index 26c7568..601a752 100644 --- a/common/clitkImageToImageGenericFilterBase.h +++ b/common/clitkImageToImageGenericFilterBase.h @@ -112,6 +112,13 @@ namespace clitk { #define ADD_VEC_IMAGE_TYPE(DIM, COMP, PT) this->mImageTypesManager.template AddNewDimensionAndPixelType(); #define ADD_IMAGE_TYPE(DIM, PT) this->mImageTypesManager.template AddNewDimensionAndPixelType(); +#define ADD_DEFAULT_IMAGE_TYPES(DIM) ADD_IMAGE_TYPE(DIM, char); \ + ADD_IMAGE_TYPE(DIM, uchar); \ + ADD_IMAGE_TYPE(DIM, short); \ + ADD_IMAGE_TYPE(DIM, ushort); \ + ADD_IMAGE_TYPE(DIM, int); \ + ADD_IMAGE_TYPE(DIM, float); \ + ADD_IMAGE_TYPE(DIM, double); //#include "clitkImageToImageGenericFilterBase.txx" diff --git a/filters/clitkBinarizeImageGenericFilter.txx b/filters/clitkBinarizeImageGenericFilter.txx index fb47490..a35a730 100644 --- a/filters/clitkBinarizeImageGenericFilter.txx +++ b/filters/clitkBinarizeImageGenericFilter.txx @@ -44,14 +44,7 @@ namespace clitk template template void BinarizeImageGenericFilter::InitializeImageType() { - ADD_IMAGE_TYPE(Dim, char); - ADD_IMAGE_TYPE(Dim, uchar); - ADD_IMAGE_TYPE(Dim, short); - ADD_IMAGE_TYPE(Dim, ushort); - ADD_IMAGE_TYPE(Dim, int); - // ADD_IMAGE_TYPE(Dim, uint16); - ADD_IMAGE_TYPE(Dim, float); - ADD_IMAGE_TYPE(Dim, double); + ADD_DEFAULT_IMAGE_TYPES(Dim); } //-------------------------------------------------------------------- diff --git a/filters/clitkFooImageGenericFilter.txx b/filters/clitkFooImageGenericFilter.txx index e8a4797..d0967af 100644 --- a/filters/clitkFooImageGenericFilter.txx +++ b/filters/clitkFooImageGenericFilter.txx @@ -51,13 +51,7 @@ FooImageGenericFilter::FooImageGenericFilter(): template template void FooImageGenericFilter::InitializeImageType() { - ADD_IMAGE_TYPE(Dim, char); - ADD_IMAGE_TYPE(Dim, uchar); - ADD_IMAGE_TYPE(Dim, short); - ADD_IMAGE_TYPE(Dim, ushort); - ADD_IMAGE_TYPE(Dim, int); - ADD_IMAGE_TYPE(Dim, float); - ADD_IMAGE_TYPE(Dim, double); + ADD_DEFAULT_IMAGE_TYPES(Dim); } //-------------------------------------------------------------------- diff --git a/filters/clitkImageArithmGenericFilter.txx b/filters/clitkImageArithmGenericFilter.txx index 336f0d0..9679d02 100644 --- a/filters/clitkImageArithmGenericFilter.txx +++ b/filters/clitkImageArithmGenericFilter.txx @@ -37,13 +37,7 @@ namespace clitk template template void ImageArithmGenericFilter::InitializeImageType() { - ADD_IMAGE_TYPE(Dim, char); - ADD_IMAGE_TYPE(Dim, uchar); - ADD_IMAGE_TYPE(Dim, short); - ADD_IMAGE_TYPE(Dim, ushort); - ADD_IMAGE_TYPE(Dim, int); - ADD_IMAGE_TYPE(Dim, float); - ADD_IMAGE_TYPE(Dim, double); + ADD_DEFAULT_IMAGE_TYPES(Dim); } //-------------------------------------------------------------------- diff --git a/filters/clitkImageConvertGenericFilter.cxx b/filters/clitkImageConvertGenericFilter.cxx index 9f35379..c6afba8 100644 --- a/filters/clitkImageConvertGenericFilter.cxx +++ b/filters/clitkImageConvertGenericFilter.cxx @@ -37,13 +37,7 @@ clitk::ImageConvertGenericFilter::ImageConvertGenericFilter(): //-------------------------------------------------------------------- template void clitk::ImageConvertGenericFilter::InitializeImageType() { - ADD_IMAGE_TYPE(Dim, char); - ADD_IMAGE_TYPE(Dim, unsigned char); - ADD_IMAGE_TYPE(Dim, short); - ADD_IMAGE_TYPE(Dim, unsigned short); - ADD_IMAGE_TYPE(Dim, int); - ADD_IMAGE_TYPE(Dim, float); - ADD_IMAGE_TYPE(Dim, double); + ADD_DEFAULT_IMAGE_TYPES(Dim); } //-------------------------------------------------------------------- diff --git a/filters/clitkImageResampleGenericFilter.cxx b/filters/clitkImageResampleGenericFilter.cxx index 12670f5..3e4e28e 100644 --- a/filters/clitkImageResampleGenericFilter.cxx +++ b/filters/clitkImageResampleGenericFilter.cxx @@ -60,13 +60,7 @@ clitk::ImageResampleGenericFilter::ImageResampleGenericFilter(): //-------------------------------------------------------------------- template void clitk::ImageResampleGenericFilter::InitializeImageTypeWithDim() { - ADD_IMAGE_TYPE(Dim, char); - ADD_IMAGE_TYPE(Dim, uchar); - ADD_IMAGE_TYPE(Dim, short); - ADD_IMAGE_TYPE(Dim, ushort); - ADD_IMAGE_TYPE(Dim, int); - ADD_IMAGE_TYPE(Dim, float); - ADD_IMAGE_TYPE(Dim, double); + ADD_DEFAULT_IMAGE_TYPES(Dim); } //-------------------------------------------------------------------- diff --git a/filters/clitkMedianImageGenericFilter.txx b/filters/clitkMedianImageGenericFilter.txx index 696124c..807c867 100644 --- a/filters/clitkMedianImageGenericFilter.txx +++ b/filters/clitkMedianImageGenericFilter.txx @@ -32,13 +32,7 @@ namespace clitk template template void MedianImageGenericFilter::InitializeImageType() { - ADD_IMAGE_TYPE(Dim, char); - ADD_IMAGE_TYPE(Dim, uchar); - ADD_IMAGE_TYPE(Dim, short); - ADD_IMAGE_TYPE(Dim, int); - ADD_IMAGE_TYPE(Dim, float); - ADD_IMAGE_TYPE(Dim, double); - ADD_IMAGE_TYPE(Dim, unsigned short); + ADD_DEFAULT_IMAGE_TYPES(Dim); } //-------------------------------------------------------------------- diff --git a/filters/clitkSplitImageGenericFilter.cxx b/filters/clitkSplitImageGenericFilter.cxx index d8f8a6e..e887b04 100644 --- a/filters/clitkSplitImageGenericFilter.cxx +++ b/filters/clitkSplitImageGenericFilter.cxx @@ -40,11 +40,7 @@ clitk::SplitImageGenericFilter::SplitImageGenericFilter(): //-------------------------------------------------------------------- template void clitk::SplitImageGenericFilter::InitializeImageType() { - ADD_IMAGE_TYPE(Dim, char); - ADD_IMAGE_TYPE(Dim, unsigned char); - ADD_IMAGE_TYPE(Dim, short); - ADD_IMAGE_TYPE(Dim, int); - ADD_IMAGE_TYPE(Dim, float); + ADD_DEFAULT_IMAGE_TYPES(Dim); ADD_VEC_IMAGE_TYPE(Dim, 3,float); } //-------------------------------------------------------------------- diff --git a/filters/clitkUnsharpMaskGenericFilter.txx b/filters/clitkUnsharpMaskGenericFilter.txx index 92aab25..ce7c181 100644 --- a/filters/clitkUnsharpMaskGenericFilter.txx +++ b/filters/clitkUnsharpMaskGenericFilter.txx @@ -50,13 +50,7 @@ UnsharpMaskGenericFilter::UnsharpMaskGenericFilter(): template template void UnsharpMaskGenericFilter::InitializeImageType() { - ADD_IMAGE_TYPE(Dim, char); - ADD_IMAGE_TYPE(Dim, uchar); - ADD_IMAGE_TYPE(Dim, short); - ADD_IMAGE_TYPE(Dim, ushort); - ADD_IMAGE_TYPE(Dim, int); - ADD_IMAGE_TYPE(Dim, float); - ADD_IMAGE_TYPE(Dim, double); + ADD_DEFAULT_IMAGE_TYPES(Dim); } //-------------------------------------------------------------------- -- 2.47.1