X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FvtkgdcmSerieViewer.cxx;h=0667025d1ed78a0b61fe7439671c48c50f1757ec;hb=029ba8b100584e6ee9d963589e3a1d36205f25c4;hp=099b6e4911e75cc4e61bea112197f023d40a55e7;hpb=3af57d8dcb1c254a7760c75baf0fa0df641f5212;p=gdcm.git diff --git a/vtk/vtkgdcmSerieViewer.cxx b/vtk/vtkgdcmSerieViewer.cxx index 099b6e49..0667025d 100644 --- a/vtk/vtkgdcmSerieViewer.cxx +++ b/vtk/vtkgdcmSerieViewer.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: vtkgdcmSerieViewer.cxx,v $ Language: C++ - Date: $Date: 2005/09/04 15:40:25 $ - Version: $Revision: 1.10 $ + Date: $Date: 2006/01/26 16:01:06 $ + Version: $Revision: 1.16 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -43,7 +43,7 @@ #include "gdcmDocument.h" // for NO_SHADOWSEQ #include "gdcmSerieHelper.h" #include "gdcmDebug.h" -#include "gdcmValEntry.h" +#include "gdcmDataEntry.h" #include "gdcmArgMgr.h" // for Argument Manager functions #include // for strcmp @@ -171,7 +171,7 @@ int main(int argc, char *argv[]) int check = am->ArgMgrDefined("check"); // This is so ugly, a cstring is NOT a char * (god damit!) - bool bname = ( strcmp(am->ArgMgrGetString("order", (char*)"not found"),"name")==0 ); + bool bname = ( strcmp(am->ArgMgrGetString("order", "not found"),"name")==0 ); if (bname) elemsToOrderOn = am->ArgMgrGetXInt16Enum("order", &orderNb); @@ -190,7 +190,7 @@ int main(int argc, char *argv[]) // ----------------------- End Arguments Manager ---------------------- - gdcm::SerieHelper *sh = new gdcm::SerieHelper(); + gdcm::SerieHelper *sh = gdcm::SerieHelper::New(); sh->SetLoadMode(loadMode); if (reverse) sh->SetSortOrderToReverse(); @@ -199,11 +199,11 @@ int main(int argc, char *argv[]) // Just to see int nbFiles; - // For all the Coherent Files lists of the gdcm::Serie - gdcm::FileList *l = sh->GetFirstCoherentFileList(); + // For all the 'Single Serie UID' FileSets of the gdcm::Serie + gdcm::FileList *l = sh->GetFirstSingleSerieUIDFileSet(); if (l == 0 ) { - std::cout << "Oops! No CoherentFileList found ?!?" << std::endl; + std::cout << "Oops! No 'Single Serie UID' FileSet found ?!?" << std::endl; return 0; } @@ -223,9 +223,10 @@ int main(int argc, char *argv[]) } else { - std::cout << "Oops! Empty CoherentFileList found ?!?" << std::endl; + std::cout << "Oops! Empty 'Single Serie UID' FileSet found ?!?" + << std::endl; } - l = sh->GetNextCoherentFileList(); + l = sh->GetNextSingleSerieUIDFileSet(); } if (check) @@ -233,7 +234,7 @@ int main(int argc, char *argv[]) if ( !sh->IsCoherent(l) ) // just be sure (?) { std::cout << "Files are not coherent. Stop everything " << std::endl; - delete sh; + sh->Delete(); return 0; } } @@ -337,6 +338,7 @@ int main(int argc, char *argv[]) } \ if (nx%2 != 0) \ { \ + i = nx / 2; \ for (j=0;jgdcm::Document::GetValEntry( elemsToOrderOn[2*ri], - elemsToOrderOn[2*ri+1]); + e1= f1->GetDataEntry( elemsToOrderOn[2*ri], + elemsToOrderOn[2*ri+1]); - e2= f2->gdcm::Document::GetValEntry( elemsToOrderOn[2*ri], + e2= f2->GetDataEntry( elemsToOrderOn[2*ri], elemsToOrderOn[2*ri+1]); if(!e2 || !e2) { @@ -471,8 +473,8 @@ bool userSuppliedLessThanFunction(gdcm::File *f1, gdcm::File *f2) << " not found" << std::endl; continue; } - s1 = e1->gdcm::ValEntry::GetValue(); - s2 = e2->gdcm::ValEntry::GetValue(); + s1 = e1->GetString(); + s2 = e2->GetString(); std::cout << "[" << s1 << "] vs [" << s2 << "]" << std::endl; if ( s1 < s2 ) return true;