[vtkusers] How to extract isosurfaces from a series of 2D slices?

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Feb 9 22:04:33 EST 2004


an_jiye,

Hum you seems to be lucky usually DICOM are a pain to read as raw. There is a vtkDICOMImageReader that should work for you. Plus it is really to output a vtkImageData

vtkDICOMImageReader *reader = vtkDICOMImageReader::New();
reader->SetDirectoryName("c:/foo");
reader->Update();

vtkImageData *image = reader->GetOutput();

> 2.The example use vtkContourFilter::SetValue(...) to extract isosurface 
> from the input data. By passing 500 to extract skin and 1150 to extract 
> bone. The my question comes, does it means I must know the exact scalar 
> value of the isosurface I am going to extract?

Yes. Or build a GUI with a slider.

> Since my slice images are from a CT scan, which was stored in 16 bits. I am 
> interested some surfaces from the slices, include the body, some organs. 
> For example, the outline of the body may be a closed curve in one slice. 
> But the scalar value along this curve may not 
> be constant. Then how should I extract these surfaces and display them?

This can sometime be a subject for a PhD :) Have a look a http://itk.org. You might need a floodfill or threshold before your marching cubes algorithm.

> I have also thinked of the following method. First manually contour each 
> slice. To simplify the process, imagining draw two circles inside each 
> slice. Circle A is bigger and circle B is inside A. Then if I do the 
> following work to each slice: assign scalar value zero to the regions 
> outside circle A, assign one to the regions between A and B, and assign two 
> 
> to the regions inside B, can I extract the two isosurfaces represent A and 
> B from the contoured fake data?

Ask Luis about that. But this is usually a bad idea to work in 2D (slice by slice). Not only this is hard to reproduce, but it can lead to errors. Always prefer a 3D approach if possible. And again there are a lots of filters that can help you for that in the Insight toolkit (http://itk.org). This is easy to use both VTK and ITK.

> Any suggestion will be appreciated. Thank you in advance.

A good start for itk is the ITK software guide:

http://www.kitware.com/products/itkguide.html

Mathieu





More information about the vtkusers mailing list