[vtkusers] strange output, any advice please

Bill Lorensen bill.lorensen at gmail.com
Wed Dec 16 20:03:19 EST 2009


Do not use Delaunay2D on 3D points that do not project onto a plane.
This is clearly the case here.

On Wed, Dec 16, 2009 at 4:29 PM, Ali Habib <ali.mahmoud.habib at gmail.com> wrote:
> I used two algorithms to create 3D mesh but the out put is so strange
>
> The first one using Delunary2d function and the code is :
>
> // algorithm using Delunary 3d
>
> vtkDICOMImageReader *v16 = vtkDICOMImageReader::New();
>
> v16->SetDirectoryName(@"D:\work\MasterDegree\DataSet\case2\DICOM\PA1\ST1\SE2");
>
>             v16->SetDataOrigin(2, 2, 1);
>
>             v16->Update();
>
>             vtkMarchingCubes *skinExtractor =vtkMarchingCubes::New();
>
>             skinExtractor->GetOutput()->ReleaseDataFlagOff();
>
>             skinExtractor->SetInputConnection(v16->GetOutputPort());
>
>             skinExtractor->SetValue(0, 500);
>
>             skinExtractor->ComputeGradientsOn();
>
>             skinExtractor->Update();
>
>             vtkTriangleFilter *VTF = vtkTriangleFilter::New();
>
>             VTF->SetInputConnection(skinExtractor->GetOutputPort());
>
>             VTF->GetOutput()->ReleaseDataFlagOff();
>
>             VTF->Update();
>
>             vtkDelaunay2D *stripper =vtkDelaunay2D::New();
>
>             stripper->SetInputConnection(VTF->GetOutputPort());
>
>             stripper->GetOutput()->ReleaseDataFlagOff();
>
>             stripper->Update();
>
>             vtkPolyDataMapper *skinMapper = vtkPolyDataMapper::New();
>
>             skinMapper->SetInput(stripper->GetOutput());
>
>             skinMapper->ScalarVisibilityOff();
>
>             vtkActor *skin = vtkActor::New();
>
>             skin->SetMapper(skinMapper);
>
>
>
> the seconde one  using  vtkClipDataSet the code is
>
>             vtkClipDataSet VCD = vtkClipDataSet::New();
>
>             VCD->GetOutput()->ReleaseDataFlagOff();
>
>             VCD->SetInputConnection(skinExtractor->GetOutputPort());
>
>             VCD->Update();
>
>
>
>             vtkDataSetTriangleFilter VDST =vtkDataSetTriangleFilter::New();
>
>             VDST->GetOutput()->ReleaseDataFlagOff();
>
>             VDST->SetInputConnection(VCD->GetOutputPort());
>
>             VDST->Update();
>
>
>
>             // Create Mapper
>
>             vtkDataSetMapper skinMapper = vtkDataSetMapper::New();
>
>             skinMapper->SetInputConnection(VDST->GetOutputPort());
>
> Attached is example of strange output
>
>
>
> Best regards
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list