From c24ade7228f4e5e3d79f74bb4ecbd82963cdbebe Mon Sep 17 00:00:00 2001 From: tbaudier Date: Thu, 19 Jan 2017 15:47:37 +0100 Subject: [PATCH] Force gdcm to find spacing Used with preclinical CT image to find the z-spacing --- common/vvImageReader.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/vvImageReader.cxx b/common/vvImageReader.cxx index 0e4c22b..5e7d903 100644 --- a/common/vvImageReader.cxx +++ b/common/vvImageReader.cxx @@ -19,6 +19,7 @@ #define VVIMAGEREADER_CXX #include +#include "gdcmImageHelper.h" #include "vvImageReader.h" #include "vvImageReader.txx" #include "clitkTransformUtilities.h" @@ -57,6 +58,7 @@ void vvImageReader::Update(LoadedImageType type) mLastError="Unable to read file."; } else { reader->SetFileName(mInputFilenames[0]); + gdcm::ImageHelper::SetForcePixelSpacing(true); reader->ReadImageInformation(); if (mInputFilenames.size() > 1) Update(reader->GetNumberOfDimensions()+1,reader->GetComponentTypeAsString(reader->GetComponentType()),type); -- 2.47.1