Modern C++ and ITK, a primer?

Coming from the C world (and C on embedded systems) ITK uses a ton of C++ voodoo to achieve what it does.

Can anyone suggest a good modern primer to go about learning the modern C++ that ITK uses?

2 Likes

In the c++ slang, that’s officially called: template metaprogramming :smile:

ITK doesn’t use super modern c++, ITKv5 encourages and allows c++11 features, but not beyond (c++14 or c++17 will surely be supported in future versions).

I am afraid of recommending any book, because there are many good ones that I haven’t read. But I can comment in the book-path that I took:
I started with C++ Primer, which is an introductory book directly using c++11. Then I read the highly praised saga of Effective C++: Modern, and Most Effective C++, I also often consult Concurrent C++, but you don’t need it that much for ITK, because multi-threading is already ‘abstracted’ away from the developer. And finally, I highly recommend the cpp-coreguidelines. They are in a reference-format, so the reading flow isn’t there, but they cover the topics really well, with best practices, and more than often good and practical examples. This one is a community effort started and supported by Bjarne, Herb Sutter, and other big names of c++.

For ITK specifics, the Software Guide is the go-to reference source, with best practices, style guidelines, description of algorithms. It is pretty complete.

Also, cpp slack is a good learning resource and also a good way to be in contact with a really knowledgeable crew. The learn channel is friendly enough to any c++ question and people usually answer fast. There are many other specific channels: cmake, gpu, boost, template metaprogramming, etc, that you might find interesting over-time.

I would also recommend you to ask questions in the open here for specific issues you find in the learning process, I am sure we will all benefit from it, and hopefully help you in the way.

6 Likes