image->DeepCopy(connector->GetOutput());
vv_image->AddImage(image);
}
+ vv_image->SetTimeSpacing(input->GetSpacing()[Dim-1]);
+ vv_image->SetTimeOrigin(input->GetOrigin()[Dim-1]);
}
else //Dim == 1,2,3 and not time_sequence
{
//--------------------------------------------------------------------
vvImage::vvImage() {
mVtkImages.resize(0);
+ mTimeSpacing = 1;
+ mTimeOrigin = 0;
}
//--------------------------------------------------------------------
for (int i = 0; i < dim; i++)
{
if (i == 3)
- spacing.push_back(1);
+ spacing.push_back(mTimeSpacing);
else
spacing.push_back(mVtkImages[0]->GetSpacing()[i]);
}
for (int i = 0; i < dim; i++)
{
if (i == 3)
- origin.push_back(0);
+ origin.push_back(mTimeOrigin);
else
origin.push_back(mVtkImages[0]->GetOrigin()[i]);
}
======================================================================-====*/
#ifndef VVIMAGE_H
#define VVIMAGE_H
+
#include <iostream>
#include <vector>
#include <itkObjectFactory.h>
bool IsScalarTypeInteger();
bool IsScalarTypeInteger(int t);
+ void SetTimeSpacing(double s) { mTimeSpacing = s; }
+ void SetTimeOrigin(double o) { mTimeOrigin = o; }
+
private:
vvImage();
~vvImage();
std::vector<vtkImageData*> mVtkImages;
+ double mTimeOrigin;
+ double mTimeSpacing;
};