From 3c1701ed70b2463512d52051397d735166dcfb19 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Smekens?= Date: Wed, 20 Mar 2013 18:31:00 +0100 Subject: [PATCH] Fixed problem with unsigned short --- common/rtkXRadImageIO.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/common/rtkXRadImageIO.cxx b/common/rtkXRadImageIO.cxx index f790356..1db3027 100644 --- a/common/rtkXRadImageIO.cxx +++ b/common/rtkXRadImageIO.cxx @@ -57,10 +57,10 @@ void rtk::XRadImageIO::ReadImageInformation() SetDimensions(2, atoi(paramValue.c_str())); else if(paramName == std::string("CBCT.DimensionalAttributes.DataSize")) { - if(atoi(paramValue.c_str())!=3) - { - itkExceptionMacro(<<"Was expecting CBCT.DimensionalAttributes.DataSize==3"); - } + if(atoi(paramValue.c_str())==3) + SetComponentType(itk::ImageIOBase::FLOAT); + if(atoi(paramValue.c_str())==6) + SetComponentType(itk::ImageIOBase::USHORT); } else if(paramName == std::string("CBCT.DimensionalAttributes.PixelDimension_I_cm")) { @@ -87,7 +87,6 @@ void rtk::XRadImageIO::ReadImageInformation() } } - SetComponentType(itk::ImageIOBase::FLOAT); } //// //-------------------------------------------------------------------- -- 2.47.1