]> Creatis software - clitk.git/commitdiff
Fixed problem with unsigned short
authorFrançois Smekens <francois.smekens@creatis.insa-lyon.fr>
Wed, 20 Mar 2013 17:31:00 +0000 (18:31 +0100)
committerFrançois Smekens <francois.smekens@creatis.insa-lyon.fr>
Wed, 20 Mar 2013 17:31:00 +0000 (18:31 +0100)
common/rtkXRadImageIO.cxx

index f7903569e43ec8139a001190ea2c5ca7d92e4a4e..1db30279a5faeee41fa5b049043ec665cf77b06a 100644 (file)
@@ -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);
 } ////
 
 //--------------------------------------------------------------------