- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在我自己的项目中使用 itk 库。我使用 cmake 3.3 构建了 ITK,并使用 cmake 配置我自己的项目。但是,当我尝试使用 Visual Studio 2012 构建项目时,我收到以下警告(在 Debug模式下):
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xutility(2176): warning C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl'
2> c:\work\myproject\thirdparty\modules\io\imagebase\include\itkImageFileReader.hxx(441) : see reference to function template instantiation '_OutIt std::copy<const unsigned char*,unsigned char*>(_InIt,_InIt,_OutIt)' being compiled
2> with
2> [
2> _OutIt=unsigned char *,
2> _InIt=const unsigned char *
2> ]
2> c:\work\myproject\thirdparty\modules\io\imagebase\include\itkImageFileReader.hxx(353) : while compiling class template member function 'void itk::ImageFileReader<TOutputImage>::GenerateData(void)'
2> with
2> [
2> TOutputImage=ImageType
2> ]
2> C:\Work\myproject\Main.cpp(77) : see reference to class template instantiation 'itk::ImageFileReader<TOutputImage>' being compiled
2> with
2> [
2> TOutputImage=ImageType
2> ]
2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl'
(之后有关于pdb文件未出现的警告)
当我运行 exe 时,我在 reader->Update() 中遇到异常;在我的文件中(稍后出现在我的问题中)
这是我的 CMakeLists.txt 文件:
project(myproj)
SET( EX_PLATFORM 64 )
SET( EX_PLATFORM_NAME "x64" )
cmake_minimum_required(VERSION 2.6.0)
include_directories ("thirdParty/Modules/Segmentation/Watersheds/include"
"thirdParty/Modules/Segmentation/Voronoi/include"
"thirdParty/Modules/Video/IO/include"
"thirdParty/Modules/Video/Filtering/include"
"thirdParty/Modules/Video/Core/include"
"thirdParty/Modules/Bridge/VTK/include"
"thirdParty/Modules/Core/TestKernel/include"
"thirdParty/Modules/Filtering/SpatialFunction/include"
"thirdParty/Modules/Registration/RegistrationMethodsv4/include"
"thirdParty/Modules/Segmentation/RegionGrowing/include"
"thirdParty/Modules/Filtering/QuadEdgeMeshFiltering/include"
"thirdParty/Modules/Numerics/NeuralNetworks/include"
"thirdParty/Modules/Registration/Metricsv4/include"
"thirdParty/Modules/Numerics/Optimizersv4/include"
"thirdParty/Modules/Segmentation/MarkovRandomFieldsClassifiers/include"
"thirdParty/Modules/Segmentation/LevelSetsv4/include"
"thirdParty/Modules/Segmentation/LabelVoting/include"
"thirdParty/Modules/Segmentation/KLMRegionGrowing/include"
"thirdParty/Modules/Filtering/ImageNoise/include"
"thirdParty/Modules/Filtering/ImageFusion/include"
"thirdParty/Modules/IO/VTK/include"
"thirdParty/Modules/IO/TransformMatlab/include"
"thirdParty/Modules/IO/TransformInsightLegacy/include"
"thirdParty/Modules/IO/TransformHDF5/include"
"thirdParty/Modules/IO/TransformBase/include"
"thirdParty/Modules/IO/Stimulate/include"
"thirdParty/Modules/IO/Siemens/include"
"thirdParty/Modules/IO/RAW/include"
"thirdParty/Modules/IO/PNG/include"
"thirdParty/Modules/ThirdParty/PNG/src"
"thirdParty/itk_target/Modules/ThirdParty/PNG/src"
"thirdParty/Modules/IO/NRRD/include"
"thirdParty/Modules/ThirdParty/NrrdIO/src/NrrdIO"
"thirdParty/itk_target/Modules/ThirdParty/NrrdIO/src/NrrdIO"
"thirdParty/Modules/IO/NIFTI/include"
"thirdParty/Modules/IO/Meta/include"
"thirdParty/Modules/IO/Mesh/include"
"thirdParty/Modules/IO/MRC/include"
"thirdParty/Modules/IO/LSM/include"
"thirdParty/Modules/IO/TIFF/include"
"thirdParty/Modules/ThirdParty/TIFF/src"
"thirdParty/itk_target/Modules/ThirdParty/TIFF/src/itktiff"
"thirdParty/itk_target/Modules/ThirdParty/TIFF/src"
"thirdParty/Modules/IO/JPEG/include"
"thirdParty/Modules/ThirdParty/JPEG/src"
"thirdParty/itk_target/Modules/ThirdParty/JPEG/src"
"thirdParty/Modules/IO/HDF5/include"
"thirdParty/Modules/IO/GIPL/include"
"thirdParty/Modules/IO/GE/include"
"thirdParty/Modules/IO/IPL/include"
"thirdParty/Modules/IO/GDCM/include"
"thirdParty/Modules/IO/CSV/include"
"thirdParty/Modules/IO/BioRad/include"
"thirdParty/Modules/IO/BMP/include"
"thirdPartyitk_target/Modules/ThirdParty/HDF5/src"
"thirdParty/Modules/ThirdParty/HDF5/src"
"thirdParty/Modules/Filtering/GPUThresholding/include"
"thirdParty/Modules/Filtering/GPUSmoothing/include"
"thirdParty/Modules/Registration/GPUPDEDeformable/include"
"thirdParty/Modules/Registration/GPUCommon/include"
"thirdParty/Modules/Filtering/GPUImageFilterBase/include"
"thirdParty/Modules/Filtering/GPUAnisotropicSmoothing/include"
"thirdParty/Modules/Core/GPUFiniteDifference/include"
"thirdParty/Modules/Core/GPUCommon/include"
"thirdParty/Modules/ThirdParty/GIFTI/src/gifticlib"
"thirdParty/Modules/ThirdParty/NIFTI/src/nifti/znzlib"
"thirdParty/Modules/ThirdParty/NIFTI/src/nifti/niftilib"
"thirdParty/Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition"
"thirdParty/Modules/ThirdParty/GDCM/src/gdcm/Source/MessageExchangeDefinition"
"thirdParty/Modules/ThirdParty/GDCM/src/gdcm/Source/InformationObjectDefinition"
"thirdParty/Modules/ThirdParty/GDCM/src/gdcm/Source/Common"
"thirdParty/Modules/ThirdParty/GDCM/src/gdcm/Source/DataDictionary"
"thirdParty/Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat"
"thirdParty/itk_target/Modules/ThirdParty/GDCM/src/gdcm/Source/Common"
"thirdParty/itk_target/Modules/ThirdParty/GDCM"
"thirdParty/Modules/Registration/FEM/include"
"thirdParty/Modules/Registration/PDEDeformable/include"
"thirdParty/Modules/Numerics/FEM/include"
"thirdParty/Modules/Registration/Common/include"
"thirdParty/Modules/IO/SpatialObjects/include"
"thirdParty/Modules/IO/XML/include"
"thirdParty/Modules/ThirdParty/Expat/src/expat"
"thirdParty/itk_target/Modules/ThirdParty/Expat/src/expat"
"thirdParty/Modules/Numerics/Eigen/include"
"thirdParty/Modules/Filtering/DisplacementField/include"
"thirdParty/Modules/Filtering/DiffusionTensorImage/include"
"thirdParty/Modules/Filtering/Denoising/include"
"thirdParty/Modules/Segmentation/DeformableMesh/include"
"thirdParty/Modules/Filtering/Deconvolution/include"
"thirdParty/Modules/ThirdParty/DICOMParser/src/DICOMParser"
"thirdParty/itk_target/Modules/ThirdParty/DICOMParser/src/DICOMParser"
"thirdParty/Modules/Filtering/Convolution/include"
"thirdParty/Modules/Filtering/FFT/include"
"thirdParty/Modules/Filtering/Colormap/include"
"thirdParty/Modules/Segmentation/Classifiers/include"
"thirdParty/Modules/Segmentation/BioCell/include"
"thirdParty/Modules/Filtering/BiasCorrection/include"
"thirdParty/Modules/Numerics/Polynomials/include"
"thirdParty/Modules/Filtering/AntiAlias/include"
"thirdParty/Modules/Segmentation/LevelSets/include"
"thirdParty/Modules/Segmentation/SignedDistanceFunction/include"
"thirdParty/Modules/Numerics/Optimizers/include"
"thirdParty/Modules/Filtering/ImageFeature/include"
"thirdParty/Modules/Filtering/ImageSources/include"
"thirdParty/Modules/Filtering/ImageGradient/include"
"thirdParty/Modules/Filtering/Smoothing/include"
"thirdParty/Modules/Filtering/ImageCompare/include"
"thirdParty/Modules/Filtering/FastMarching/include"
"thirdParty/Modules/Core/QuadEdgeMesh/include"
"thirdParty/Modules/Filtering/DistanceMap/include"
"thirdParty/Modules/Numerics/NarrowBand/include"
"thirdParty/Modules/Filtering/BinaryMathematicalMorphology/include"
"thirdParty/Modules/Filtering/LabelMap/include"
"thirdParty/Modules/Filtering/MathematicalMorphology/include"
"thirdParty/Modules/Segmentation/ConnectedComponents/include"
"thirdParty/Modules/Filtering/Thresholding/include"
"thirdParty/Modules/Filtering/ImageLabel/include"
"thirdParty/Modules/Filtering/ImageIntensity/include"
"thirdParty/Modules/Filtering/Path/include"
"thirdParty/Modules/Filtering/ImageStatistics/include"
"thirdParty/Modules/Core/SpatialObjects/include"
"thirdParty/Modules/ThirdParty/MetaIO/src/MetaIO/src"
"thirdParty/itk_target/Modules/ThirdParty/MetaIO/src/MetaIO/src"
"thirdParty/Modules/ThirdParty/ZLIB/src"
"thirdParty/itk_target/Modules/ThirdParty/ZLIB/src"
"thirdParty/Modules/Core/Mesh/include"
"thirdParty/Modules/IO/ImageBase/include"
"thirdParty/itk_target/Modules/IO/ImageBase"
"thirdParty/Modules/Filtering/ImageCompose/include"
"thirdParty/Modules/Filtering/AnisotropicSmoothing/include"
"thirdParty/Modules/Filtering/ImageGrid/include"
"thirdParty/Modules/Core/ImageFunction/include"
"thirdParty/Modules/Core/Transform/include"
"thirdParty/Modules/Numerics/Statistics/include"
"thirdParty/itk_target/Modules/ThirdParty/Netlib"
"thirdParty/Modules/Core/ImageAdaptors/include"
"thirdParty/Modules/Filtering/CurvatureFlow/include"
"thirdParty/Modules/Filtering/ImageFilterBase/include"
"thirdParty/Modules/Core/FiniteDifference/include"
"thirdParty/Modules/Core/Common/include"
"thirdParty/itk_target/Modules/Core/Common"
"thirdParty/Modules/ThirdParty/VNLInstantiation/include"
"thirdParty/itk_target/Modules/ThirdParty/VNL/src/vxl/core"
"thirdParty/itk_target/Modules/ThirdParty/VNL/src/vxl/vcl"
"thirdParty/itk_target/Modules/ThirdParty/VNL/src/vxl/v3p/netlib"
"thirdParty/Modules/ThirdParty/VNL/src/vxl/core"
"thirdParty/Modules/ThirdParty/VNL/src/vxl/vcl"
"thirdParty/Modules/ThirdParty/VNL/src/vxl/v3p/netlib"
"thirdParty/itk_target/Modules/ThirdParty/KWSys/src"
"thirdParty/itk_target/Modules/ThirdParty/DoubleConversion/src/double-conversion"
"thirdParty/Modules/ThirdParty/DoubleConversion/src/double-conversion"
"thirdParty/Modules/ThirdParty/VNL/src/vxl/vcl/emulation"
)
SET(DEBUG_DIR "../thirdParty/lib/Debug/")
SET(RELEASE_DIR "../thirdParty/lib/Release/")
SET(Sources "Main.cpp")
add_executable(myproj ${Sources})
target_link_libraries(myproj
debug "${DEBUG_DIR}DeformableRegistration11"
debug "${DEBUG_DIR}DeformableRegistration11"
debug "${DEBUG_DIR}ITKBiasCorrection-4.8"
debug "${DEBUG_DIR}ITKBioCell-4.8"
debug "${DEBUG_DIR}ITKCommon-4.8"
debug "${DEBUG_DIR}ITKDICOMParser-4.8"
debug "${DEBUG_DIR}itkdouble-conversion-4.8"
debug "${DEBUG_DIR}ITKEXPAT-4.8"
debug "${DEBUG_DIR}ITKFEM-4.8"
debug "${DEBUG_DIR}itkgdcmcharls-4.8"
debug "${DEBUG_DIR}itkgdcmCommon-4.8"
debug "${DEBUG_DIR}itkgdcmDICT-4.8"
debug "${DEBUG_DIR}itkgdcmDSED-4.8"
debug "${DEBUG_DIR}itkgdcmIOD-4.8"
debug "${DEBUG_DIR}itkgdcmjpeg12-4.8"
debug "${DEBUG_DIR}itkgdcmjpeg16-4.8"
debug "${DEBUG_DIR}itkgdcmjpeg8-4.8"
debug "${DEBUG_DIR}itkgdcmMEXD-4.8"
debug "${DEBUG_DIR}itkgdcmMSFF-4.8"
debug "${DEBUG_DIR}itkgdcmopenjpeg-4.8"
debug "${DEBUG_DIR}itkgdcmsocketxx-4.8"
debug "${DEBUG_DIR}ITKgiftiio-4.8"
debug "${DEBUG_DIR}itkhdf5-4.8"
debug "${DEBUG_DIR}itkhdf5_cpp-4.8"
debug "${DEBUG_DIR}ITKIOBioRad-4.8"
debug "${DEBUG_DIR}ITKIOBMP-4.8"
debug "${DEBUG_DIR}ITKIOCSV-4.8"
debug "${DEBUG_DIR}ITKIOGDCM-4.8"
debug "${DEBUG_DIR}ITKIOGE-4.8"
debug "${DEBUG_DIR}ITKIOGIPL-4.8"
debug "${DEBUG_DIR}ITKIOHDF5-4.8"
debug "${DEBUG_DIR}ITKIOImageBase-4.8"
debug "${DEBUG_DIR}ITKIOIPL-4.8"
debug "${DEBUG_DIR}ITKIOJPEG-4.8"
debug "${DEBUG_DIR}ITKIOLSM-4.8"
debug "${DEBUG_DIR}ITKIOMesh-4.8"
debug "${DEBUG_DIR}ITKIOMeta-4.8"
debug "${DEBUG_DIR}ITKIOMRC-4.8"
debug "${DEBUG_DIR}ITKIONIFTI-4.8"
debug "${DEBUG_DIR}ITKIONRRD-4.8"
debug "${DEBUG_DIR}ITKIOPNG-4.8"
debug "${DEBUG_DIR}ITKIOSiemens-4.8"
debug "${DEBUG_DIR}ITKIOSpatialObjects-4.8"
debug "${DEBUG_DIR}ITKIOStimulate-4.8"
debug "${DEBUG_DIR}ITKIOTIFF-4.8"
debug "${DEBUG_DIR}ITKIOTransformBase-4.8"
debug "${DEBUG_DIR}ITKIOTransformHDF5-4.8"
debug "${DEBUG_DIR}ITKIOTransformInsightLegacy-4.8"
debug "${DEBUG_DIR}ITKIOTransformMatlab-4.8"
debug "${DEBUG_DIR}ITKIOVTK-4.8"
debug "${DEBUG_DIR}ITKIOXML-4.8"
debug "${DEBUG_DIR}itkjpeg-4.8"
debug "${DEBUG_DIR}ITKKLMRegionGrowing-4.8"
debug "${DEBUG_DIR}ITKLabelMap-4.8"
debug "${DEBUG_DIR}ITKMesh-4.8"
debug "${DEBUG_DIR}ITKMetaIO-4.8"
debug "${DEBUG_DIR}itkNetlibSlatec-4.8"
debug "${DEBUG_DIR}ITKniftiio-4.8"
debug "${DEBUG_DIR}ITKNrrdIO-4.8"
debug "${DEBUG_DIR}ITKOptimizers-4.8"
debug "${DEBUG_DIR}ITKOptimizersv4-4.8"
debug "${DEBUG_DIR}ITKPath-4.8"
debug "${DEBUG_DIR}itkpng-4.8"
debug "${DEBUG_DIR}ITKPolynomials-4.8"
debug "${DEBUG_DIR}ITKQuadEdgeMesh-4.8"
debug "${DEBUG_DIR}ITKSpatialObjects-4.8"
debug "${DEBUG_DIR}ITKStatistics-4.8"
debug "${DEBUG_DIR}itksys-4.8"
debug "${DEBUG_DIR}itktestlib-4.8"
debug "${DEBUG_DIR}itktiff-4.8"
debug "${DEBUG_DIR}itkv3p_lsqr-4.8"
debug "${DEBUG_DIR}itkv3p_netlib-4.8"
debug "${DEBUG_DIR}itkvcl-4.8"
debug "${DEBUG_DIR}ITKVideoCore-4.8"
debug "${DEBUG_DIR}ITKVideoIO-4.8"
debug "${DEBUG_DIR}itkvnl-4.8"
debug "${DEBUG_DIR}ITKVNLInstantiation-4.8"
debug "${DEBUG_DIR}itkvnl_algo-4.8"
debug "${DEBUG_DIR}ITKVTK-4.8"
debug "${DEBUG_DIR}ITKWatersheds-4.8"
debug "${DEBUG_DIR}itkzlib-4.8"
debug "${DEBUG_DIR}ITKznz-4.8"
debug "${DEBUG_DIR}DeformableRegistration1"
optimized "${RELEASE_DIR}DeformableRegistration11"
optimized "${RELEASE_DIR}DeformableRegistration11"
optimized "${RELEASE_DIR}ITKBiasCorrection-4.8"
optimized "${RELEASE_DIR}ITKBioCell-4.8"
optimized "${RELEASE_DIR}ITKCommon-4.8"
optimized "${RELEASE_DIR}ITKDICOMParser-4.8"
optimized "${RELEASE_DIR}itkdouble-conversion-4.8"
optimized "${RELEASE_DIR}ITKEXPAT-4.8"
optimized "${RELEASE_DIR}ITKFEM-4.8"
optimized "${RELEASE_DIR}itkgdcmcharls-4.8"
optimized "${RELEASE_DIR}itkgdcmCommon-4.8"
optimized "${RELEASE_DIR}itkgdcmDICT-4.8"
optimized "${RELEASE_DIR}itkgdcmDSED-4.8"
optimized "${RELEASE_DIR}itkgdcmIOD-4.8"
optimized "${RELEASE_DIR}itkgdcmjpeg12-4.8"
optimized "${RELEASE_DIR}itkgdcmjpeg16-4.8"
optimized "${RELEASE_DIR}itkgdcmjpeg8-4.8"
optimized "${RELEASE_DIR}itkgdcmMEXD-4.8"
optimized "${RELEASE_DIR}itkgdcmMSFF-4.8"
optimized "${RELEASE_DIR}itkgdcmopenjpeg-4.8"
optimized "${RELEASE_DIR}itkgdcmsocketxx-4.8"
optimized "${RELEASE_DIR}ITKgiftiio-4.8"
optimized "${RELEASE_DIR}itkhdf5-4.8"
optimized "${RELEASE_DIR}itkhdf5_cpp-4.8"
optimized "${RELEASE_DIR}ITKIOBioRad-4.8"
optimized "${RELEASE_DIR}ITKIOBMP-4.8"
optimized "${RELEASE_DIR}ITKIOCSV-4.8"
optimized "${RELEASE_DIR}ITKIOGDCM-4.8"
optimized "${RELEASE_DIR}ITKIOGE-4.8"
optimized "${RELEASE_DIR}ITKIOGIPL-4.8"
optimized "${RELEASE_DIR}ITKIOHDF5-4.8"
optimized "${RELEASE_DIR}ITKIOImageBase-4.8"
optimized "${RELEASE_DIR}ITKIOIPL-4.8"
optimized "${RELEASE_DIR}ITKIOJPEG-4.8"
optimized "${RELEASE_DIR}ITKIOLSM-4.8"
optimized "${RELEASE_DIR}ITKIOMesh-4.8"
optimized "${RELEASE_DIR}ITKIOMeta-4.8"
optimized "${RELEASE_DIR}ITKIOMRC-4.8"
optimized "${RELEASE_DIR}ITKIONIFTI-4.8"
optimized "${RELEASE_DIR}ITKIONRRD-4.8"
optimized "${RELEASE_DIR}ITKIOPNG-4.8"
optimized "${RELEASE_DIR}ITKIOSiemens-4.8"
optimized "${RELEASE_DIR}ITKIOSpatialObjects-4.8"
optimized "${RELEASE_DIR}ITKIOStimulate-4.8"
optimized "${RELEASE_DIR}ITKIOTIFF-4.8"
optimized "${RELEASE_DIR}ITKIOTransformBase-4.8"
optimized "${RELEASE_DIR}ITKIOTransformHDF5-4.8"
optimized "${RELEASE_DIR}ITKIOTransformInsightLegacy-4.8"
optimized "${RELEASE_DIR}ITKIOTransformMatlab-4.8"
optimized "${RELEASE_DIR}ITKIOVTK-4.8"
optimized "${RELEASE_DIR}ITKIOXML-4.8"
optimized "${RELEASE_DIR}itkjpeg-4.8"
optimized "${RELEASE_DIR}ITKKLMRegionGrowing-4.8"
optimized "${RELEASE_DIR}ITKLabelMap-4.8"
optimized "${RELEASE_DIR}ITKMesh-4.8"
optimized "${RELEASE_DIR}ITKMetaIO-4.8"
optimized "${RELEASE_DIR}itkNetlibSlatec-4.8"
optimized "${RELEASE_DIR}ITKniftiio-4.8"
optimized "${RELEASE_DIR}ITKNrrdIO-4.8"
optimized "${RELEASE_DIR}ITKOptimizers-4.8"
optimized "${RELEASE_DIR}ITKOptimizersv4-4.8"
optimized "${RELEASE_DIR}ITKPath-4.8"
optimized "${RELEASE_DIR}itkpng-4.8"
optimized "${RELEASE_DIR}ITKPolynomials-4.8"
optimized "${RELEASE_DIR}ITKQuadEdgeMesh-4.8"
optimized "${RELEASE_DIR}ITKSpatialObjects-4.8"
optimized "${RELEASE_DIR}ITKStatistics-4.8"
optimized "${RELEASE_DIR}itksys-4.8"
optimized "${RELEASE_DIR}itktestlib-4.8"
optimized "${RELEASE_DIR}itktiff-4.8"
optimized "${RELEASE_DIR}itkv3p_lsqr-4.8"
optimized "${RELEASE_DIR}itkv3p_netlib-4.8"
optimized "${RELEASE_DIR}itkvcl-4.8"
optimized "${RELEASE_DIR}ITKVideoCore-4.8"
optimized "${RELEASE_DIR}ITKVideoIO-4.8"
optimized "${RELEASE_DIR}itkvnl-4.8"
optimized "${RELEASE_DIR}ITKVNLInstantiation-4.8"
optimized "${RELEASE_DIR}itkvnl_algo-4.8"
optimized "${RELEASE_DIR}ITKVTK-4.8"
optimized "${RELEASE_DIR}ITKWatersheds-4.8"
optimized "${RELEASE_DIR}itkzlib-4.8"
optimized "${RELEASE_DIR}ITKznz-4.8"
optimized "${RELEASE_DIR}DeformableRegistration1"
)
这是我用来运行cmake的运行文件
cd build
cmake -G "Visual Studio 11 2012 Win64" ..
cd ..
这是我的 cpp 文件,它是在(减去注释)中找到的示例的拷贝
#include "itkImage.h"
#include "itkImageFileReader.h"
int main( int , char * argv[])
{
typedef unsigned char PixelType;
const unsigned int Dimension = 3;
typedef itk::Image< PixelType, Dimension > ImageType;
typedef itk::ImageFileReader< ImageType > ReaderType;
ReaderType::Pointer reader = ReaderType::New();
const char * filename = argv[1];
reader->SetFileName( filename );
reader->Update();
ImageType::Pointer image = reader->GetOutput();
return EXIT_SUCCESS;
}
当我使用 cmake 运行该示例时,一切都会构建并运行良好,所以问题可能出在我的 cmakeLists 上。我已经尝试查看所有 itk cmake 文件,但我无法弄清楚我应该使用哪些配置。我尝试使用#define SCL_SECURE_NO_WARNINGS(根据 http://public.kitware.com/pipermail/insight-users/2010-September/037992.html ) 但这没有帮助。我想过使用 #define _SECURE_SCL 0 来允许检查迭代器,但是因为当我处于 RelWithDebInfo 模式时出现异常,我认为这不会有帮助。任何人都知道我还可以尝试什么/我有什么错误?
编辑:问题似乎与我的 cmakelists 无关,因为当我尝试构建“HelloWorldInsight”项目(它的 hello world 项目)时,我收到了相同的已检查迭代器警告。
最佳答案
尝试使用
使您的 CMakeLists.txt 文件保持简单find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
无论如何,移动构建版本的 ITK 并不是那么简单,您不应该移动构建目录,而是创建一个安装目录。简而言之,您应该:
有关漂亮的屏幕截图,请参阅 https://stackoverflow.com/a/26286268/1136458 的第一步
关于c++ - 使用 ITK 库的错误和警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31590720/
我已经使用 vue-cli 两个星期了,直到今天一切正常。我在本地建立这个项目。 https://drive.google.com/open?id=0BwGw1zyyKjW7S3RYWXRaX24tQ
您好,我正在尝试使用 python 库 pytesseract 从图像中提取文本。请找到代码: from PIL import Image from pytesseract import image_
我的错误 /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference
我已经训练了一个模型,我正在尝试使用 predict函数但它返回以下错误。 Error in contrasts<-(*tmp*, value = contr.funs[1 + isOF[nn]])
根据Microsoft DataConnectors的信息我想通过 this ODBC driver 创建一个从 PowerBi 到 PostgreSQL 的连接器使用直接查询。我重用了 Micros
我已经为 SoundManagement 创建了一个包,其中有一个扩展 MediaPlayer 的类。我希望全局控制这个变量。这是我的代码: package soundmanagement; impo
我在Heroku上部署了一个应用程序。我正在使用免费服务。 我经常收到以下错误消息。 PG::Error: ERROR: out of memory 如果刷新浏览器,就可以了。但是随后,它又随机发生
我正在运行 LAMP 服务器,这个 .htaccess 给我一个 500 错误。其作用是过滤关键字并重定向到相应的域名。 Options +FollowSymLinks RewriteEngine
我有两个驱动器 A 和 B。使用 python 脚本,我在“A”驱动器中创建一些文件,并运行 powerscript,该脚本以 1 秒的间隔将驱动器 A 中的所有文件复制到驱动器 B。 我在 powe
下面的函数一直返回这个错误信息。我认为可能是 double_precision 字段类型导致了这种情况,我尝试使用 CAST,但要么不是这样,要么我没有做对...帮助? 这是错误: ERROR: i
这个问题已经有答案了: Syntax error due to using a reserved word as a table or column name in MySQL (1 个回答) 已关闭
我的数据库有这个小问题。 我创建了一个表“articoli”,其中包含商品的品牌、型号和价格。 每篇文章都由一个 id (ID_ARTICOLO)` 定义,它是一个自动递增字段。 好吧,现在当我尝试插
我是新来的。我目前正在 DeVry 在线学习中级 C++ 编程。我们正在使用 C++ Primer Plus 这本书,到目前为止我一直做得很好。我的老师最近向我们扔了一个曲线球。我目前的任务是这样的:
这个问题在这里已经有了答案: What is an undefined reference/unresolved external symbol error and how do I fix it?
我的网站中有一段代码有问题;此错误仅发生在 Internet Explorer 7 中。 我没有在这里发布我所有的 HTML/CSS 标记,而是发布了网站的一个版本 here . 如您所见,我在列中有
如果尝试在 USB 设备上构建 node.js 应用程序时在我的树莓派上使用 npm 时遇到一些问题。 package.json 看起来像这样: { "name" : "node-todo",
在 Python 中,您有 None单例,在某些情况下表现得很奇怪: >>> a = None >>> type(a) >>> isinstance(a,None) Traceback (most
这是我的 build.gradle (Module:app) 文件: apply plugin: 'com.android.application' android { compileSdkV
我是 android 的新手,我的项目刚才编译和运行正常,但在我尝试实现抽屉导航后,它给了我这个错误 FAILURE: Build failed with an exception. What wen
谁能解释一下?我想我正在做一些非常愚蠢的事情,并且急切地等待着启蒙。 我得到这个输出: phpversion() == 7.2.25-1+0~20191128.32+debian8~1.gbp108
我是一名优秀的程序员,十分优秀!