itk

ITK, VTK, QT 安装与配置问题记录

放肆的年华 提交于 2019-12-05 11:47:14
问题参考: 问题一:配置完成,运行程序总提示缺少ITKCommon4_*.dll,QVTK.dll等问题: 一 般这种情况是找不到dll所在的路径,环境变量没有设置。在环境变量_path中加入ITK,VTK的bin路径,这样一般就没有什么问题了。bin路径就是自己编译时设置的INSTALL_PREFIX下的bin。 (原以为这些路径的事情Cmake里已经配置了,我还是想多了;为此我还去看了findITK.cmake这类的文件,他确实让VS在编译的时候能够从ITKSrc/Build(Cmake编译处的项目)下寻找了Debug/Release的dll,但找不到执行需要的dll) 问题二:将QT与VTK整合后,QTDesigner不能正常启动了: 网络上提供的教程,一般是将“QVTKWdigetPlugin.dll/.lib”和“QVTK.dll/.lib”四个文件放在/path/to/QT /plugin/designer下面。但是如果四个文件的来源是来自VS编译后的Debug文件夹,就会出现上述的问题。解决方案是在VS中以 Release再次编译VTK,然后将如/bin/release文件夹下的四个文件复制到上述的目录。(本人只编译了QVTK和QVTKWidget也成功了,且如果可以从别的地方拷贝Release版本的也是可以的,没有必要重新编译) //文章转移录,参见: http:/

Where can I find the SimpleITK documentation and reference information?

荒凉一梦 提交于 2019-12-04 11:55:13
问题 I am interested in trying to use SimpleITK to solve my imaging problem. Can you please tell me where the documentation and training materials are? 回答1: SimpleITK is documented here, and has a tutorial that has been presented at the MICCAI 2011 conference. Development of SimpleITK is hosted on Github and feature requests can be entered in Jira. Direct Links: https://github.com/SimpleITK/SimpleITK-MICCAI-2011-Tutorial https://github.com/SimpleITK/SimpleITK http://www.simpleitk.org 回答2: There

Convert Cimg to ITK

非 Y 不嫁゛ 提交于 2019-12-03 18:15:52
问题 I'm trying to convert a Cimg image to itk image to use it for registration algorithm. The Cimg is a RGB image and i want to convert it to RGB itk image. Her is my code : void Cimg_To_ITK (CImg<uchar> img) { const unsigned int Dimension = 2; typedef itk::RGBPixel< unsigned char > RGBPixelType; typedef itk::Image< RGBPixelType, Dimension > RGBImageType; typedef itk::ImportImageFilter< RGBPixelType, Dimension > ImportFilterType; ImportFilterType::Pointer importFilter = ImportFilterType::New();

ITK Importing Image Data from a Buffer

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have coded a method to create an Itk image from a buffer (in my case it's a Cimg image type). This is the algorithme : void Cimg_To_ITK (CImg<uchar> img) { const unsigned int Dimension = 2; typedef itk::RGBPixel< unsigned char > RGBPixelType; typedef itk::Image< RGBPixelType, Dimension > RGBImageType; typedef itk::ImportImageFilter< RGBPixelType, Dimension > ImportFilterType; ImportFilterType::Pointer importFilter = ImportFilterType::New(); typedef itk::ImageFileWriter< RGBImageType > WriterType; WriterType::Pointer writer = WriterType:

ITK笔记――读取DICOM切片

匿名 (未验证) 提交于 2019-12-03 00:06:01
什么是DICOM DICOM(Digital imaging and Communication in Medicine),医学数字成像与通信,它是一个国际标准(ISO 12052),由美国放射学院(ACR)和国家电气制造协会(NEMA)在1970年代共同制定,旨在统一格式,解决医学图像的处理、存储、打印以及传输。 GDCM GDCM(Grassroots DICOM),开源库,DICOM标准的一种实现。ITK的DICOM设施,就是由它提供的。对应 itk::GDCMImageIO 类名。 读取DICOM切片 定义数据类型 using InputPixelType = signed short ; constexpr unsigned int InputDimension = 2 ; using InputImageType = itk :: Image < InputPixelType , InputDimension >; 初始化GDCM接口 using ImageIOType = itk :: GDCMImageIO ; ImageIOType :: Pointer gdcmImageIO = ImageIOType :: New (); 设置ImageFileReader using ReaderType = itk :: ImageFileReader <

Linux下ITK的编译安装

匿名 (未验证) 提交于 2019-12-02 21:56:30
参考 https://itk.org/Wiki/ITK/Getting_Started/Build/Linux 1、首先需要更新cmake版本,因为最新版本的itk编译需要3.10.2以上版本的cmake。尝试使用apt-get进行更新,但由于库源的问题无法正常更新,因此从官网下载最新版本的cmake进行安装: sudo apt-get install build-essential wget https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5.tar.gz tar xf cmake-3.14.5.tar.gz cd cmake-3.14.5 ./configure make sudo make install make --version 可以看到cmake已经更新至3.14.5版本 2、进行ITK文件的编译安装 sudo apt-get install git git clone https://itk.org/ITK.git 下载完成后在ITK文件夹中新建bin路径以进行编译 cd ITK mkdir bin cd bin 接下来进行编译: ccmake .. 按c选择默认配置,配置完成后按g生成makelist,完成后运行make文件进行编译: make -j4 sudo make

how to connect ITK to VTK with c++?

穿精又带淫゛_ 提交于 2019-12-02 01:46:15
问题 I am a beginner in ITK, VTK and Qt. I use visual studio 9. I am trying to read a DICOM series with ITK and display with VTK in QVTKWidget (Qt). I based on this code http://www.itk.org/Wiki/VTK/Examples/Cxx/IO/ReadDICOMSeries and I modified according to my needs. when I read the series DICOM with VTK and display it in QVTKWidget it works, but when I want to read this series with ITK and display with VTK in QVTKWidget, the program displays the first image of series and when I go to the next

how to connect ITK to VTK with c++?

安稳与你 提交于 2019-12-01 22:01:19
I am a beginner in ITK, VTK and Qt. I use visual studio 9. I am trying to read a DICOM series with ITK and display with VTK in QVTKWidget (Qt). I based on this code http://www.itk.org/Wiki/VTK/Examples/Cxx/IO/ReadDICOMSeries and I modified according to my needs. when I read the series DICOM with VTK and display it in QVTKWidget it works, but when I want to read this series with ITK and display with VTK in QVTKWidget, the program displays the first image of series and when I go to the next image with the mouse wheel, the program crashes. when I debugged, I got this error: void

How are the spacing value of the z dimension and thickness (0018, 0050) different in dicom series?

会有一股神秘感。 提交于 2019-12-01 11:08:31
I've been studying some dicom series and find that the thickness attribute and the itkimage.GetSpacing()[2] value are not always consistent. For example the thickness (0018, 0050) value encoded in the dcm file is 1.5 mm but the corresponding spacing indicated simpleITK on z axis is 1.00 . Then what value should I use to indicate the physical distance between adjacent voxel center s on the z axis? If they are different things then What do spacings actually mean? I retrieve thickness and spacing values in python like this: //thickness using dicom thickness = dicom.read_file(dcm_file)[0x0018,

ITK笔记——读取DICOM切片

删除回忆录丶 提交于 2019-11-29 17:18:58
什么是DICOM DICOM(Digital imaging and Communication in Medicine),医学数字成像与通信,它是一个国际标准(ISO 12052),由美国放射学院(ACR)和国家电气制造协会(NEMA)在1970年代共同制定,旨在统一格式,解决医学图像的处理、存储、打印以及传输。 GDCM GDCM(Grassroots DICOM),开源库,DICOM标准的一种实现。ITK的DICOM设施,就是由它提供的。对应 itk::GDCMImageIO 类名。 读取DICOM切片 定义数据类型 using InputPixelType = signed short; constexpr unsigned int InputDimension = 2; using InputImageType = itk::Image< InputPixelType, InputDimension >; 初始化GDCM接口 using ImageIOType = itk::GDCMImageIO; ImageIOType::Pointer gdcmImageIO = ImageIOType::New(); 设置ImageFileReader using ReaderType = itk::ImageFileReader< InputImageType >;