实例23:DCM医学图像信息的访问(图像维数、原点坐标和像素间隔)
#include "vtkAutoInit.h"
VTK_MODULE_INIT(vtkRenderingOpenGL2);
VTK_MODULE_INIT(vtkInteractionStyle);
#include <vtkSmartPointer.h>
#include <vtkImageViewer2.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkRenderer.h>
#include <vtkImageReader2Factory.h>
#include <vtkImageReader2.h>
//#include <vtkBMPReader.h>
#include <vtkImageData.h>
#include <vtkDICOMImageReader.h>//DCM医学文件读取类
//测试图像:../data/lena.bmp
int main(int argc, char* argv[])
{
/*vtkSmartPointer<vtkBMPReader> reader =
vtkSmartPointer<vtkBMPReader>::New();*/
//实例化一个对象dcmReader
vtkDICOMImageReader* reader = vtkDICOMImageReader::New();
reader->SetFileName("C:\\Users\\Administrator\\Desktop\\VTK2\\hellovtk\\CT\\123.dcm");//读单张切片
//rea