X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FPhilipsToBrucker2.cxx;h=0fded6d025489e81fc5a74f73822d9d516e9bc82;hb=334c1f1be0ecba3567a52225ee973d69e906c721;hp=e6d1a9c0ac90f642f6dc345be458babe57e67d9a;hpb=0649a48683b0e781574c2279881d4341d9f4d60f;p=gdcm.git diff --git a/Example/PhilipsToBrucker2.cxx b/Example/PhilipsToBrucker2.cxx index e6d1a9c0..0fded6d0 100755 --- a/Example/PhilipsToBrucker2.cxx +++ b/Example/PhilipsToBrucker2.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PhilipsToBrucker2.cxx,v $ Language: C++ - Date: $Date: 2006/02/03 17:51:13 $ - Version: $Revision: 1.16 $ + Date: $Date: 2006/03/17 14:36:37 $ + Version: $Revision: 1.20 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -50,9 +50,9 @@ int main(int argc, char *argv[]) " - orders the gdcm-readable found Files according to their ", " (0x0010, 0x0010) Patient's Name ", " (0x0020, 0x000e) Series Instance UID ", - " (0x0020, 0x0032) Image Position (Patient) ", + " (0x0020, 0x0032)PhilipsToBrucker2. Image Position (Patient) ", " (0x0018, 0x1060) Trigger Time ", - " (0x0018, 0x1312) In-plane Phase Encoding Direction ", + " (0x0018, 0x1312) In-pl)ane Phase Encoding Direction ", " - fills a single level (*) Directory with *all* the files, ", " converted into a Brucker-like Dicom, InTags compliant ", " (*) actually : creates as many directories as Patients ", @@ -237,7 +237,7 @@ int main(int argc, char *argv[]) << std::endl; std::string uniqueSeriesIdentifier; - for (gdcm::DirListType::iterator it = fileNames.begin(); + for (gdcm::DirListType::iterator it) = fileNames.begin(); it != fileNames.end(); ++it) { @@ -341,7 +341,7 @@ int main(int argc, char *argv[]) tokens[3] = newName; tokensForFileName.clear(); } - else + else tokens[3] = name; @@ -555,7 +555,9 @@ int main(int argc, char *argv[]) currentFile->InsertEntryString(strChSliceIndex, 0x0021, 0x1020, stringVR); currentFile->InsertEntryString(chFrameIndex, 0x0021, 0x1040, stringVR); - if (!taggrid) + if (taggrid) + frameIndex++; + else { if (flag == 0) { @@ -566,7 +568,8 @@ int main(int argc, char *argv[]) frameIndex++; flag = 0; } - } + } + if (split) //fullWriteFilename = currentPhaseEncodingDirectionWriteDir + gdcm::GDCM_FILESEPARATOR @@ -593,7 +596,7 @@ int main(int argc, char *argv[]) // 'SOP Class UID' (0x0008,0x0016) // 'Image Type' (0x0008,0x0008) // 'Conversion Type' (0x0008,0x0064) - fh->SetKeepMediaStorageSOPClassUID(true); + fh->SetContentType(gdcm::UNMODIFIED_PIXELS_IMAGE); if (!fh->Write(fullWriteFilename)) { std::cout << "Fail to write :[" << fullWriteFilename << "]"