[vtkusers] Fwd: Need your help in vtk
Ali Habib
ali.mahmoud.habib at gmail.com
Sun Jan 23 16:32:06 EST 2011
Hi
I asked alot in VTK forum without reply .I finished alot of progress , my
pipeline is
reading DICOM -> build iso surface , cut and process on the 3D.
the problem is that the large is the dataset the slow is the output and the
performance decrease incredibly
I use vtkContourFilter for rendering 3D , dod uhave any suggestion to fix
the performance , this is the code I use
vtk.vtkDICOMImageReader VDR = new vtk.vtkDICOMImageReader();
VDR.SetDirectoryName(@"E:\Master
Degree\DataSet\case2\DICOM\PA1\ST1\SE2");
VDR.SetDataOrigin(0, 0, 0);
VDR.Update();
// decrease the dataset data for large data preprocessing
vtkImageShrink3D VIS = new vtkImageShrink3D();
VIS.SetShrinkFactors(2, 2, 2);
VIS.SetInputConnection(VDR.GetOutputPort());
VIS.Update();
vtkImageThreshold VIT = new vtkImageThreshold();
VIT.ThresholdBetween(200, 2000);
VIT.SetInputConnection(VIS.GetOutputPort());
VIT.Update();
///// Start the creation of volume rendering
//1. Gget the range of data
vtk.vtkImageChangeInformation VIC = new
vtk.vtkImageChangeInformation();
VIC.SetInput(VDR.GetOutput());
VIC.CenterImageOn();
VIC.Update();
vtk.vtkImageData VoxelData = new vtk.vtkImageData();
VoxelData = VIC.GetOutput();
double[] metaScalarRange = VoxelData.GetScalarRange();
// Render the skin - Soft tissue
double isovalue= - 963 ;//= 0.8 * (metaScalarRange[1] +
metaScalarRange[0]);
vtkContourFilter skinExtractor = new vtkContourFilter();
skinExtractor.SetInputConnection(VIT.GetOutputPort());
skinExtractor.SetValue(0, isovalue);
//skinExtractor.GenerateValues(1,-300,300);
skinExtractor.ComputeGradientsOn();
skinExtractor.Update();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110123/40260496/attachment.htm>
More information about the vtkusers
mailing list