]> Creatis software - gdcm.git/commitdiff
* Modification to compile with the distutils.
authorregrain <regrain>
Wed, 7 Jan 2004 10:07:27 +0000 (10:07 +0000)
committerregrain <regrain>
Wed, 7 Jan 2004 10:07:27 +0000 (10:07 +0000)
     * Bug fix in code
     -- BeNours

ChangeLog
setup.py
src/jpeg/ljpg/huffd.c
src/jpeg/ljpg/jpeg.h
vtk/vtkgdcmViewer.cxx

index 1b32de0b31c189caae3a0ea8b89caf37cd9b60ab..8c0b3acde479c4e6d3eb480ea9467e8166394620 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
+2004-01-07 Benoit Regrain
+     * Modification to compile with the distutils.
+     * Bug fix in code
+
 2003-12-10 Benoit Regrain
-     * gdcmHeader is now aggregating gdcmFile, and not derived into. Thus, we 
+     * gdcmHeader is now aggregating gdcmFile, and not derived into. Thus, we
        can use a gdcmHeaderHelper to load datas
      * gdcmPython/testSuite.py : make the testSuite compliant with modifications
        made in the source code
index df658a28f1bc2812f6d140f56604a2924d776898..66759c4ece10a13b1ebb3cc6098e70af169f270e 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -86,6 +86,7 @@ vtkSources.extend(glob.glob(os.path.join(gdcmSrcDir,"*.cxx")))
 vtkSources.extend(Jpeg8Sources)
 vtkSources.extend(Jpeg12Sources)
 vtkSources.extend(JpgSources)
+vtkSources.remove(os.path.join(gdcmvtkSrcDir,"vtkgdcmViewer.cxx"))
 
 vtkLibraries=["vtkCommon","vtkCommonPython",
               "vtkIO","vtkIOPython",
index e23fffb55c8f2698985df733a84d0980b409bf51..6b4bc0b0e88781883619bfea16f598f2938f8631 100644 (file)
@@ -5,7 +5,7 @@
  * software
  */
 /*
- * $Id: huffd.c,v 1.1 2003/10/21 12:08:53 jpr Exp $
+ * $Id: huffd.c,v 1.2 2004/01/07 10:07:28 regrain Exp $
  */
 #include <stdio.h>
 #include <stdlib.h>
@@ -533,7 +533,7 @@ void DecodeImage (DecompressInfo *dcPtr, unsigned short **image, int depth)
     else if (depth == 24)
                 PmPutRow24 (curRowBuf, numCOL, &image24tmp);
 
-    swap(MCU *, prevRowBuf, curRowBuf);
+    gdcmSWAP(MCU *, prevRowBuf, curRowBuf);
 
     /* optimal case : 8 bit image, one color component, no restartInRows */
     if ((depth == 8) && (compsInScan == 1) && (dcPtr->restartInRows == 0)) 
@@ -631,7 +631,7 @@ void DecodeImage (DecompressInfo *dcPtr, unsigned short **image, int depth)
               else if (depth == 24)
                         PmPutRow24 (curRowBuf, numCOL, &image24tmp);
 
-              swap(MCU *,prevRowBuf,curRowBuf);
+              gdcmSWAP(MCU *,prevRowBuf,curRowBuf);
               continue;
            }
            dcPtr->restartRowsToGo--;
@@ -684,7 +684,7 @@ void DecodeImage (DecompressInfo *dcPtr, unsigned short **image, int depth)
               else if (depth == 24)
                         PmPutRow24 (curRowBuf, numCOL, &image24tmp);
 
-              swap(MCU *, prevRowBuf, curRowBuf);
+              gdcmSWAP(MCU *, prevRowBuf, curRowBuf);
       
       }/*endfor row*/
     }/*endelse*/
index fe80d5da3ca7bd84e046ed1aead168bc25733b9b..fa32bc1abee2eb0405fbd6751a99158fca13080e 100644 (file)
@@ -4,11 +4,13 @@
  * Basic jpeg data structure definitions.
  */
 /*
- * $Id: jpeg.h,v 1.2 2003/10/29 18:24:40 malaterre Exp $
+ * $Id: jpeg.h,v 1.3 2004/01/07 10:07:28 regrain Exp $
  */
 #ifndef _JPEG
 #define _JPEG
 
+#include <stdio.h>
+
 /* a function referenced thru EXTERNs: */
 #ifdef WIN32
   #define GLOBAL(type)         __declspec( dllexport ) type
@@ -173,7 +175,7 @@ typedef struct DecompressInfo
  *
  *--------------------------------------------------------------
  */
-#define swap(type,a,b) {type c; c=(a); (a)=(b); (b)=c;}
+#define gdcmSWAP(type,a,b) {type c; c=(a); (a)=(b); (b)=c;}
 
 #define MEMSET(s,c,n) memset((void *)(s),(int)(c),(int)(n))
 #define MEMCPY(s1,s2,n) memcpy((void *)(s1),(void *)(s2),(int)(n))
index ce5afd62a67c1d0bfcf2ba5033c2e9b3df13df04..1ce2af88e77cd14efa17407d94ceae2970d29761 100644 (file)
@@ -1,3 +1,5 @@
+#include <iostream>
+
 #include <vtkRenderWindowInteractor.h>
 #include <vtkImageViewer2.h>
 #include <vtkStructuredPoints.h>