+ /**
+ * Set the medical informations in the file, based on the user passed
+ * vtkMedicalImageProperties
+ */
+#if (VTK_MAJOR_VERSION >= 5)
+void SetMedicalImageInformation(gdcm::FileHelper *file, vtkMedicalImageProperties *medprop)
+{
+ // For now only do:
+ // PatientName, PatientID, PatientAge, PatientSex, PatientBirthDate, StudyID
+ std::ostringstream str;
+ if( medprop )
+ {
+ str.str("");
+ str << medprop->GetPatientName();
+ file->InsertValEntry(str.str(),0x0010,0x0010); // PN 1 Patient's Name
+
+ str.str("");
+ str << medprop->GetPatientID();
+ file->InsertValEntry(str.str(),0x0010,0x0020); // LO 1 Patient ID
+
+ str.str("");
+ str << medprop->GetPatientAge();
+ file->InsertValEntry(str.str(),0x0010,0x1010); // AS 1 Patient's Age
+
+ str.str("");
+ str << medprop->GetPatientSex();
+ file->InsertValEntry(str.str(),0x0010,0x0040); // CS 1 Patient's Sex
+
+ str.str("");
+ str << medprop->GetPatientBirthDate();
+ file->InsertValEntry(str.str(),0x0010,0x0030); // DA 1 Patient's Birth Date
+
+ str.str("");
+ str << medprop->GetStudyID();
+ file->InsertValEntry(str.str(),0x0020,0x0010); // SH 1 Study ID
+ }
+ }
+
+#else
+void SetMedicalImageInformation(gdcm::FileHelper *, vtkMedicalImageProperties *)
+{
+}
+#endif
+