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!
How to query DCMTK version
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2504
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: How to query DCMTK version
There is a macro OFFIS_DCMTK_VERSION in "dcmtk/dcmdata/dcuid.h".
-
- Posts: 3
- Joined: Thu, 2018-01-25, 13:46
Re: How to query DCMTK version
Thanks for your reply, J. Riesmeier.J. Riesmeier wrote:There is a macro OFFIS_DCMTK_VERSION in "dcmtk/dcmdata/dcuid.h".
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).
-
- DCMTK Developer
- Posts: 2504
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: How to query DCMTK version
No, OFFIS_DCMTK_VERSION is defined as a concatenation of PACKAGE_VERSION and PACKAGE_VERSION_SUFFIX, e.g. "3.6.3+"It appears that OFFIS_DCMTK_VERSION is an alias to PACKAGE_VERSION_SUFFIX, which is defined in dcmtk/config/osconfig.h
I am not a friend of global functions but what would be the advantage compared to a preprocessor macro; is it type safety?... 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).
What is wrong with the CMake variable DCMTK_PACKAGE_VERSION?
Who is online
Users browsing this forum: Bing [Bot] and 1 guest