template<unsigned int VImageDimension>
void vvImageReader::UpdateWithDim(std::string InputPixelType)
{
- if (mType == VECTORFIELD)
+ if (mType == VECTORFIELD || mType == VECTORFIELDWITHTIME)
UpdateWithDimAndInputPixelType<itk::Vector<float,3>,VImageDimension>();
else if (InputPixelType == "short")
UpdateWithDimAndInputPixelType<short,VImageDimension>();
try {
if (mType == IMAGEWITHTIME)
- mImage=vvImageFromITK<VImageDimension,InputPixelType>(reader->GetOutput(),true);
+ {
+ std::cerr << "We should never come here:" << std::endl
+ << " Calling vvImageReader with multiple images and IMAGEWITHTIME is undefined." << std::endl
+ << " You are probably looking for MERGEDWITHTIME Type." << std::endl;
+ return;
+ }
else
mImage=vvImageFromITK<VImageDimension,InputPixelType>(reader->GetOutput());
} catch ( itk::ExceptionObject & err ) {
reader->ReleaseDataFlagOn();
try {
- if (mType == IMAGEWITHTIME)
+ if (mType == IMAGEWITHTIME || mType == VECTORFIELDWITHTIME)
mImage=vvImageFromITK<VImageDimension,InputPixelType>(reader->GetOutput(),true);
else
mImage=vvImageFromITK<VImageDimension,InputPixelType>(reader->GetOutput());