当使用VS生成项目时,读取图像时容易出现ImageFileReaderException的问题。
</header>
报错是说:
Could not create IO object for file 1.jpg. Tried to create one of the following: You probably failed to set a file suffix, or set the suffix to an unsupported type.
这是由于没有加入ITKIO的预处理器。
解决方法:
属性 -> 配置属性 -> C/C++ -> 预处理器
预处理器定义中加入:**ITK_IO_FACTORY_REGISTER_MANAGER**