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

David Gobbi david.gobbi at gmail.com
Fri Mar 18 23:32:02 EDT 2016


On Fri, Mar 18, 2016 at 8:43 PM, Liu_tj <tjlp at netease.com> wrote:

>
> I thought that vtkImageThreshold still provide a greyscale output instead
> of binary output. My understanding was that vtkImageThreshold just remove
> the points beyond the greyscale range.


It can be used that way, but in your code, it is producing a binary output.
 Points in the range are set to 1, and points outside the range are set to
0:

            image_threshold.ReplaceInOn();
            image_threshold.SetInValue(1);
            image_threshold.ReplaceOutOn();
            image_threshold.SetOutValue(0);

But even if you change vtkImageThreshold so that it just removes the points
outside of the range, I still recommend that you do not use it before
vtkMarchingCubes, because marching cubes expects to have valid grey values
on both sides of the isosurface (on the inside and on the outside).  If you
set the outside voxels to black, then the resulting surface will be shifted
inward slightly.

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


More information about the vtkusers mailing list