Updated to new CharLs version

epel9
Mario Ceresa 14 years ago
parent eecefa3d54
commit fd8f86a35a

@ -0,0 +1,58 @@
diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
index 4d38bef..48a52ac 100644
--- a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
@@ -72,7 +72,7 @@ bool JPEGLSCodec::GetHeaderInfo(std::istream &is, TransferSyntax &ts)
is.seekg(0, std::ios::beg);
is.read( dummy_buffer, buf_size);
- JlsParamaters metadata;
+ JlsParameters metadata;
if (JpegLsReadHeader(dummy_buffer, buf_size, &metadata) != OK)
{
return false;
@@ -160,7 +160,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
sf->GetBuffer(buffer, totalLen);
//is.write(buffer, totalLen);
- JlsParamaters metadata;
+ JlsParameters metadata;
if (JpegLsReadHeader(buffer, totalLen, &metadata) != OK)
{
return false;
@@ -172,7 +172,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
const BYTE* pbyteCompressed = (const BYTE*)buffer;
int cbyteCompressed = totalLen;
- JlsParamaters params = {0};
+ JlsParameters params = {0};
JpegLsReadHeader(pbyteCompressed, cbyteCompressed, &params);
std::vector<BYTE> rgbyteCompressed;
@@ -216,7 +216,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
// what if 0xd9 is never found ?
assert( totalLen > 0 && pbyteCompressed[totalLen-1] == 0xd9 );
- JlsParamaters metadata;
+ JlsParameters metadata;
if (JpegLsReadHeader(mybuffer, totalLen, &metadata) != OK)
{
return false;
@@ -228,7 +228,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
int cbyteCompressed = totalLen;
- JlsParamaters params = {0};
+ JlsParameters params = {0};
JpegLsReadHeader(pbyteCompressed, cbyteCompressed, &params);
std::vector<BYTE> rgbyteCompressed;
@@ -293,7 +293,7 @@ bool JPEGLSCodec::Code(DataElement const &in, DataElement &out)
{
const char *inputdata = input + dim * image_len; //bv->GetPointer();
- JlsParamaters params = {};
+ JlsParameters params = {};
/*
The fields in JlsCustomParameters do not control lossy/lossless. They
provide the possiblity to tune the JPEG-LS internals for better compression

@ -0,0 +1,22 @@
diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
index d51832f..4d38bef 100644
--- a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
@@ -181,7 +181,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
std::vector<BYTE> rgbyteOut;
rgbyteOut.resize(params.height *params.width * ((params.bitspersample + 7) / 8) * params.components);
- JLS_ERROR result = JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed);
+ JLS_ERROR result = JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed, &params);
ASSERT(result == OK);
delete[] buffer;
@@ -237,7 +237,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
std::vector<BYTE> rgbyteOut;
rgbyteOut.resize(params.height *params.width * ((params.bitspersample + 7) / 8) * params.components);
- JLS_ERROR result = JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed);
+ JLS_ERROR result = JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed, &params);
ASSERT(result == OK);
bool r = true;

@ -0,0 +1,13 @@
diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
index a44a2b1..d51832f 100644
--- a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
@@ -19,7 +19,7 @@
// CharLS includes
#ifdef GDCM_USE_SYSTEM_EXPAT
-#include "CharLS/stdafx.h" // sigh...
+//#include "CharLS/stdafx.h" // sigh...
#include "CharLS/interface.h"
#include "CharLS/util.h"
#include "CharLS/defaulttraits.h"

@ -11,7 +11,7 @@
Name: gdcm
Version: 2.0.16
Release: 12%{?dist}
Release: 13%{?dist}
Summary: Grassroots DiCoM is a C++ library to parse DICOM medical files
Group: Development/Libraries
License: BSD
@ -29,6 +29,9 @@ Patch3: gdcm-2.0.14-use_system_charls.patch
Patch4: gdcm-2.0.16-fix_dso_link.patch
Patch5: gdcm-2.0.16-remove_versioned_install_dir.patch
Patch6: gdcm-2.0.16-fix_ptrdiff.patch
Patch7: gdcm-2.0.16-remove-stdafx.patch
Patch8: gdcm-2.0.16-fix-decode.patch
Patch9: gdcm-2.0.16-JlsParameters.patch
BuildRequires: cmake >= 2.6.0
BuildRequires: openssl-devel
@ -39,7 +42,7 @@ BuildRequires: poppler-devel
BuildRequires: mesa-libOSMesa-devel
BuildRequires: fontconfig-devel
BuildRequires: doxygen
BuildRequires: CharLS-devel
BuildRequires: CharLS-devel >= 1.0
BuildRequires: texlive-latex
BuildRequires: graphviz
BuildRequires: python2-devel
@ -86,6 +89,9 @@ used this library with python
%patch4 -p1
%patch5
%patch6 -p2
%patch7 -p1
%patch8 -p1
%patch9 -p1
# Remove bundled utilities (we use Fedora's ones)
@ -185,16 +191,19 @@ ctest .
#%{python_sitelib}/*
%changelog
* Mon Feb 14 2011 Mario Ceresa <mrceresa@gmail.com> - 2.0.16-13
- Adapted to new version of CharLS lib (v 1.0)
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.16-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Feb 2 2011 Mario Ceresa <mrceresa@gmail.com> 2.0.16-11
* Mon Feb 02 2011 Mario Ceresa <mrceresa@gmail.com> - 2.0.16-11
- Removed python bindings because they fail to build with gcc 4.6
* Mon Feb 2 2011 Mario Ceresa <mrceresa@gmail.com> 2.0.16-10
* Mon Feb 02 2011 Mario Ceresa <mrceresa@gmail.com> - 2.0.16-10
- Added patch to fix upstream bug #3169784
* Sun Jan 02 2011 Rex Dieter <rdieter@fedoraproject.org> - 2.0.16-9
* Sun Jan 02 2011 Rex Dieter <rdieter@fedoraproject.org> - 2.0.16-11
- rebuild (poppler)
* Wed Dec 15 2010 Rex Dieter <rdieter@fedoraproject.org> - 2.0.16-8

Loading…
Cancel
Save