[vtkusers] vtkMarchingCubes->vtkSmoothPolyDataFilter->vtkCurvatures

Liam Kurmos quantum.leaf at googlemail.com
Tue Jun 22 06:57:14 EDT 2010


I've removed normals and smoothing, but i'm still getting the same artifacts.

   iso = vtkMarchingCubes::New();
   iso->SetInput(vol);
   iso->SetNumberOfContours(1);
   iso->SetValue(0, 0);
   iso->Update();

   vtkCurvatures *curv = vtkCurvatures::New();
   curv->SetInputConnection(iso->GetOutputPort());
   curv->SetCurvatureTypeToMean();

   vtkPolyDataMapper *polyMap2 = vtkPolyDataMapper::New();
   polyMap2->SetInputConnection(curv->GetOutputPort());

   contourActor = vtkActor::New();
   contourActor->SetMapper(polyMap2);
   polyMap2->GetInput()->Update();

   iso->Delete();


ive also noticed im getting the following throw to the command line:

ERROR: In /build/buildd/vtk-5.2.1/Graphics/vtkCurvatures.cxx, line 63
vtkCurvatures (0x81b540): No points/cells to operate on

althought vtkCuravtures seems to be generating scalars.


On Mon, Jun 21, 2010 at 8:20 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Don't generate the normals unless you are decimating and/or smoothing.
> Marching Cubes computes normals from the gradient of the grayscale
> data. The Poly data normals will generate curvature artifacts...
>
>
> On Mon, Jun 21, 2010 at 3:17 PM, Liam Kurmos
> <quantum.leaf at googlemail.com> wrote:
>> On Mon, Jun 21, 2010 at 7:44 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>> Try without PolyDataNormals and Smoothing. I think the artifacts are
>>> not Marching Cubes related.
>>
>> Hi Bill,
>>
>> The png file called noSmoothing.png is produced without using the
>> smoothing filter (i think the normals go straight in to the mapper -
>> dont have code on me at moment). I think i put the normals in based on
>> some example i originally copied, i will try playing with not using
>> them later and post back, though i dont know what else could be
>> causing those contour like lines (the voxel resolution is not high i
>> think 64cube for the whole dataset).
>>
>> cheers,
>>
>> Liam
>> _______________________________________________
>> 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