资源简介
通过应用vtk,实现MC面绘制。快速,准确。
代码片段和文件信息
/*
使用vtkDICOMImageReader 读取序列CT图像
*/
#include “vtkRenderer.h“
#include “vtkRenderWindow.h“
#include “vtkRenderWindowInteractor.h“
#include “vtkVolume16Reader.h“
#include “vtkPolyDataMapper.h“
#include “vtkActor.h“
#include “vtkLODActor.h“
#include “vtkOutlineFilter.h“
#include “vtkCamera.h“
#include “vtkProperty.h“
#include “vtkPolyDataNormals.h“
#include “vtkContourFilter.h“
#include “vtkMarchingCubes.h“
#include “vtkDICOMImageReader.h“
#include “vtkImageCast.h“
#include “vtkDecimatePro.h“
#include “vtkStripper.h“
#include “vtkImageShrink3D.h“
#include “vtkSmoothPolyDataFilter.h“
#include “vtkLight.h“
#include “vtkFeatureEdges.h“
#include “vtkPolyDataWriter.h“
#include “vtkImageData.h“
#include “vtkEdgePoints.h“
#include “vtkVRMLExporter.h“
#include “vtkSurfaceReconstructionFilter.h“
#include “vtkMaskPoints.h“
#include “vtkDelaunay2D.h“
#include “vtkVRMLExporter.h“
#include “vtkImageGradient.h“
#include “math.h“
#include “vtkElevationFilter.h“
#include “vtkCylinder.h“
#include “vtkShrinkFilter.h“
#include “vtkTransform.h“
#include “vtkStructuredPointsWriter.h“
#include “vtkImplicitDataSet.h“
#include “vtkExtractVOI.h“
#include “vtkImageHybridMedian2D.h“
#include “vtkDataSetToStructuredPointsFilter.h“
#include “vtkImplicitModeller.h“
#include “vtkImageClip.h“
#include “vtkImageGradient.h“
#include “vtkImageViewer.h“
#include “vtkImageReslice.h“
#include “vtkTriangleFilter.h“
#include “vtkMarchingCubes.h“
#include
#include “vtkMarchingContourFilter.h“
#include
#include
#include
#include
#include
#include
#include
#include
int main ()
{
vtkRenderer *aRenderer = vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->AddRenderer(aRenderer);
renWin->SetDesiredUpdateRate (5.0);
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
vtkDICOMImageReader *reader = vtkDICOMImageReader::New();
reader->SetDataByteOrderToLittleEndian();
reader->SetDirectoryName(“E://CT/titian1“);
vtkImageShrink3D *shrink=vtkImageShrink3D::New();
shrink->SetInput((vtkDataobject *)reader->GetOutput());
shrink->SetShrinkFactors(881);
vtkImageMarchingCubes *skinExtractor = vtkImageMarching
评论
共有 条评论