X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvFromITK.h;h=818705176e5f2d4701af011aed6cef7f5f216669;hb=cb9d2e28489c3531d37c241fe7d8a468451c8e67;hp=c611eee6370f853cd375461b9f775f496260d827;hpb=0b7c9b1e1215634b02cbd38d4e4ba101d6111ba8;p=clitk.git diff --git a/common/vvFromITK.h b/common/vvFromITK.h index c611eee..8187051 100644 --- a/common/vvFromITK.h +++ b/common/vvFromITK.h @@ -17,11 +17,15 @@ ======================================================================-====*/ #ifndef VVIMAGEFROMITK_H #define VVIMAGEFROMITK_H + +// vv #include "vvImage.h" -//#include + +// itk #include #include +//------------------------------------------------------------------------------ /**Converts the itk image to vv, handling the 4D problem * The time_sequence boolean specifies that the image is to be interpreted as a time sequence, * even if its dim is < 4. */ @@ -79,6 +83,8 @@ template vvImage::Pointer vvImageFromITK(type 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 { @@ -101,5 +107,6 @@ template vvImage::Pointer vvImageFromITK(type } return vv_image; } +//------------------------------------------------------------------------------ #endif //vvImageFromITK