level 8
臭臭爸YY
楼主
vtkMarchingCubes 提取等值面,可是用不同的reader传过去的数据,提取的等值面不同。
两个reader分别是用的是vtkGdcmReader和vtkGDCMImageReader
还请指教呀。好愁人~~~~~~~~~~~~~~
shrink->SetInputData((vtkDataObject *)inputImage;
shrink->SetShrinkFactors(4, 4, 1);
MCExtractor->SetInputConnection(shrink->GetOutputPort());
MCExtractor->SetValue(0, 130);//阈值都是130
MCExtractor->ComputeGradientsOn();
MCExtractor->ComputeScalarsOff();
decimate->SetInputConnection(MCExtractor->GetOutputPort());
decimate->SetTargetReduction(0.2);
smootha->SetInputConnection(decimate->GetOutputPort());
smootha->SetNumberOfIterations(100);
Normals->SetInputConnection(smootha->GetOutputPort());
Normals->SetFeatureAngle(60.0);
stripper->SetInputConnection(Normals->GetOutputPort());
skinMapper->SetInputConnection(stripper->GetOutputPort());
skinMapper->ScalarVisibilityOff();
skint->SetMapper(skinMapper);
skint->GetProperty()->SetDiffuseColor(1, 0.49, 0.25);
skint->GetProperty()->SetSpecular(.3);
skint->GetProperty()->SetSpecularPower(20);



2017年05月25日 03点05分
1
两个reader分别是用的是vtkGdcmReader和vtkGDCMImageReader
还请指教呀。好愁人~~~~~~~~~~~~~~
shrink->SetInputData((vtkDataObject *)inputImage;
shrink->SetShrinkFactors(4, 4, 1);
MCExtractor->SetInputConnection(shrink->GetOutputPort());
MCExtractor->SetValue(0, 130);//阈值都是130
MCExtractor->ComputeGradientsOn();
MCExtractor->ComputeScalarsOff();
decimate->SetInputConnection(MCExtractor->GetOutputPort());
decimate->SetTargetReduction(0.2);
smootha->SetInputConnection(decimate->GetOutputPort());
smootha->SetNumberOfIterations(100);
Normals->SetInputConnection(smootha->GetOutputPort());
Normals->SetFeatureAngle(60.0);
stripper->SetInputConnection(Normals->GetOutputPort());
skinMapper->SetInputConnection(stripper->GetOutputPort());
skinMapper->ScalarVisibilityOff();
skint->SetMapper(skinMapper);
skint->GetProperty()->SetDiffuseColor(1, 0.49, 0.25);
skint->GetProperty()->SetSpecular(.3);
skint->GetProperty()->SetSpecularPower(20);


