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

Liu_tj tjlp at netease.com
Thu Mar 17 21:32:13 EDT 2016


Hi, David,

What usage of vtkReverseSense in your sample code?

Thanks





在2016-03-17,"David Gobbi" <david.gobbi at gmail.com> 写道: -----原始邮件-----
发件人:"David Gobbi" <david.gobbi at gmail.com>
发送时间:2016年03月17日 星期四
收件人:"Liu_tj" <tjlp at netease.com>
抄送:"vtkusers" <vtkusers at vtk.org>
主题:Re: Re: Re: [vtkusers] High memory cost of vtkDecimatePro for 3D model generation from DICOM series


And I should add: if it is necessary to use a range (instead of just a lower threshold), then the pipeline can use vtkMarchingCubes twice:


vtkSmartPointer<vtkMarchingCubes> cubes1 = vtkSmartPointer<vtkMarchingCubes>::New();

cubes1->SetInputData(imagedata);
cubes1->SetValue(0, lowerThreshold);


vtkSmartPointer<vtkMarchingCubes> cubes2 = vtkSmartPointer<vtkMarchingCubes>::New();

cubes2->SetInputData(imagedata);
cubes2->SetValue(0, upperThreshold);


vtkSmartPointer<vtkReverseSense> reverse = vtkSmartPointer<vtkReverseSense>::New();

reverse->SetInputConnection(cubes2->GetOutputPort());


vtkSmartPointer<vtkAppendPolyData> surface = vtkSmartPointer<vtkAppendPolyData>::New();

surface->SetInputConnection(cubes1->GetOutputPort());
surface->AddInputConnection(cubes2->GetOutputPort());

surface->Update();




On Thu, Mar 17, 2016 at 6:06 AM, David Gobbi <david.gobbi at gmail.com> wrote:

Hi Liu Peng,


For creating a model, it is common to allow the user to set just a lower threshold (rather than a range), and to use the lower threshold as the isovalue.  If you send the code for the whole pipeline, that might help.


 - David


On Wed, Mar 16, 2016 at 11:27 PM, Liu_tj <tjlp at netease.com> wrote:
Hi, David,

If I don't use vtkImageThreshol, how to generate 3D model from the points whose grayscale is in some specific range? This range can be changed by the user.

Thanks
Liu Peng


在2016-03-17,"David Gobbi" <david.gobbi at gmail.com> 写道: -----原始邮件-----
发件人:"David Gobbi" <david.gobbi at gmail.com>
发送时间:2016年03月17日 星期四
收件人:"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 Wed, Mar 16, 2016 at 10:35 PM, Liu_tj <tjlp at netease.com> wrote:
Hi,David,

If using vtkImageThreshold before vtkMarchingCubes is not a good option, what other better way do you have?



The output of the reader should go directly into vtkMarchingCubes.
   
Beside, for the isovalue, I try 2,3,4 and marched->GetNumberOfPoints() return 0, only isovalue is 1 and marched->GetNumberOfPoints() return a number greater than 0. I have no idea this is relating to the DICOM series or other problem.



If you remove vtkImageThreshold, and put the output of the reader directly into vtkMarchingCubes, then you should be able to use an isovalue somewhere between 100 and 2000 and get a good result.  


Also, after vtkMarchingCubes, you can use vtkConnectivityFilter to clean up the polydata before you decimate it.


 - David




 




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


More information about the vtkusers mailing list