[vtkusers] what's wrong in this pipeline
Ali Habib
ali.mahmoud.habib at gmail.com
Thu Oct 6 12:22:54 EDT 2011
I want to display the 3D of DICOM but there's no output, I use activiz , any
idea what's wrong in my code
vtkDICOMImageReader VDR = vtkDICOMImageReader.New();
VDR.SetDirectoryName(@"E:\Master Degree\DataSet\08151407");
//E:\Master Degree\test DataSet\Asmaa_pre\08151449
VDR.SetDataOrigin(0, 0, 0);
VDR.Update();
vtkImageGaussianSmooth gaussfilter =
vtkImageGaussianSmooth.New();
gaussfilter.SetInputConnection(VDR.GetOutputPort());
gaussfilter.Update();
vtkImageShrink3D VIS = vtkImageShrink3D.New();
VIS.SetShrinkFactors(4, 4, 4);
VIS.SetInputConnection(gaussfilter.GetOutputPort());
VIS.Update();
vtkMarchingCubes SkinExtractor = new vtkMarchingCubes();
SkinExtractor.SetInputConnection(VIS.GetOutputPort());
SkinExtractor.SetValue(0, -800);
SkinExtractor.Update();
vtkPolyDataMapper mapper = vtkPolyDataMapper.New();
mapper.SetInputConnection(SkinExtractor.GetOutputPort());
vtkLODActor actor = vtkLODActor.New();
actor.SetMapper(mapper);
actor.GetProperty().SetColor(1, 0, 0);
vtkRenderer ren1 =
renderA.RenderWindow.GetRenderers().GetFirstRenderer();
vtkRenderWindow renWin = renderA.RenderWindow;
ren1.AddViewProp(actor);
// renWin.SetSize(250, 250);
renWin.Render();
renderA.Refresh();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111006/a94aa45b/attachment.htm>
More information about the vtkusers
mailing list