我有兴趣尝试使用SimpleITK来解决我的成像问题.你能告诉我文件和培训材料在哪里吗?
您好我试图在Windows 8下使用CMake编译VTK和ITK.ITK编译完美,但当我尝试通过CMake处理VTK时,我得到错误cmTryCompileExec has stopped working.我怎么解决这个问题?我的CMake版本是2.8.12.1
我正在尝试从Insight Toolkit(ITK,itk.org)制作一个Xcode项目.我向终端发出以下命令:
ccmake -DCMAKE_C_COMPILER=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -DCMAKE_CXX_COMPILER=/Applications/Xcode.app/Contents/Developer/usr/bin/g++ -GXcode /<path to source>
Run Code Online (Sandbox Code Playgroud)
当我尝试生成项目时,它失败并出现此错误:
CMake Error at /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "/Applications/Xcode.app/Contents/Developer/usr/bin/gcc" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /<path to destination folder>/CMakeFiles/CMakeTmp
Run Build Command:/Applications/CMake\ 2.8-7.app/Contents/bin/cmakexbuild -project CMAKE_TRY_COMPILE.xcode build -target cmTryCompileExec -buildstyle Development
xcodebuild: error: option '-buildstyle' is no longer supported
Run Code Online (Sandbox Code Playgroud)
如何配置对cmakexbuild的调用?我没有在CMake配置菜单中找到相应的条目.
我发现其他用户与其他项目有类似的问题所以我认为这是CMake配置的问题.
我在Mac OS X Lion 10.7.3上使用Xcode 4.3和CMake 2.8.7.
谢谢你的帮助,
保罗
我正在尝试texture features使用带有C++的ITK库计算分段式3D脑MRI .所以我按照这个例子.该示例采用a 3D image,并为所有13个可能的空间方向提取3个不同的特征.在我的程序中,我只想获得给定的3D图像:
这是我到目前为止:
//definitions of used types
typedef itk::Image<float, 3> InternalImageType;
typedef itk::Image<unsigned char, 3> VisualizingImageType;
typedef itk::Neighborhood<float, 3> NeighborhoodType;
typedef itk::Statistics::ScalarImageToCooccurrenceMatrixFilter<InternalImageType>
Image2CoOccuranceType;
typedef Image2CoOccuranceType::HistogramType HistogramType;
typedef itk::Statistics::HistogramToTextureFeaturesFilter<HistogramType> Hist2FeaturesType;
typedef InternalImageType::OffsetType OffsetType;
typedef itk::AddImageFilter <InternalImageType> AddImageFilterType;
typedef itk::MultiplyImageFilter<InternalImageType> MultiplyImageFilterType;
void calcTextureFeatureImage (OffsetType offset, InternalImageType::Pointer inputImage)
{
// principal variables
//Gray Level Co-occurance Matrix Generator
Image2CoOccuranceType::Pointer glcmGenerator=Image2CoOccuranceType::New();
glcmGenerator->SetOffset(offset);
glcmGenerator->SetNumberOfBinsPerAxis(16); //reasonable number of bins
glcmGenerator->SetPixelValueMinMax(0, …Run Code Online (Sandbox Code Playgroud) 我需要完成演示项目,旨在识别X射线图像上的牙齿.我不熟悉这个主题,我不确定在这种情况下哪种方法更适合.(我在考虑纹理分割 - 但这只是一个猜测,我仍然不确定这是否是一个选项)
我需要做的是基本上获得牙齿的方向(角度)和放置在每个牙齿轮廓上的点集,以完成任务特定的计算.
请提供有关可能有用的方法和算法/库的建议.C#是可以执行的,但其他语言也可以.
提前致谢.
图像样本都与此类似(我特别感兴趣的是右边第二和第三颗牙齿):

我正在尝试使用Simple-itk托管的dll在.bmp图像上应用CannyEdgeDetectionImageFilter.
这是我的代码:
itk.simple.Image image1= SimpleITK.ReadImage("Input.bmp");
ImageFileReader read = new ImageFileReader();
read.SetFileName("Input.bmp");
read.Execute();
CannyEdgeDetectionImageFilter canny = new CannyEdgeDetectionImageFilter();
itk.simple.Image image2= canny.Execute(image1);//I got below exception here.
ImageFileWriter write = new ImageFileWriter();
write.SetFileName("Output.bmp");
write.Execute(image2,"Output.bmp", true);
Run Code Online (Sandbox Code Playgroud)
我在执行CannyEdgeDetectionImageFilter时遇到了这个异常.
sitk ::错误:像素类型:2D byclass itk :: simple :: CannyEdgeDetectionImageFilter不支持8位无符号整数向量
如何将这个不受支持的东西投射到simpleitk支持的东西?
这是对我的代码的一些补充.我试图将8位无符号整数的向量转换为支持的整数,但是在这里我没有做到这一点.
CastImageFilter cast = new CastImageFilter();
PixelIDValueEnum p= cast.GetOutputPixelType();
image1= SimpleITK.Cast(image1, p);//I got below exception here.
Run Code Online (Sandbox Code Playgroud)
sitk ::错误:过滤器不支持从8位无符号整数的转换向量转换为32位浮点数
我还能做些什么来处理这段代码吗?
任何帮助表示赞赏.
我在CPP中使用ITK编写了一个类,它读取目录中的所有文件然后对它们进行平均.我想在使用Python构建的管道中使用此类.
我之前曾尝试使用Swig来包装模板代码,但根据swig文档,它没有模板支持,并且需要明确指定类型名称.但是当我在Python中使用ITK时,界面与我对Swig生成的模板代码的期望非常不同(类型名称根本没有在函数/类名中指定,这与Swig文档所说的相反).
我的代码中的一个小片段说明了该类的用法如下所示:
typedef unsigned char PixelType;
typedef itk::Image<PixelType, 2> ImageType;
typedef itk::NaryMeanImageFilter< ImageType, ImageType > FilterType; // custom class
typedef itk::ImageFileReader<ImageType> ReaderType;
typedef itk::ImageFileWriter<ImageType> WriterType;
ImageType::Pointer image = ImageType::New();
ReaderType::Pointer reader = ReaderType::New();
WriterType::Pointer writer = WriterType::New();
FilterType::Pointer filter = FilterType::New(); // custom class
for (unsigned int i = 0; i< fileNames.size(); ++i)
{
reader->SetFileName(fileNames[i]);
filter->SetInput(i, reader->GetOutput()); // custom class
}
writer->SetFileName(outName);
writer->SetInput(filter->GetOutput());
writer->Update();
Run Code Online (Sandbox Code Playgroud)
可以在Git存储库中看到该类的代码.我没有使用Boost :: Python增加项目依赖性的问题,但我需要一个起点继续.任何帮助将非常感激.
谢谢.
更新:
Python中的预期用法是,
readerType=itk.ImageFileReader[inputImageType] …Run Code Online (Sandbox Code Playgroud) 我\xe2\x80\x99一直在尝试在新PC上设置ITK,但当我在项目上运行CMake时遇到了问题。
\n\n我下载了 ITK 4.8.2,将其解压,使用 CMake 配置并一如既往地生成。然而,这次 CMake 发出以下错误:
\n\nCMake Error at CMakeLists.txt:4 (find_package):\n By not providing "FindITK.cmake" in CMAKE_MODULE_PATH this project has\n asked CMake to find a package configuration file provided by "ITK", but\n CMake did not find one.\n\n Could not find a package configuration file provided by "ITK" with any of\n the following names:\n\n ITKConfig.cmake\n itk-config.cmake\n\n Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set "ITK_DIR"\n to a directory containing one of the above files. If …Run Code Online (Sandbox Code Playgroud) 寻找参考代码,最好在 python 中从 CT 生成 XRAY。
这应该模拟尽可能多的以下因素:
衰减 (LUT)
焦点
X 射线束形状和角度
X 射线能量 (keV)
我已经熟悉以下选项并寻找更好的选择:
我正在尝试使用 X11 转发来容器化基于 QT 的 GUI 应用程序(特别是ITK-SNAP)。itk-snap:3.8当我使用以下 Dockerfile构建图像(我们称之为)时
# 16.04 because https://askubuntu.com/a/895903
FROM ubuntu:16.04
WORKDIR /opt
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl libcurl3 libgl1-mesa-dev libsm6 libice6 libxext6 libxrender1 libdbus-1-3 libvips-dev xorg libx11-dev libglu1-mesa-dev libfreetype6-dev freeglut3 freeglut3-dev mesa-common-dev libglew1.5-dev libglm-dev mesa-utils libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core && \
curl -LO https://sourceforge.net/projects/itk-snap/files/itk-snap/3.8.0/itksnap-3.8.0-20190612-Linux-x86_64.tar.gz && \
tar -xvzf itksnap-3.8.0-20190612-Linux-x86_64.tar.gz && \
rm -rf itksnap-3.8.0-20190612-Linux-x86_64.tar.gz
ENV PATH=$PATH:/opt/itksnap-3.8.0-20190612-Linux-gcc64/bin
CMD itksnap
Run Code Online (Sandbox Code Playgroud)
我可以运行它
# `xhost +` to allow any X conn, get display …Run Code Online (Sandbox Code Playgroud)