<div dir="ltr">Hi All,<div><br></div><div>Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader .</div>
<div><br></div><div><br></div><div>////</div><div><br></div><div><div style="font-size:13px;font-family:arial,sans-serif">typedef itk::QuadEdgeMeshTraits<double, 3,double, double, double,double > qetraits;</div><div style="font-size:13px;font-family:arial,sans-serif">
<span style="white-space:pre-wrap"> </span><br></div><div style="font-size:13px;font-family:arial,sans-serif">typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType;</div></div><div style="font-size:13px;font-family:arial,sans-serif">
<br></div><div style="font-size:13px;font-family:arial,sans-serif">itk::OnesMatrixCoefficients< MeshType > coeff0;<br></div><div><br><div><div>typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType;</div>
<div>//typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType;</div><div><br></div><div><div>//VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New();</div><div>VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New();</div>
<div><br></div><div><div>VtkToItkReader->SetFileName("abc.vtk");</div><div>VtkToItkReader->Update();<span style="white-space:pre-wrap;font-family:arial,sans-serif;font-size:13px"> </span></div></div><div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType ></div><div style="font-family:arial,sans-serif;font-size:13px">SmoothingQuadEdgeMeshFilter;</div>
<div style="font-family:arial,sans-serif;font-size:13px"><div><br></div><div> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New();</div><div><span style="white-space:pre-wrap"> </span></div>
<div><br></div><div>QEMeshSmoother->SetInput(<span style="font-family:arial;font-size:small">VtkToItkReader->GetOutPut()</span>);</div><div>QEMeshSmoother->SetNumberOfIterations(5 );</div><div>QEMeshSmoother->SetRelaxationFactor( 0.5 );</div>
<div>QEMeshSmoother->SetDelaunayConforming(true );</div><div>QEMeshSmoother->SetCoefficientsMethod( &coeff0 );<span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span></div>
<div>QEMeshSmoother->Update();</div><div><br></div><div>////</div></div></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K <span dir="ltr"><<a href="mailto:mallikarjun49@gmail.com" target="_blank">mallikarjun49@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Bill for your answer.<div><br></div><div>The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter.</div>
<div><br></div><div>Thanks for your help </div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If you have it in vtk, I suggest using the vtk pipeline to smooth the data.<br>
<div><div><br>
On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K <<a href="mailto:mallikarjun49@gmail.com" target="_blank">mallikarjun49@gmail.com</a>> wrote:<br>
> Hi Bill,<br>
> Thanks for the replay.<br>
><br>
> Yes,I built both ITK and my app with Release ,I forgot to mention it in the<br>
> previous post.Actually the data set is the output of<br>
> vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved<br>
> this marching cube's output as .vtk file and read it using<br>
> itkVTKPolyDataReader and then I am giving this reader's output to<br>
> itkSmoothingQuadEdgeMeshFilter's input.<br>
><br>
> I checked the execution time of each step in the pipeline ,after<br>
> SmothingQEMeshFilter has got it's input ,it is taking time to process the<br>
> data.<br>
><br>
> Thank you<br>
><br>
><br>
><br>
> On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>><br>
> wrote:<br>
>><br>
>> First, make sure you are building ITK and your app with Release. A<br>
>> Debug build can be 10-50 times slower.<br>
>><br>
>><br>
>> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K <<a href="mailto:mallikarjun49@gmail.com" target="_blank">mallikarjun49@gmail.com</a>><br>
>> wrote:<br>
>> > Hi All,<br>
>> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh<br>
>> > smoothing.This<br>
>> > filter is giving good results what I expected but taking more execution<br>
>> > time.can any one suggest me to reduce the execution time( multi<br>
>> > threading<br>
>> > or any parameters to add/remove )?<br>
>> ><br>
>> > Below is the code snippet<br>
>> > ///////<br>
>> > typedef itk::QuadEdgeMeshTraits<double, 3,double, double, double,double<br>
>> > ><br>
>> > qetraits;<br>
>> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType;<br>
>> ><br>
>> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType;<br>
>> ><br>
>> > itk::OnesMatrixCoefficients< MeshType > coeff0;<br>
>> ><br>
>> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType ><br>
>> > SmoothingQuadEdgeMeshFilter;<br>
>> ><br>
>> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother =<br>
>> > SmoothingQuadEdgeMeshFilter::New();<br>
>> ><br>
>> > QEMeshSmoother->SetInput("abc.vtk");<br>
>> > QEMeshSmoother->SetNumberOfIterations(5 );<br>
>> > QEMeshSmoother->SetRelaxationFactor( 0.5 );<br>
>> > QEMeshSmoother->SetDelaunayConforming(true );<br>
>> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 );<br>
>> > QEMeshSmoother->Update();<br>
>> > ////<br>
>> ><br>
>> > --<br>
>> > Regards:<br>
>> > Mallik<br>
>> ><br>
>> ><br>
>> > _____________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Kitware offers ITK Training Courses, for more information visit:<br>
>> > <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
>> ><br>
>> > Please keep messages on-topic and check the ITK FAQ at:<br>
>> > <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Unpaid intern in BillsBasement at noware dot com<br>
><br>
><br>
><br>
><br>
> --<br>
> Regards:<br>
> Mallik<br>
><br>
<br>
<br>
<br>
--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr"><b style="font-family:tahoma,sans-serif">Regards:</b><br style="font-family:tahoma,sans-serif">
<span style="font-family:tahoma,sans-serif">Mallik</span><span style="font-family:tahoma,sans-serif"></span><div>
<br></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><b style="font-family:tahoma,sans-serif">Regards:</b><br style="font-family:tahoma,sans-serif"><span style="font-family:tahoma,sans-serif">Mallik</span><span style="font-family:tahoma,sans-serif"></span><div>
<br></div></div>
</div>