资源简介
基于VTK的人头骨3D图像,用的是表面重建的方法。工具是vs2005,程序比较简单,用于初学者。
代码片段和文件信息
// DicomLoad.cpp: implementation of the CDicomLoad class.
//
//////////////////////////////////////////////////////////////////////
#include “stdafx.h“
#include “Medical3D.h“
#include “DicomLoad.h“
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CDicomLoad::CDicomLoad()
{
fliterMethod=0;
int i;
for (i=0;i<9;i++)
kernel[i]=1;
resample[0]=1;
resample[1]=1;
resample[2]=1;
RadiusFactors[0]=2;
RadiusFactors[1]=2;
RadiusFactors[2]=1;
reader = vtkDICOMImageReader::New();
reader->SetDataByteOrderToLittleEndian();
ShiftScale = vtkImageShiftScale::New();
ShiftScale->SetOutputScalarTypeToShort();
ShiftScale->SetShift (1024);
ShiftScale->ClampOverflowOn();
readerImageCast = vtkImageCast::New();
readerImageCast->SetOutputScalarTypeToUnsignedShort();
readerImageCast->ClampOverflowOn();
kernelfliter=vtkImageConvolve::New();
gauss=vtkImageGaussianSmooth::New();
HybridMedian2D=vtkImageHybridMedian2D::New();
pImageResample=vtkImageResample::New();
}
CDicomLoad::~CDicomLoad()
{
reader->Delete() ;
ShiftScale->Delete();
readerImageCast->Delete();
kernelfliter->Delete();
gauss->Delete();
HybridMedian2D->Delete();
pImageResample->Delete();
}
void CDicomLoad::pipeBuilding(CString path)
{
this->directory=path;
this->reader->SetDirectoryName(this->directory);
this->reader->Update();
switch (this->fliterMethod)
{
case 1:
this->kernelfliter->SetInputConnection(reader->GetOutputPort());
this->kernelfliter->SetKernel3x3 (kernel) ;
this->pImageResample->SetInputConnection(kernelfliter->GetOutputPort());
this->pImageResample->SetAxisMagnificationFactor(0 resample[0]);
this->pImageResample->SetAxisMagnificationFactor(1 resample[1]);
this->pImageResample->SetAxisMagnificationFactor(2 resample[2]);
break;
case 2:
this->gauss->SetInputConnection(reader->GetOutputPort());
this->gauss->SetRadiusFactors (RadiusFactors) ;
this->pImageResample->SetInputConnection(gauss->GetOutputPort());
this->pImageResample->SetAxisMagnificationFactor(0 resample[0]);
this->pImageResample->SetAxisMagnificationFactor(1 resample[1]);
this->pImageResample->SetAxisMagnificationFactor(2 resample[2]);
break;
case 3:
HybridMedian2D->SetInputConnection(reader->GetOutputPort());
this->pImageResample->SetInputConnection(HybridMedian2D->GetOutputPort());
this->pImageResample->SetAxisMagnificationFactor(0 resample[0]);
this->pImageResample->SetAxisMagnificationFactor(1 resample[1]);
this->pImageResample->SetAxisMagnificationFactor(2 resample[2]);
break;
default ://无滤波操作
this->pImageResample->SetInputConnection(reader->GetOutputPor
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 883 2011-07-09 15:37 3D_Surface\3D_Surface.sln
..A..H. 7168 2011-07-09 15:37 3D_Surface\3D_Surface.suo
文件 10820 2011-07-09 10:14 3D_Surface\3D_Surface.vcproj
文件 1413 2011-07-09 15:37 3D_Surface\3D_Surface.vcproj.LIYONGYI.Administrator.user
文件 20962 2011-07-09 15:35 3D_Surface\Debug\BuildLog.htm
文件 3407 2007-07-16 15:40 3D_Surface\DicomLoad.cpp
文件 1155 2007-07-11 20:38 3D_Surface\DicomLoad.h
文件 41952 2011-07-09 10:16 3D_Surface\Medical3D.aps
文件 2105 2007-07-11 19:42 3D_Surface\Medical3D.cpp
文件 5367 2007-07-16 17:21 3D_Surface\Medical3D.dsp
文件 1357 2007-07-11 19:42 3D_Surface\Medical3D.h
文件 4547 2011-07-08 10:07 3D_Surface\Medical3D.rc
文件 7521 2011-07-09 09:37 3D_Surface\Medical3DDlg.cpp
文件 2073 2011-07-08 10:07 3D_Surface\Medical3DDlg.h
文件 3633 2007-07-11 19:42 3D_Surface\ReadMe.txt
文件 21630 2005-12-08 14:56 3D_Surface\res\Medical3D.ico
文件 358 2010-11-19 18:16 3D_Surface\res\Medical3D.rc2
文件 1021 2011-07-08 10:08 3D_Surface\Resource.h
文件 211 2007-07-11 19:42 3D_Surface\StdAfx.cpp
文件 1054 2007-07-11 19:42 3D_Surface\StdAfx.h
文件 4769 2011-07-06 16:13 3D_Surface\SurfaceRender.cpp
文件 1959 2007-07-16 14:07 3D_Surface\SurfaceRender.h
目录 0 2011-07-09 15:37 3D_Surface\Debug
目录 0 2011-07-09 09:40 3D_Surface\res
目录 0 2011-07-09 15:38 3D_Surface
----------- --------- ---------- ----- ----
145365 25
相关资源
- sensor-win64-5.1.2.1-redist.msi
- 详细介绍哦ioctl函数用法, 一看必然
- projectDSP.zip单片机TMS320F28027的温度测试
- Differential Privacy From Theory to Practice.p
- CTeX宏包手册2.4版
- ICT新手不得不看的小技巧
-
关于ob
jectarx中acedCmd和acedCommand - Yearbook of World Electronics Data 2016
- 利用栈求表达式的值
- 220vto5v_Project.rar
- Activiti最新工作流教学及项目源码网盘
- 数字图像处理实验项目_Laboratory Proj
- 1.11 自定义过渡动画
- Corel.All.Products.Universal.Keygens.by.CORE.v
- 双向bidirectional RRT
- opencv视频资料教程,51cto贾志刚录制的
- 3d重建CT图像重建代码
- activiti将用户输入框修改为弹出选择框
- MCT短信验证软件.exe
- project案例项目管理实验报告——本科
- DCT数字水印嵌入与提取过程
- Kinect2.0开发文档
- Kinect获取深度图像
- 交互式多模型 IMMCT/CV混合及代码实现
- PCtoLCD2002
- unity中StormEffects天气特效
- LOPEX数据库
- 支持向量数据描述Support Vector Data De
- Corel.Products.MultiKeygen-XFORCE.rar
- wxCheckedListCtrl带checkbox的ListCtrl
评论
共有 条评论