]> Creatis software - clitk.git/commitdiff
Add orientation in clitkImage2DicomDose
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Wed, 14 Mar 2018 13:18:10 +0000 (14:18 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Wed, 14 Mar 2018 13:18:10 +0000 (14:18 +0100)
tools/clitkImage2DicomDoseGenericFilter.txx

index 38df32a14e0e444e6252ca48e18170c8b64f5cea..1c4e88f3d4e1bd36cd932aeeeb3e9315964d00c6 100644 (file)
@@ -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);