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

Elvis Stansvik elvis.stansvik at orexplore.com
Fri Mar 18 15:09:35 EDT 2016


2016-03-18 13:51 GMT+01:00 David Gobbi <david.gobbi at gmail.com>:

> 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.
>

Ah, yes, then it makes perfect sense. For a while I thought you were
talking about "not making sense" in a technical sense. In our case it's
tomography of rock (drill core), so it makes sense to allow the user to
select a range (in our case, from a histogram), and have the volume
rendering show parts that are within that range (presumably corresponding
to some structure/mineral/element with around that density). Thanks for
clarifying!


>
> 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.
>

Excellent, thank for that tip. We're not there yet, but we may do something
like that in the future (instead of just showing the volume rendering
filtered by two endpoints).


>
> 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.
>

Yes, I imagine this is what we'll do (the latter approach).

Again, thanks for your input and your nice support on this list.

Elvis


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


More information about the vtkusers mailing list