From 3a065704c5a062414593171bcb34d113e67ae973 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Thu, 16 Feb 2017 17:17:51 +0100 Subject: [PATCH] Copy transform matrix for NVector Image in vv --- common/vvImageReader.txx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/vvImageReader.txx b/common/vvImageReader.txx index d1fddfb..4bf6616 100644 --- a/common/vvImageReader.txx +++ b/common/vvImageReader.txx @@ -157,11 +157,17 @@ void vvImageReader::UpdateWithDimAndInputPixelType() spacing.Fill(1); typename OutputImageType::PointType origin; origin.Fill(0); + typename OutputImageType::DirectionType direction; + direction.SetIdentity(); for (unsigned int pixelDim=0; pixelDimGetLargestPossibleRegion().GetSize(pixelDim); spacing[pixelDim]=input->GetSpacing()[pixelDim]; origin[pixelDim]=input->GetOrigin()[pixelDim]; + for (unsigned int pixelDim2=0; pixelDim2GetDirection()[pixelDim][pixelDim2]; + } } typename OutputImageType::RegionType region; region.SetSize(size); @@ -169,6 +175,7 @@ void vvImageReader::UpdateWithDimAndInputPixelType() output->SetRegions(region); output->SetOrigin(origin); output->SetSpacing(spacing); + output->SetDirection(direction); output->Allocate(); //Copy each channel -- 2.47.1