// itk include
#include "itkCastImageFilter.h"
+#if ( ITK_VERSION_MAJOR < 5 )
#include "itkVectorCastImageFilter.h"
+#endif
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; }
bool mWarningOccur;
bool mDisplayWarning;
bool mVV;
+ bool mNoNiiMeta;
bool mCorrectNegativeSpacingFlag;
private:
// Cast
typedef itk::Image<itk::Vector<OutputPixelType, InputImageType::PixelType::Dimension>, InputImageType::ImageDimension> OutputImageType;
+#if ( ITK_VERSION_MAJOR < 5 )
typedef itk::VectorCastImageFilter<InputImageType, OutputImageType> FilterType;
+#else
+ typedef itk::CastImageFilter<InputImageType, OutputImageType> FilterType;
+#endif
typename FilterType::Pointer cast_filter = FilterType::New();
cast_filter->SetInput(input);
cast_filter->Update();