-template<class ImageType>
-void clitk::ImageToImageGenericFilter::SetNextOutput(typename ImageType::Pointer output)
-{
- if (mOutputFilenames.size())
- {
- clitk::writeImage<ImageType>(output, mOutputFilenames.front(), mIOVerbose);
- mOutputFilenames.pop_front();
- }
- if (mInputVVImages.size()) //We assume that if a vv image is set as input, we want one as the output
- mOutputVVImages.push_back(vvImageFromITK<ImageType::ImageDimension,typename ImageType::PixelType>(output));
-}
-template<class ImageType>
-typename ImageType::Pointer clitk::ImageToImageGenericFilter::GetInput(unsigned int n)
-{
- if (mInputFilenames.size() > n)
- return clitk::readImage<ImageType>(mInputFilenames[n], mIOVerbose);
- else if (mInputVVImages.size() > n)
- return typename ImageType::Pointer(const_cast<ImageType*>(vvImageToITK<ImageType>(mInputVVImages[n]).GetPointer()));
- else
- assert(false); //No input, this shouldn't happen
-}