SCM

Discussion Forums: help

Monitor Forum | Start New Thread Start New Thread

 

RE: How to get the CamiTK version ? [ reply ]
By: Baptiste Veron on 2016-04-22 12:33
[forum:3628]
Hello,

I didn't manage to get the version of CamiTK. I tried to use the variable CAMITK_VERSION_MAJOR but it didn't work.

In the end (as CamiTK4 implies switching from Qt4 to Qt5) I checked the version of Qt using the macros QT_VERSION and QT_VERSION_CHECK.

For instance in an action extension, I did:
In myActionExtension.h
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
Q_PLUGIN_METADATA(IID "fr.imag.camitk.mycep.action.myactionext")
#endif

In myActionExtension.cpp
// --------------- declare the extension -------------------
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
Q_EXPORT_PLUGIN2(myactionextension, MyActionExtension);
#endif

RE: How to get the CamiTK version ? [ reply ]
By: Jean-Loup HABERBUSCH on 2016-04-22 09:15
[forum:3627]
Hello Baptiste,

As we discussed, you can get the version number of CamiTK by accessing the static variable "version" defined in core.h.

With hope that helps you

Jean-Loup H

How to get the CamiTK version ? [ reply ]
By: Baptiste Veron on 2016-04-18 15:31
[forum:3626]
Hello,

I am currently migrating to CamiT4.0 and I'd like some CEPs to be compatible with both CamiTK 3.5 and 4.0.

Is there a variable allowing to differentiate CamiTK versions when compiling ?
As in VTK for instance:
#if VTK_MAJOR_VERSION <= 5
reslice->SetInputConnection(image->GetProducerPort());
#else
reslice->SetInputData(image);
#endif


   
Powered By FusionForge