]> Creatis software - clitk.git/blobdiff - tools/clitkImage2DicomDoseGenericFilter.txx
Change header includion from .h to .cxx file
[clitk.git] / tools / clitkImage2DicomDoseGenericFilter.txx
index 38df32a14e0e444e6252ca48e18170c8b64f5cea..df105fadfd1a75e1838d057dbd39ee6b9fdb0edb 100644 (file)
@@ -138,7 +138,7 @@ void
 Image2DicomDoseGenericFilter<args_info_type>::UpdateWithDimAndPixelType()
 {
 
-#if GDCM_MAJOR_VERSION == 2
+#if GDCM_MAJOR_VERSION >= 2
   // ImageTypes
   typedef itk::Image<PixelType, Dimension> InputImageType;
   typedef unsigned short int OutputPixelType;
@@ -189,6 +189,13 @@ Image2DicomDoseGenericFilter<args_info_type>::UpdateWithDimAndPixelType()
   itk::EncapsulateMetaData<std::string>(*outputDict, "0020|0032", value.str());
   DD(origin);
 
+  // orientation
+  typename InputImageType::DirectionType direction = image->GetDirection();
+  value.str("");
+  value<<direction[0][0]<<'\\'<<direction[0][1]<<'\\'<<direction[0][2]<<'\\'<<direction[1][0]<<'\\'<<direction[1][1]<<'\\'<<direction[1][2];
+  itk::EncapsulateMetaData<std::string>(*outputDict, "0020|0037", value.str());
+  DD(direction);
+
   // size
   typename InputImageType::SizeType imageSize = image->GetLargestPossibleRegion().GetSize();
   //DD(imageSize);