+ ADD_VEC_IMAGE_TYPE(Dim, 3,float);
+}
+//--------------------------------------------------------------------
+
+//--------------------------------------------------------------------
+template <class ImageType>
+typename clitk::SplitImageGenericFilter::PngConversion<ImageType>::OutputPngImagePointer
+clitk::SplitImageGenericFilter::PngConversion<ImageType>::Do(double window,
+ double level,
+ ImagePointer input)
+{
+ static const unsigned int PixelDimension = itk::PixelTraits<typename ImageType::PixelType>::Dimension;
+ return this->Do(window, level, input, static_cast< PixelDimType<PixelDimension> *>(NULL) );
+}
+//--------------------------------------------------------------------
+
+//--------------------------------------------------------------------
+template <class ImageType>
+template<unsigned int Dim>
+typename clitk::SplitImageGenericFilter::PngConversion<ImageType>::OutputPngImagePointer
+clitk::SplitImageGenericFilter::PngConversion<ImageType>::Do(double window,
+ double level,
+ ImagePointer input,
+ PixelDimType<Dim> *)
+{
+ clitkExceptionMacro("Png conversion is not implemented for vector fields");
+ return NULL;
+}
+//--------------------------------------------------------------------
+
+//--------------------------------------------------------------------
+template <class ImageType>
+typename clitk::SplitImageGenericFilter::PngConversion<ImageType>::OutputPngImagePointer
+clitk::SplitImageGenericFilter::PngConversion<ImageType>::Do(double window,
+ double level,
+ ImagePointer input,
+ PixelDimType<1> *)
+{
+ typedef itk::IntensityWindowingImageFilter< ImageType, OutputPngImageType > CastFilterType;
+ typename CastFilterType::Pointer cast = CastFilterType::New();
+ cast->SetWindowLevel(window, level);
+ cast->SetInput(input);
+ return cast->GetOutput();