- 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/
我在访问 itk::LabelObject 的像素列表时遇到问题。此 LabelObject 是通过 itk::OrientedBoundingBoxLabelObject ( https://git
好吧,我知道很多人都有 Release VS 的这个问题。 Debug模式。我进行了很多搜索,查看了程序的堆栈跟踪并检查了指针。但是,我不明白为什么我的程序在 Debug模式下运行完美,而在 Rele
对于当前的项目,我必须使用矩阵中提供的信息并对其进行数学计算,以及使用 ITK/VTK 函数来显示医疗信息/渲染。基本上我必须以(我猜)50/50 的方式同时使用 matlab 例程和 VTK/ITK
我是 ITK 新手,所以请原谅任何误用的术语。我有一系列 JPEG 文件,其中显示了超声成像软件的屏幕截图。我想只找到屏幕的超声波部分(特别是不是正方形),然后通过一些过滤器运行图像的该部分,使屏幕的
我相信我使用 opencv桥构建了 ITK 。但是,当我编译代码时,出现了一条错误消息: error: 'itk::OpenCVImageBridge' has not been declared 有
我是ITK和VTK医学影像编程的初学者。我想使用下面的代码作为 ITK 读取图像并通过 VTK 显示它。没有其他选择。我让它“成功”“构建”和“运行”。但是我在 VTK 窗口中看不到图像。 #incl
我是 ITK 的新手,在尝试调整图像大小时遇到了麻烦。我觉得我正在遵循示例代码 ( ResampleImageFilter ),但我始终得到一个输出图像,据报告其“总质量”为零,并且在写入磁盘时生
我已经编写了一种从缓冲区创建 Itk 图像的方法(在我的例子中是 Cimg 图像类型)。这是算法: void Cimg_To_ITK (CImg img) { const unsigned i
我是 ITK 的初学者。我必须合并相同尺寸的 ITK 图像。是否有可用于将图像堆叠在一起的过滤器。感谢您的帮助。 最佳答案 您可能需要 image series reader , 或 join ser
我正在使用 ITK 进行一些预处理,我想用 Fast Marching 过滤器和 Geodesic Active Contour 过滤器测试一些东西。我遵循 ITK software guide 中描
我有兴趣尝试使用 SimpleITK 来解决我的成像问题。你能告诉我文档和培训 Material 在哪里吗? 最佳答案 SimpleITK 记录在案 here ,并有一个 tutorial已在 MIC
所以我在 Windows 7 机器上使用 Cmake 和 Mingw 32 来安装 ITK 4.2.1。但是,我收到以下错误。我试图用谷歌搜索答案,但没有找到任何东西。非常感谢任何帮助! [ 1%]
使用 ITK 模块而不是运行 Apache 服务器的 Suexec 有什么好处?思路是一样的,就是用所有者权限而不是nobody、www或者apache来运行脚本! 使用 ITK 来支持 suexec
我正在尝试编写一个 Teamcenter ITK 程序,该程序将作为从主线程调用的不同线程运行。主线程是从 UI 上的操作调用的。由于子线程需要花费大量时间才能完成,如果我不创建子线程并将代码放在主线
我是图片处理的新手,尤其是在使用 ITK 方面。我想计算 Dicom 图像(CT 扫描)的 Canny 过滤器,为此,我需要使用上限和下限阈值调整过滤器。我读了there可以使用图像的中值和统计假设来
在头文件中,我声明了所有这些类型,“Gradient ImageFilter”用于计算二维图像的梯度,“VectorIndexSelectionCastImageFilter”用于选择梯度的“x”和“
我遇到了访问冲突异常的问题。我正在使用 itk 并使用它的文件阅读器读取文件。 ThreeDImageFloatType* MyClass::loadImage(std::string filenam
InsightToolkit 目录中有 Examples/Segmentation/ConnectedThresholdImageFilter.xx 文件。 现在,我想让它对三维图像进行操作。在这种情
我有一些关于 ITK 的问题。我首先创建一个图像。然后我使用“for”来设置每个像素的值。之后,当程序步进到“image->SetSpacing”时出现问题。 VS2010 指出这可能是由于堆的损坏。
我正在尝试在我自己的项目中使用 itk 库。我使用 cmake 3.3 构建了 ITK,并使用 cmake 配置我自己的项目。但是,当我尝试使用 Visual Studio 2012 构建项目时,我收
我是一名优秀的程序员,十分优秀!