X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkImageConvertGenericFilter.h;h=a3174736ee7e878597fc143a1df88920f2fa8480;hb=021fc5db0afce1915a208fbc0eb7c269ebff3129;hp=aa8b2ba64b69496ee2580bc77f3ef3383bd5542b;hpb=fda331d2e185381051133ae7eb17bb935b79a372;p=clitk.git diff --git a/tools/clitkImageConvertGenericFilter.h b/tools/clitkImageConvertGenericFilter.h index aa8b2ba..a317473 100644 --- a/tools/clitkImageConvertGenericFilter.h +++ b/tools/clitkImageConvertGenericFilter.h @@ -32,7 +32,9 @@ // itk include #include "itkCastImageFilter.h" +#if ( ITK_VERSION_MAJOR < 5 ) #include "itkVectorCastImageFilter.h" +#endif namespace clitk { @@ -74,6 +76,7 @@ namespace clitk { std::string GetOutputPixelTypeName() { return mOutputPixelTypeName; } void SetOutputPixelType(std::string p) { mOutputPixelTypeName = p; } void SetVV(bool b) { mVV = b; } + void SetNoNiiMeta(bool b) { mNoNiiMeta = b; } bool IsWarningOccur() { return mWarningOccur; } std::string & GetWarning() { return mWarning; } void EnableDisplayWarning(bool b) { mDisplayWarning = b; } @@ -95,6 +98,7 @@ namespace clitk { bool mWarningOccur; bool mDisplayWarning; bool mVV; + bool mNoNiiMeta; bool mCorrectNegativeSpacingFlag; private: @@ -206,7 +210,11 @@ namespace clitk { // Cast typedef itk::Image, InputImageType::ImageDimension> OutputImageType; +#if ( ITK_VERSION_MAJOR < 5 ) typedef itk::VectorCastImageFilter FilterType; +#else + typedef itk::CastImageFilter FilterType; +#endif typename FilterType::Pointer cast_filter = FilterType::New(); cast_filter->SetInput(input); cast_filter->Update();