+ // Private creator
+ /*
+
+0029|0010 [LO] [Private Creator] [CREATIS HEADER ]
+0029|0011 [LO] [Private Creator] [CREATIS for BRUKER to DICOM]
+0029|1031 [LO] [] [4.0.7571167 ]
+0029|1032 [UL] [] [1440000] =0x(15f900)
+
+> $$ Thu Jul 30 17:29:46 2009 CEST (UT+2h) mwiart
+> $$ /opt/PV4.0/data/mwiart/nmr/dha80.Uw1/4/method
+> ##$Method=DtiEpi
+> ##$PVM_DwNDiffDir=3 % 3 directions
+> ##$PVM_DwNDiffExpEach=2 % 2 valeurs de b par direction
+> ##$PVM_DwAoImages=1 % 1 image pour b=0
+> ##$PVM_DwBvalEach=( 2 ) % Valeurs de b
+> 1500.000000 3000.000000
+>
+> $$ Wed Dec 2 09:56:01 2009 UTC (UT+0h) mwiart
+> $$ /opt/Pv5.0/data/mwiart/nmr/ECI7.Wx1/4/method
+> ##$Method=DtiEpi
+> ##$PVM_DwNDiffDir=3 % 3 directions
+> ##$PVM_DwNDiffExpEach=2 % 2 valeurs de b par direction
+> ##$PVM_DwAoImages=1 % 1 image pour b=0
+> ##$PVM_DwBvalEach=( 2 ) % Valeurs de b
+> 1500 3000
+>
+> $$ Wed Dec 2 10:14:27 2009 UTC (UT+0h) mwiart
+> $$ /opt/Pv5.0/data/mwiart/nmr/ECI7.Wx1/5/method
+> ##$Method=DtiStandard
+> ##$PVM_DwNDiffDir=1 % 1 direction
+> ##$PVM_DwNDiffExpEach=2 % 2 valeurs de b
+> ##$PVM_DwAoImages=0 % 0 image pour b=0
+> ##$PVM_DwBvalEach=( 2 ) % Valeurs de b
+> 138 1600
+>
+ */
+
+ file->InsertEntryString("CREATIS HEADER", 0x0029,0x0010, "LO");
+ file->InsertEntryString("CREATIS FOR BRUKER-TO-DICOM", 0x0029,0x0011, "LO");
+
+ BrukerFieldData brf_method = br_method.GetFieldData("Method");
+ const std::vector<std::string> method = brf_method.GetStringValue();
+
+ // std::string method = br_method.GetFieldData("Method").GetStringValue();
+ file->InsertEntryString(method[0], 0x0029,0x0100, "LO");
+
+ std::cout << " method[" << method[0] << "]" << std::endl;
+ if (method[0] == "DtiEpi" || method[0] == "DtiStandard")
+ {
+ // const std::vector<int> NDiffDir = br_method.GetFieldData("PVM_DwNDiffDir").GetIntValue();
+ BrukerFieldData brf_NDiffDir = br_method.GetFieldData("PVM_DwNDiffDir");
+ const std::vector<int> NDiffDir = brf_NDiffDir.GetIntValue();
+
+ //const std::vector<int> NDiffExpEach = br_method.GetFieldData("PVM_DwNDiffExpEach").GetIntValue();
+ BrukerFieldData brf_NDiffExpEach = br_method.GetFieldData("PVM_DwNDiffExpEach");
+ const std::vector<int> NDiffExpEach =brf_NDiffExpEach.GetIntValue();
+
+// const std::vector<int> AoImages = br_method.GetFieldData("PVM_DwAoImages").GetIntValue();
+ BrukerFieldData brf_AoImages = br_method.GetFieldData("PVM_DwAoImages");
+ const std::vector<int> AoImages = brf_AoImages.GetIntValue();
+
+ BrukerFieldData brf_DwBvalEach = br_method.GetFieldData("PVM_DwBvalEach");
+ const std::vector<double> DwBvalEach = brf_DwBvalEach.GetDoubleValue();
+
+ std::cout << "nb directions : " << NDiffDir[0] << " nb valeurs de b par direction : " << NDiffExpEach[0]
+ << " nb images for b=0 : " << AoImages[0] << std::endl;
+
+ str.str("");
+ str << NDiffDir[0];
+ file->InsertEntryString(str.str(),0x0029,0x0101,"US"); // nb de directions
+ str.str("");
+ str << NDiffExpEach[0];
+ file->InsertEntryString(str.str(),0x0029,0x0102,"US"); // nb valeurs de b par direction
+ str.str("");
+ str << AoImages[0];
+ file->InsertEntryString(str.str(),0x0029,0x0103,"US"); // nb images pour b=0
+
+ str.str("");
+ for (unsigned int i=0; i<NDiffExpEach[0]; i++) {
+ str << DwBvalEach[i];
+ if (i!=AoImages[0])
+ str << "\\";
+ }
+ file->InsertEntryString(str.str(),0x0029,0x0104,"DS"); // Valeurs de b
+ }
+