From: François Smekens Date: Wed, 20 Mar 2013 17:31:00 +0000 (+0100) Subject: Fixed problem with unsigned short X-Git-Tag: v1.4.0~230^2~5 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=3c1701ed70b2463512d52051397d735166dcfb19;p=clitk.git Fixed problem with unsigned short --- 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); } //// //--------------------------------------------------------------------