From: tbaudier Date: Thu, 19 Jan 2017 14:47:37 +0000 (+0100) Subject: Force gdcm to find spacing X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=c24ade7228f4e5e3d79f74bb4ecbd82963cdbebe;p=clitk.git Force gdcm to find spacing Used with preclinical CT image to find the z-spacing --- 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);