+ // 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"); // directions
+ str.str("");
+ str << NDiffExpEach[0];
+ file->InsertEntryString(str.str(),0x0029,0x0102,"US"); // valeurs de b par direction
+ str.str("");
+ str << AoImages[0];
+ file->InsertEntryString(str.str(),0x0029,0x0103,"US"); // image 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
+ }