[vtkusers] High memory cost of vtkDecimatePro for 3D model generation from DICOM series
Liu_tj
tjlp at netease.com
Sat Mar 19 05:47:43 EDT 2016
Hi, David,
I got it. What value should I set for image_threshold.SetInValue()? Does it depend on the greyscale scalarange of the vtkImageData?
Thanks
Liu Peng
在2016-03-19,"David Gobbi" <david.gobbi at gmail.com> 写道: -----原始邮件-----
发件人:"David Gobbi" <david.gobbi at gmail.com>
发送时间:2016年03月19日 星期六
收件人:"Liu_tj" <tjlp at netease.com>
抄送:"vtkusers" <vtkusers at vtk.org>
主题:Re: Re: [vtkusers] High memory cost of vtkDecimatePro for 3D model generation from DICOM series
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/20160319/9b9e97fd/attachment.html>
More information about the vtkusers
mailing list