久久99精品久久久久久琪琪,久久人人爽人人爽人人片亞洲,熟妇人妻无码中文字幕,亚洲精品无码久久久久久久

C++讀取序列CT圖片三維顯示(面繪制)

時間:2019-05-14 02:45:35下載本文作者:會員上傳
簡介:寫寫幫文庫小編為你整理了多篇相關的《C++讀取序列CT圖片三維顯示(面繪制)》,但愿對你工作學習有幫助,當然你在寫寫幫文庫還可以找到更多《C++讀取序列CT圖片三維顯示(面繪制)》。

第一篇:C++讀取序列CT圖片三維顯示(面繪制)

C++讀取序列CT圖片三維顯示(面繪制)2007-11-17 15:24 分類:vtk 字號: 大 中 小

#include “vtkRenderer.h” #include “vtkRenderWindow.h” #include “vtkRenderWindowInteractor.h” #include “vtkDICOMImageReader.h” #include “vtkPolyDataMapper.h” #include “vtkActor.h” #include “vtkOutlineFilter.h” #include “vtkCamera.h” #include “vtkProperty.h” #include “vtkPolyDataNormals.h” #include “vtkContourFilter.h”

void main(){

// Create the renderer, the render window, and the interactor.The renderer // draws into the render window, the interactor enables mouse-and // keyboard-based interaction with the data within the render window.// vtkRenderer *aRenderer = vtkRenderer::New();vtkRenderWindow *renWin = vtkRenderWindow::New();

renWin->AddRenderer(aRenderer);vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();

iren->SetRenderWindow(renWin);

// The following reader is used to read a series of 2D slices(images)// that compose the volume.The slice dimensions are set, and the // pixel spacing.The data Endianness must also be specified.The reader // usese the FilePrefix in combination with the slice number to construct // filenames using the format FilePrefix.%d.(In this case the FilePrefix // is the root name of the file: quarter.)vtkDICOMImageReader *v16 = vtkDICOMImageReader::New();// v16->SetDataDimensions(64,64);// v16->SetImageRange(1,93);

v16->SetDataByteOrderToLittleEndian();

v16->SetDirectoryName(“E://03280848”);

v16->SetDataSpacing(3.2, 3.2, 1.5);

// An isosurface, or contour value of 500 is known to correspond to the // skin of the patient.Once generated, a vtkPolyDataNormals filter is // is used to create normals for smooth surface shading during rendering.vtkContourFilter *skinExtractor = vtkContourFilter::New();

skinExtractor->SetInputConnection(v16->GetOutputPort());

skinExtractor->SetValue(0, 500);vtkPolyDataNormals *skinNormals = vtkPolyDataNormals::New();

skinNormals->SetInputConnection(skinExtractor->GetOutputPort());

skinNormals->SetFeatureAngle(60.0);vtkPolyDataMapper *skinMapper = vtkPolyDataMapper::New();

skinMapper->SetInputConnection(skinNormals->GetOutputPort());

skinMapper->ScalarVisibilityOff();vtkActor *skin = vtkActor::New();

skin->SetMapper(skinMapper);

// An outline provides context around the data.// vtkOutlineFilter *outlineData = vtkOutlineFilter::New();

outlineData->SetInputConnection(v16->GetOutputPort());vtkPolyDataMapper *mapOutline = vtkPolyDataMapper::New();

mapOutline->SetInputConnection(outlineData->GetOutputPort());vtkActor *outline = vtkActor::New();

outline->SetMapper(mapOutline);

outline->GetProperty()->SetColor(0,0,0);

// It is convenient to create an initial view of the data.The FocalPoint // and Position form a vector direction.Later on(ResetCamera()method)// this vector is used to position the camera to look at the data in // this direction.vtkCamera *aCamera = vtkCamera::New();

aCamera->SetViewUp(0, 0,-1);

aCamera->SetPosition(0, 1, 0);

aCamera->SetFocalPoint(0, 0, 0);

aCamera->ComputeViewPlaneNormal();

// Actors are added to the renderer.An initial camera view is created.// The Dolly()method moves the camera towards the FocalPoint, // thereby enlarging the image.aRenderer->AddActor(outline);aRenderer->AddActor(skin);aRenderer->SetActiveCamera(aCamera);aRenderer->ResetCamera();aCamera->Dolly(1.5);

// Set a background color for the renderer and set the size of the // render window(expressed in pixels).aRenderer->SetBackground(1,1,1);renWin->SetSize(640, 480);

// Note that when camera movement occurs(as it does in the Dolly()// method), the clipping planes often need adjusting.Clipping planes // consist of two planes: near and far along the view direction.The // near plane clips out objects in front of the plane;the far plane // clips out objects behind the plane.This way only what is drawn // between the planes is actually rendered.aRenderer->ResetCameraClippingRange();

// Initialize the event loop and then start it.iren->Initialize();iren->Start();

// It is important to delete all objects created previously to prevent // memory leaks.In this case, since the program is on its way to // exiting, it is not so important.But in applications it is // essential.v16->Delete();skinExtractor->Delete();skinNormals->Delete();skinMapper->Delete();skin->Delete();outlineData->Delete();mapOutline->Delete();outline->Delete();aCamera->Delete();iren->Delete();renWin->Delete();aRenderer->Delete();

}

下載C++讀取序列CT圖片三維顯示(面繪制)word格式文檔
下載C++讀取序列CT圖片三維顯示(面繪制).doc
將本文檔下載到自己電腦,方便修改和收藏,請勿使用迅雷等下載。
點此處下載文檔

文檔為doc格式


聲明:本文內容由互聯網用戶自發貢獻自行上傳,本網站不擁有所有權,未作人工編輯處理,也不承擔相關法律責任。如果您發現有涉嫌版權的內容,歡迎發送郵件至:645879355@qq.com 進行舉報,并提供相關證據,工作人員會在5個工作日內聯系你,一經查實,本站將立刻刪除涉嫌侵權內容。

相關范文推薦

    主站蜘蛛池模板: 亚洲制服有码在线丝袜| 人人爽天天碰天天躁夜夜躁| 国产精品久久久久久久久久直播| 欧美性大战xxxxx久久久√| 无码精品国产dvd在线观看久9| 揄拍成人国产精品视频| 四虎国产成人永久精品免费| 无码人妻丰满熟妇啪啪网不卡| 漂亮人妻被中出中文字幕久久| 午夜自产精品一区二区三区| 欧美日产国产精品| 亚洲av午夜成人片精品电影| 激情综合色综合啪啪开心| 国产成年女人毛片80s网站| 国产成人精品s8视频| 狠狠色丁香婷婷亚洲综合| 精品露脸国产偷人在视频| 成人毛片一区二区| 色偷偷偷久久伊人大杳蕉| 日本不卡高清一区二区三区| 欧美mv日韩mv国产网站| 舌头伸进去添的我好爽高潮欧美| 亚洲精品无码不卡在线播放| 亚洲三级在线中文字幕| 又大又粗又爽18禁免费看| 国产成人精品s8视频| 中国精品18videosex性中国| 国产欧美日韩一区二区三区在线| 亚洲精品国产二区图片欧美| 美女裸奶100%无遮挡免费网站| 亚洲精品97久久中文字幕无码| 朝鲜女人大白屁股ass孕交| 国产女厕所盗摄老师厕所嘘嘘| 精品少妇一区二区三区免费观| 思思久久精品一本到99热| 狠狠爱亚洲综合久久| 无码精品一区二区三区免费视频| 护士脱了内裤让我爽了一夜视频| 国产精品成人免费999| 特黄特色的大片观看免费视频| 亚洲国产精品久久久久秋霞1|