DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Mon, 2017-09-25, 17:48

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri, 2011-01-21, 10:12 
Offline

Joined: Thu, 2011-01-20, 09:57
Posts: 2
Location: Saclay, France
Hello,

in version 3.6.0, OFFIS_DCMTK_VERSION_NUMBER becomes a string, and that prevents it to be used to adapt own developed applications to the API changes in DCMTK.
It is convenient to use a kind of #if OFFIS_DCMTK_VERSION_NUMBER >= 360 in some cases but this cannot be done with version 3.6.0. I checked the code and I did not find any definition that represents the DCMTK version as a pure number.

It is probably a small bug in the configure process, because the comments in dcuid.h specify that OFFIS_DCMTK_VERSION_NUMBER shall be the version number of the release, and OFFIS_DCMTK_VERSION_STRING shall represent this version number as a string.

I slightly modified the code to make OFFIS_DCMTK_VERSION_NUMBER back a number. Below are the changes I did (as diff of the files).


File config/configure:
1777c1777
- PACKAGE_VERSION_NUMBER="360"
---
+ PACKAGE_VERSION_NUMBER=360
1783c1783
- #define PACKAGE_VERSION_NUMBER "${PACKAGE_VERSION_NUMBER}"
---
+ #define PACKAGE_VERSION_NUMBER ${PACKAGE_VERSION_NUMBER}


File config/configure.in:
11c11
- PACKAGE_VERSION_NUMBER="360"
---
+ PACKAGE_VERSION_NUMBER=360
15c15
- AC_DEFINE_UNQUOTED(PACKAGE_VERSION_NUMBER,"${PACKAGE_VERSION_NUMBER}",[Define to the version number of this package.])
---
+ AC_DEFINE_UNQUOTED(PACKAGE_VERSION_NUMBER,${PACKAGE_VERSION_NUMBER},[Define to the version number of this package.])


File dcmdata/include/dcmtk/dcmdata/dcuid.h:
172c172,173
-
---
+ #define PACKAGE_VERSION_NUMBER_TO_STRING_( x ) #x
+ #define PACKAGE_VERSION_NUMBER_TO_STRING( x ) PACKAGE_VERSION_NUMBER_TO_STRING_( x )
174c175
- #define OFFIS_DTK_IMPLEMENTATION_VERSION_NAME "OFFIS_DCMTK_" PACKAGE_VERSION_NUMBER
---
+ #define OFFIS_DTK_IMPLEMENTATION_VERSION_NAME "OFFIS_DCMTK_" PACKAGE_VERSION_NUMBER_TO_STRING(PACKAGE_VERSION_NUMBER)
177c178
- #define OFFIS_DTK_IMPLEMENTATION_VERSION_NAME2 "OFFIS_DCMBP_" PACKAGE_VERSION_NUMBER
---
+ #define OFFIS_DTK_IMPLEMENTATION_VERSION_NAME2 "OFFIS_DCMBP_" PACKAGE_VERSION_NUMBER_TO_STRING(PACKAGE_VERSION_NUMBER)


I used the preprocessor 'stringizing' character '#' to convert the version number 360 to a string instead of using 'PACKAGE_VERSION' to have a minimum impact on the other definitions because 'PACKAGE_VERSION' is set to "3.6.0" and not "360".


Hope that helps.


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2011-01-21, 10:44 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
Thank you for the report and suggested fix. I've added this issue to our internal to-do list with priority "high", so it should be part of one of the next snapshot (aka version 3.6.1).

Btw, we changed the definitions and corresponding source code more than 2.5 years ago, so it was already present in the various snapshot versions (aka version 3.5.5) and nobody noticed it. That probably means that not so many people check the version number ...


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2011-02-01, 18:11 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
Just committed the required changes.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group