I’m trying to compile a simple application to be able to read images from DCMTK. For now this application contains no code instead of a main

#include “itkImage.h”
#include “itkDCMTKImageIO.h”

int main ( )
return 0;

I have some includes in this code. The issue happen when I include "#include “itkDCMTKImageIO.h” At the compilation I got the following error

Cannot open source file “ITKIODCMTKExport.h”

This file is referenced in itkDCMTKImageIO.h and I can not find it anywhere in ITK directory. Is I include the right thing to use DCMTK module? Why this include is not present?

I’m using ITK 5.1 with Visual Studio 2019

Thank you.

You need to enable Module_ITKDCMTK or Module_ITKIODCMTK in CMake at configure time. Both are off by default.

Thank you, I will try that