[vtkusers] vtkMarchingCubes

meneghini meneghini at gnbts.units.it
Fri Jan 9 03:15:02 EST 2009


I Suppose it could be possible that, since you are applying the marchingCubes
algorithm to an ImageData object, the class makes implicit calls either to the
class vtkImageMarchingCubes, or vtkDiscreteMarchingCubes...
Am I wrong?

On Fri, 9 Jan 2009 14:23:35 +0900 (WST), Peter F Bradshaw wrote
> Hi Chen;
> 
> On Thu, 8 Jan 2009, chens wrote:
> 
> > We used the following codes for the surface generation of a medical object
> > in DICOM files.
> >
> > The resultant 3D images were excellent.
> >
> > Originally, we thought that the marching cube algorithm was used for the
> > surface generation of the medical object since the vtkMarchingCubes method
> > was invoked.
> >
> > However, we were surprised that it seemed that the "vtkMarchingCubes" was
> > not invoked when we set breakpoint in that method in the debugging mode.
> 
> I am not sure that I fully understand why you think that vtkMarchingCubes
> was not invoked. Looking at the code below I would say it most certainly
> is.
> 
> >
> > Does anyone know whether the marching cube algorithm was used or not?  If it
> > was, which method implements the marching cube algorithm?
> 
> vtkMarchingCubes::RequestData()
> 
> >
> > How can we invoke marching cube algorithm in vtk? Are there any other sample
> > codes?
> >
> > Thank you very much for your help.
> >
> > Chen
> >
> >
> >
> >
> >
> > vtkMarchingCubes *m_cube=vtkMarchingCubes::New();
> >
> >     vtkPolyData  *m_polydata=vtkPolyData::New();//define an object frm the
> > filter
> >
> >     m_cube->SetValue(0,500); // set value corresponding  to which the
> > isosurface will be created
> >
> >     m_cube->ComputeNormalsOff(); // turn Normals Creation off (u can do it
> > later...and only if u  have light settings)
> >
> >     m_cube->ComputeGradientsOff(); // gradients off
> >
> >     m_cube->SetInput(m_reader->GetOutput()); // set input for the volume
> > from which u'll extract iso surface
> >
> >     m_polydata= m_cube->GetOutput(); // get o/p (it's of polydata type)
> >
> >     m_polydata->Update();
> >
> >
> >
> >     vtkPolyDataMapper *m_polydataMapper = vtkPolyDataMapper::New();
> >
> >     m_polydataMapper->SetInput(m_polydata);
> >
> >     m_polydataMapper->SetScalarRange(0,7);
> >
> >     m_polydataMapper->Update();
> >
> 
> Cheers
> 
> -- 
> Peter F Bradshaw: http://www.exadios.com (public keys avaliable 
> there). Personal site: http://personal.exadios.com "I love truth,
>  and the way the government still uses it occasionally to keep us 
> guessing." - Sam Kekovich. _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers


Fabio Meneghini
studente post-laurea presso il Dipartimento di Elettronica, Elettrotecnica e
Informatica
Università degli Studi di Trieste, Facoltà di Ingegneria




More information about the vtkusers mailing list