[vtkusers] High memory cost of vtkDecimatePro for 3D model generation from DICOM series

David Gobbi david.gobbi at gmail.com
Fri Mar 18 08:51:31 EDT 2016


On Fri, Mar 18, 2016 at 12:47 AM, Elvis Stansvik <
elvis.stansvik at orexplore.com> wrote:

> 2016-03-18 3:19 GMT+01:00 David Gobbi <david.gobbi at gmail.com>:
>
>> You can segment an image with just one threshold (i.e. just the lower
>> threshold).  It is not necessary to set a range.
>>
>
> Sorry for jumping in here, but I'm also pretty new to VTK, and what Liu
> describes sounds like something we will want to do soon: Allow the user to
> set a grayscale range, and only show the parts of the volume that falls
> within this range.
>
> When you say "you can segment an image with just one threshold", do you
> mean that it somehow doesn't make sense to use two thresholds? If so, why?
> What if the use really wants to "extract" the parts of the volume where the
> scalar values are within some range?
>

It often makes sense to use a single threshold.  Examples:
1) segmenting bone from a CT image
2) removing background/noise from an MR image
3) segmenting vessels from a contrast image
Yes, there are also circumstances where two thresholds work better, but
I've written more software that uses one threshold than that uses two.

The main point that I have been trying to make is that, if you want to get
a smooth result out of vtkMarchingCubes, you should should give it a
greyscale input, not a binary input.  In other words, you should not give
marching cubes the output of vtkImageThreshold.

Marching cubes gives surfaces corresponding to isovalues.  If you have a
range instead of a single threshold, then you should produce one surface
for the lower end of the range, and another surface for the upper end of
the range.  VTK surfaces are oriented, so you must reverse the sense of the
upper-range surface (i.e. reverse the polygon winding and the normal
directions).  Then you can combine the lower-range surface and the
upper-range surface into a single polydata with vtkAppendPolyData.

If this sounds too complicated, then you can instead take the output from
vtkImageThreshold, apply a mild gaussian blur to it, and apply marching
cubes to the blurred data.  If you only have a binary mask (i.e. if you no
longer have the original data) then this is a reasonable way to produce a
greyscale input for marching cubes.  But if you have the original data,
then a more accurate result can be achieved by feeding the original data
into marching cubes, so that it uses the original greyscale values when it
analyzes the voxels and produces the surface.

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160318/69b742b7/attachment.html>


More information about the vtkusers mailing list