0

我正在尝试计算两个图像之间的互信息,为此我使用了“MutualInformationImageToImageMetric”类。阅读此示例后:http ://www.itk.org/Wiki/ITK/Examples/Registration/MutualInformation我在我的代码中使用了以下四个新的“#include”行:

 #include "itkImageRegistrationMethod.h"
 #include "itkTranslationTransform.h"
 #include "itkMutualInformationImageToImageMetric.h"
 #include "itkLinearInterpolateImageFunction.h"

之后我收到一个致命错误,告诉我:'itkSingleValuedCostFunction.h':没有这样的文件或目录

我已经使用了很多其他类别的 itk,而且它总是有效……现在发生了什么?请问有什么提示吗?

谢谢 !

安东尼奥·戈麦斯·巴克罗

4

1 回答 1

1

I'm using the GIT version of ITK and updated my CMakeList.txt to

cmake_minimum_required(VERSION 2.8)

PROJECT(MutualInformation)

FIND_PACKAGE(ITK REQUIRED)
INCLUDE(${ITK_USE_FILE})

ADD_EXECUTABLE(MutualInformation MutualInformation.cxx)
TARGET_LINK_LIBRARIES(MutualInformation ${ITK_LIBRARIES})

Everything went fine.

Which ITK have you built? I do not have ITK 3.20 built right now. Does itkSingleValuedCostFunction.h exist under Code\Numerics ? Is you makefile properly set to TARGET_LINK_LIBRARIES(MutualInformation ITKIO ITKNumerics) ? Or, if you use ITK git, do you see the file under Modules\Numerics\Optimizers\include ?

Note that you could post questions related to ITK on the ITK mailing list. Register at http://www.itk.org/mailman/listinfo/insight-users

于 2011-10-24T15:40:52.523 回答