[Insight-users] Marching Cubes itkReadITKImage3DSegmentShowVTK

Luis Ibanez luis.ibanez at kitware.com
Sat May 17 11:14:30 EDT 2008



Hi Prabhat,


Please clarify *exactly* what file

               "MarchingCubes.cxx"

are you referring to.

Is this file in ITK ?

Is it in VTK ?


     Please let us know,


       Thanks


          Luis


-------------------
prabhat246 wrote:
> Thanks for providing such interesting piece of information.
> 
> Well, I've changed the code 
> 
>      vtkContourFilter * contour = vtkContourFilter::New();
>      contour->SetInput( vtkImporter2->GetOutput() );
>      contour->SetValue(0, 128);
> 
> 
> to
> 
>      vtkMarchingCubes * contour = vtkMarchingCubes::New();
>      contour->SetInput(vtkImporter1->GetOutput());
>      contour->SetValue(0, 128); 
> 
> It ensures that now I get output only from Marching cubes algo.
> I am new to learn this algorithm. 
> can you please explain what are these parameters of SetValue
> and how can I change the cube size to be bigger.
> 
> Also can you tell me, in MarchingCubes.cxx which function actually executes
> the algorithm??
> 
> Thanks a lot.
> 
> Prabhat
> 
> 
> Luis Ibanez wrote:
> 
>>
>>Hi Prabhat,
>>
>>The surface extraction in this example is performed by the VTK filter
>>
>>                     vtkContourFilter
>>http://www.vtk.org/doc/nightly/html/classvtkContourFilter.html
>>
>>
>>you will find the relevant code in lines 185-196
>>
>>
>>     // Draw contours around the segmented regions
>>     vtkContourFilter * contour = vtkContourFilter::New();
>>     contour->SetInput( vtkImporter2->GetOutput() );
>>     contour->SetValue(0, 128);
>>
>>     polyMapper->SetInput( contour->GetOutput() );
>>
>>
>>
>>"Marching Cubes" is one among several other algorithms that this filter
>>can execute. If you look at the collaboration diagram in the HTML
>>Doxxygen-generated documentation (above), you will find the filters:
>>
>>
>>            vtkGridSynchronizedTemplates3D
>>            vtkSynchronizedTemplates3D
>>            vtkGridSynchronizedTemplates2D
>>            vtkSynchronizedTemplates2D
>>
>>
>>as the potential delegates for implementing this task.
>>Note that "Marching Cubes" is not in the list.
>>
>>
>>
>>One of the reasons why alternative implementations to Marching Cubes
>>are available, is the GE patented Marching Cube algorithms, and in this
>>way deprived the larger community from using it.  This intellectual
>>monopolization resulted in the creation of alternative algorithms.
>>
>>
>>
>>One interesting counter-example of how patents promote progress....  :-)
>>
>>       This time by forcing people to invent new
>>       methods *different* from the patented ones   :-)
>>
>>
>>BTW:
>>
>>    The Marching Cubes patent has now expired, and the algorithm,
>>    after 20 years of monopoly has entered the public domain.
>>
>>
>>
>>
>>    Luis
>>
>>
>>
>>-------------------
>>prabhat246 wrote:
>>
>>>I wanted to run marching cubes on my Dicom image set.
>>>I was told to refer example
>>>
>>>InsightApplications-3.4.0\Auxiliary\vtk\ itkReadITKImage3DSegmentShowVTK
>>>
>>>I can successfully run this example. 
>>>but I could not find where the actual Marching cube algorithm is being
>>>called?
>>>also How can I change the parameters of Marching cube algorithm?
>>>(If I want output mesh to be coarse or dense)
>>>
>>>Thanks a lot.
>>>Prabhat
>>
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users at itk.org
>>http://www.itk.org/mailman/listinfo/insight-users
>>
>>
> 
> 


More information about the Insight-users mailing list