]> Creatis software - gdcm.git/blobdiff - src/gdcmJpeg2000.cxx
Forget to commit this one !
[gdcm.git] / src / gdcmJpeg2000.cxx
index 6553c5b40ce6e58ca7b410ed11b11b7b5d689706..4611a60aeba8927373739242cabd7f61cef2625b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmJpeg2000.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/01/24 20:56:13 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2006/02/07 16:05:13 $
+  Version:   $Revision: 1.41 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 #include <iostream>
 #include <fstream>
 
+#if defined(__BORLANDC__)
+   #include <mem.h> // for memset
+#endif 
+
 extern "C" {
   #include <openjpeg.h>
 }
@@ -80,9 +84,9 @@ bool gdcm_read_JPEG2000_file (void* raw, char *inputdata, size_t inputlength)
 {
   opj_dparameters_t parameters;  /* decompression parameters */
   opj_event_mgr_t event_mgr;    /* event manager */
-  opj_image_t *image = NULL;
-  opj_dinfo_t* dinfo = NULL;  /* handle to a decompressor */
-  opj_cio_t *cio = NULL;
+  opj_image_t *image;
+  opj_dinfo_t* dinfo;  /* handle to a decompressor */
+  opj_cio_t *cio;
   unsigned char *src = (unsigned char*)inputdata; 
   int file_length = inputlength;
 
@@ -132,8 +136,6 @@ bool gdcm_read_JPEG2000_file (void* raw, char *inputdata, size_t inputlength)
 
   /* free the memory containing the code-stream */
   delete[] src;  //FIXME
-  src = NULL;
-
 
    // Copy buffer
    for (int compno = 0; compno < image->numcomps; compno++)