[vtkusers] Image Marching Cubes

Prashanth prashanth.dumpuri at vanderbilt.edu
Mon Nov 26 11:30:35 EST 2007


All,
  I have a MR image volume of a brain with a tumor in it and 'am trying 
to extract the surfaces of the brain and the tumor using Marching Cubes 
(Note: I have already segmented the brain from the skull). I would 
really appreciate it if someone can help me with these questions:
     (i) Can I extract the surfaces of brain AND tumor at the same time 
using Marching Cubes ? In other words, extracting two isosurfaces with 
two different contour values (one for brain and the other for tumor) at 
the same time using Marching Cubes.
     (ii) I tried the following pseudo-code with VTK's 
vtkImageMarchingCubes , but the output was just the surface of the brain 
with NO tumor in it. What 'am I missing here ? Can I extract two 
surfaces using vtkImageMarchingCubes ?
-------------------------------------------------------
img_rdr = vtkImageReader2()
img_rdr->SetFileName("my_brain.img")
(then i set all the parameters for the image)

mcubes = vtkImageMarchingCubes()
mcubes->SetInput(img_rdr->GetOutput())
// 2 contours : one for brain surface and the other for the tumor
mcubes->SetNumberOfContours(2)

// get the brain surface
mcubes->SetValue(0,1)

// get the tumor surface
// 110: average intensity value in the tumor
mcubes->SetValue(1,110)
mcubes->Update()
-------------------------------------------------------
Thanks
Prashanth



More information about the vtkusers mailing list