X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmJpeg2000.cxx;h=079e58a96b8af6bea1beb68e1fea8b43d9efc12f;hb=f0e413c2c9e040814d7c8bf4909337d9d7b88714;hp=4a33f3a187ff71156ac3330aa1f3d65a6f0bb40e;hpb=b8ce88766307f0197209797c4a1fc49a1045ad3a;p=gdcm.git diff --git a/src/gdcmJpeg2000.cxx b/src/gdcmJpeg2000.cxx index 4a33f3a1..079e58a9 100644 --- a/src/gdcmJpeg2000.cxx +++ b/src/gdcmJpeg2000.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJpeg2000.cxx,v $ Language: C++ - Date: $Date: 2005/07/05 20:58:27 $ - Version: $Revision: 1.25 $ + Date: $Date: 2005/07/11 18:10:29 $ + Version: $Revision: 1.27 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -36,7 +36,8 @@ namespace gdcm bool gdcm_read_JPEG2000_file (void* raw, char *inputdata, size_t inputlength) { #if 0 - std::ofstream out("/tmp/jpeg2000.jpc"); + std::cerr << "Inputlenght=" << inputlength << std::endl; + std::ofstream out("/tmp/jpeg2000.jpc", std::ios::binary); out.write((char*)inputdata,inputlength); out.close(); #endif @@ -67,7 +68,7 @@ bool gdcm_read_JPEG2000_file (void* raw, char *inputdata, size_t inputlength) int prec = jas_image_cmptprec(jasImage, 0); int i, j, k; - // The following should serioulsy be rewritten I cannot belive we need to + // The following should serioulsy be rewritten I cannot believe we need to // do a per pixel decompression, there should be a way to read a full // scanline... if (prec == 8) @@ -100,6 +101,11 @@ bool gdcm_read_JPEG2000_file (void* raw, char *inputdata, size_t inputlength) //FIXME //delete the jpeg temp buffer +#if 0 + std::ofstream rawout("/tmp/jpeg2000.raw"); + rawout.write((char*)raw,height*width*numcmpts*((prec+4)/8)); + rawout.close(); +#endif delete[] inputdata; return true;