DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Wed, 2018-11-21, 11:04

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri, 2018-09-14, 00:35 
Offline

Joined: Thu, 2018-01-25, 13:46
Posts: 2
Dear forum,
May I know if there's a function in DCMTK that can return the API version (such as "3.6.3")? I searched the source repository in the 3.6.3 branch but didn't manage to find one. Thank you! 8)


Top
 Profile  
 
PostPosted: Fri, 2018-09-14, 08:06 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 2004
Location: Oldenburg, Germany
There is a macro OFFIS_DCMTK_VERSION in "dcmtk/dcmdata/dcuid.h".


Top
 Profile  
 
PostPosted: Wed, 2018-10-17, 20:47 
Offline

Joined: Thu, 2018-01-25, 13:46
Posts: 2
J. Riesmeier wrote:
There is a macro OFFIS_DCMTK_VERSION in "dcmtk/dcmdata/dcuid.h".


Thanks for your reply, J. Riesmeier.

It appears that OFFIS_DCMTK_VERSION is an alias to PACKAGE_VERSION_SUFFIX, which is defined in dcmtk/config/osconfig.h

My 2 cents: It would be more convenient to users if, instead of being a preprocessor macro alone, the version number is made a return value of an API global function (say std::string GetVersionString()). It would also be helpful if it is accessible in CMake (say DCMTK_VERSION).


Top
 Profile  
 
PostPosted: Wed, 2018-10-17, 21:41 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 2004
Location: Oldenburg, Germany
Quote:
It appears that OFFIS_DCMTK_VERSION is an alias to PACKAGE_VERSION_SUFFIX, which is defined in dcmtk/config/osconfig.h

No, OFFIS_DCMTK_VERSION is defined as a concatenation of PACKAGE_VERSION and PACKAGE_VERSION_SUFFIX, e.g. "3.6.3+"

Quote:
... the version number is made a return value of an API global function (say std::string GetVersionString()). It would also be helpful if it is accessible in CMake (say DCMTK_VERSION).

I am not a friend of global functions but what would be the advantage compared to a preprocessor macro; is it type safety?
What is wrong with the CMake variable DCMTK_PACKAGE_VERSION?


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: Google [Bot] 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