[vtkusers] strange output, any advice please

David Doria daviddoria+vtk at gmail.com
Thu Dec 17 08:49:28 EST 2009


On Thu, Dec 17, 2009 at 8:08 AM, Ali Habib <ali.mahmoud.habib at gmail.com> wrote:
> Dear Bill,
> I used VtkDelunary3D instead of 2D, and I used before reconstruction series
> of fillters to decrease the dataset ,attached is the output
>
> The code I used is :
>
> vtkDICOMImageReader v16 =  vtkDICOMImageReader::New();
>
>             v16->SetDirectoryName(@"D:\work\Master
> Degree\DataSet\case2\DICOM\PA1\ST1\SE2");
>
>             v16->SetDataOrigin(2, 2, 1);
>
>             v16->Update();
>
>             /////////////////////Pre processing
>
>             // STEP 1:
>
>             vtkImageShrink3D VIS =  vtkImageShrink3D::New();
>
>             VIS->SetInputConnection(v16->GetOutputPort());
>
>             VIS->SetShrinkFactors(2, 2, 1);
>
>             VIS->Update();
>
>             // STEP 2:
>
>             vtkImageThreshold VIT =  vtkImageThreshold::New();
>
>             VIT->SetInputConnection(VIS->GetOutputPort());
>
>             VIT->ThresholdByLower(200);
>
>             VIT->ThresholdByUpper(2000);
>
>             VIT->Update();
>
>             //step3
>
>             vtkImageGaussianSmooth VIG = vtkImageGaussianSmooth::New();
>
>             VIG->SetInputConnection(VIS->GetOutputPort());
>
>             VIG->SetStandardDeviation(1.4, 1.4, 1.4);
>
>             VIG->Update();
>
>
>
>             //////////////// Create the 3d volume /////////////////
>
>
>
>             vtkMarchingCubes skinExtractor =  vtkMarchingCubes::New();
>
>             skinExtractor->GetOutput()->ReleaseDataFlagOff();
>
>             skinExtractor->SetInputConnection(VIG->GetOutputPort());
>
>             skinExtractor->SetValue(0, 500);
>
>             skinExtractor->ComputeGradientsOn();
>
>             skinExtractor->Update();
>
>
>
>             vtkTriangleFilter VTF =  vtkTriangleFilter::New();
>
>             VTF->SetInputConnection(skinExtractor->GetOutputPort());
>
>             VTF->GetOutput()->ReleaseDataFlagOff();
>
>             VTF->Update();
>
>
>
>             vtkDelaunay3D stripper =  vtkDelaunay3D::New();
>
>             stripper->SetInputConnection(VTF->GetOutputPort());
>
>             stripper->GetOutput()->ReleaseDataFlagOff();
>
>             stripper->Update();
>
>
>
>             // Create Mapper
>
>            vtkDataSetMapper skinMapper =  vtkDataSetMapper::New();
>
>            skinMapper->SetInputConnection(stripper->GetOutputPort());
>
>
>
>
>
>

That is the expected output of Delaunay3D. I never understood what it
would be used for myself. It is very "convex-hull-ish".

I'm not exactly sure what the output of this example is, and I'm also
not very familiar with DICOM, but maybe you can look at:
http://www.vtk.org/Wiki/VTK/Examples/Medical/Cxx/GenerateModelsFromLabels

(Bill - we should try to add images to a lot of these as we have time).

Thanks,

David



More information about the vtkusers mailing list