Program: gdcm
Module: $RCSfile: vtkgdcmSerieViewer.cxx,v $
Language: C++
- Date: $Date: 2005/08/31 08:37:53 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2005/10/20 15:33:18 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#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 <string.h> // for strcmp
void userSuppliedMirrorFunction (uint8_t *im, gdcm::File *f);
void userSuppliedTopDownFunction(uint8_t *im, gdcm::File *f);
-bool userSuppliedLessThanFunction(gdcm::File *f, gdcm::File *f);
-bool userSuppliedLessThanFunction2(gdcm::File *f, gdcm::File *f);
+bool userSuppliedLessThanFunction(gdcm::File *f1, gdcm::File *f2);
+bool userSuppliedLessThanFunction2(gdcm::File *f1, gdcm::File *f2);
int orderNb;
uint16_t *elemsToOrderOn;
int check = am->ArgMgrDefined("check");
- // ArgMgrGetString *does* return a char *, and takes char * as params !
- // what must I do to avoid warning on gcc?
- bool bname = ( strcmp(am->ArgMgrGetString("order", "not found"),"name")==0 );
+ // This is so ugly, a cstring is NOT a char * (god damit!)
+ bool bname = ( strcmp(am->ArgMgrGetString("order", (char*)"not found"),"name")==0 );
if (bname)
elemsToOrderOn = am->ArgMgrGetXInt16Enum("order", &orderNb);
// 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;
}
}
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)
} \
if (nx%2 != 0) \
{ \
+ i = nx / 2; \
for (j=0;j<ny;j++) \
{ \
imj = (ty *)im +j*nx; \
// for *this* user supplied function, I supposed only ValEntries are checked.
//
std::string s1, s2;
- gdcm::ValEntry *e1,*e2;
+ gdcm::DataEntry *e1,*e2;
for (int ri=0; ri<orderNb; ri++)
{
std::cout << std::hex << elemsToOrderOn[2*ri] << "|"
<< elemsToOrderOn[2*ri+1]
<< std::endl;
- e1= f1->gdcm::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)
{
<< " 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;