]> Creatis software - gdcm.git/blobdiff - vtk/vtkgdcmSerieViewer.cxx
ENH: Adding a small ex to quickly extract a binary field
[gdcm.git] / vtk / vtkgdcmSerieViewer.cxx
index 3f981b124616bf6dc59f9be90026d84e02c44c0a..fbf81e162e1adfae99e6c0b577fb667efa8d3a8c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkgdcmSerieViewer.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/08/31 08:37:53 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/09/07 08:21:28 $
+  Version:   $Revision: 1.11 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -53,8 +53,8 @@
 
 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;
@@ -170,9 +170,8 @@ int main(int argc, char *argv[])
 
    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);
 
@@ -338,6 +337,7 @@ int main(int argc, char *argv[])
    }                                    \
    if (nx%2 != 0)                       \
    {                                    \
+      i = nx / 2;                       \
       for (j=0;j<ny;j++)                \
       {                                 \
         imj = (ty *)im  +j*nx;          \