<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Here is the patch (for progress report):<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span><a href="http://review.source.kitware.com/#/c/16769/">http://review.source.kitware.com/#/c/16769/</a></div><div><br><div><div>On Aug 21, 2014, at 12:47 PM, Arnaud Gelas <<a href="mailto:arnaudgelas@gmail.com">arnaudgelas@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>As of now, there is no progress event on this filter, so it is normal nothing happened.</div><div><br></div><div>I'll submit another patch for progress event later today.</div><div><br></div><div>To review the patch, you need to create an account on gerrit:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span><a href="http://review.source.kitware.com/">http://review.source.kitware.com</a></div><div><br></div><div>Then you ca volunteer to the review patch, you can add comments, accept, refuse…</div><div>Else once you are registered, you can send me an email and I will add you as a reviewer.</div><div><br></div><div>Best,</div><div>Arnaud</div><div><br></div><div><div><div>On Aug 21, 2014, at 12:11 PM, Mallikarjun K <<a href="mailto:mallikarjun49@gmail.com">mallikarjun49@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi,<div> I am trying observe the progressEvent by using AddObserver method of this filter but I couldn't. Could you check the below code once.</div><div><br></div><div>And one more thing,Could you guide me what exactly I have to do to Review the patch you have submitted.</div>
<div><br></div><div>Thank you</div><div><br></div><div><br></div><div>///progress</div><div><br></div><div>#include<iostream></div><div>#include<string></div><div><br></div><div>#include <itkMeshFileWriter.h></div>
<div>#include <itkMeshFileReader.h></div><div>#include <itkMeshIOFactory.h></div><div>#include <itkMeshIOBase.h></div><div>#include "itkMesh.h"</div><div>#include "itkQuadEdgeMesh.h"</div>
<div>#include "itkQuadEdgeMeshTraits.h"</div><div>#include "itkSmoothingQuadEdgeMeshFilter.h"</div><div>#include "itkCommand.h"</div><div><br></div><div>class MyCommand : public itk::Command</div>
<div>{</div><div> public:</div><div> itkNewMacro( MyCommand );</div><div> </div><div> public:</div><div> </div><div> void Execute(itk::Object *caller, const itk::EventObject & event)</div><div> {</div><div>
Execute( (const itk::Object *)caller, event);</div><div> }</div><div> </div><div> void Execute(const itk::Object * object, const itk::EventObject & event)</div><div> {</div><div> std::cout << "Command called." << std::endl;</div>
<div><br></div><div><span class="" style="white-space:pre"> </span> if( typeid( itk::ProgressEvent ) == typeid( event ) )</div><div> {</div><div><span class="" style="white-space:pre"> </span> ::itk::ProcessObject::ConstPointer process = </div>
<div> dynamic_cast< const itk::ProcessObject *>( object/*caller*/ );</div><div><br></div><div> const int value = static_cast<int>(process->GetProgress() * 100 );</div><div><span class="" style="white-space:pre"> </span> std::cout<<"progress:"<<value<<std::endl; </div>
<div><span class="" style="white-space:pre"> </span> <span class="" style="white-space:pre"> </span> </div><div><br></div><div> </div><div> }</div><div><br></div><div> }</div><div> </div><div>};</div><div>
<br></div><div>int main( int argc, char* argv[] )</div><div>{</div><div><br></div><div><span class="" style="white-space:pre"> </span>/*if( argc < 2 )</div><div> {</div><div> std::cerr << "Usage: " << std::endl;</div>
<div> std::cerr << argv[0] << " inputImageFile outputImageFile flipAxisX flipAxisY" << std::endl;</div><div> return EXIT_FAILURE;</div><div> }*/</div><div><br></div><div><span class="" style="white-space:pre"> </span>std::string Inputfilename="D:<a href="smb://temp.vtk">\\temp.vtk</a>";</div>
<div> typedef itk::QuadEdgeMeshTraits<double, 3,double, double, double,double > qetraits; </div><div> typedef itk::QuadEdgeMesh< double, 3,qetraits > MeshType;</div><div> </div><div> itk::OnesMatrixCoefficients< MeshType > coeff0;</div>
<div> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter;</div><div> </div><div> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New();</div>
<div> </div><div> typedef itk::MeshFileReader<MeshType> MeshReaderType;</div><div> MeshReaderType::Pointer Meshreader = MeshReaderType::New();</div><div> Meshreader->SetFileName( Inputfilename.c_str()/*argv[1]*/ );</div>
<div> // Meshreader->Update();</div><div> </div><div> </div><div> MyCommand::Pointer myCommand = MyCommand::New();</div><div><br></div><div> QEMeshSmoother->SetInput(Meshreader->GetOutput() );</div><div> QEMeshSmoother->SetNumberOfIterations( 1 );</div>
<div> QEMeshSmoother->SetRelaxationFactor( 0.5 );</div><div> QEMeshSmoother->SetDelaunayConforming(true);</div><div> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); </div><div> QEMeshSmoother->AddObserver(itk::ProgressEvent, myCommand);</div>
<div> </div><div> // QEMeshSmoother->Update();</div><div> std::string Outputfilename="D:<a href="smb://tempOut2.vtk">\\tempOut2.vtk</a>";</div><div> </div><div> typedef itk::MeshFileWriter<MeshType> MeshWriterType;</div><div> MeshWriterType::Pointer Meshwriter = MeshWriterType::New();</div>
<div> Meshwriter->SetFileName(Outputfilename.c_str() /*argv[2]*/ );</div><div> Meshwriter->SetInput(QEMeshSmoother->GetOutput());</div><div><br></div><div> try</div><div> {</div><div> Meshwriter->Update();</div>
<div> }</div><div> catch( itk::ExceptionObject& e )</div><div> {</div><div> std::cerr << e.what() << std::endl;</div><div> }</div><div><br></div><div> return 0;</div><div><br></div><div> </div><div>
} </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 20, 2014 at 7:33 PM, Arnaud Gelas <span dir="ltr"><<a href="mailto:arnaudgelas@gmail.com" target="_blank">arnaudgelas@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 style="word-wrap:break-word">Hi,<div><br></div><div>I have just submitted this patch for the documentation, can you please review it?</div>
<div><br></div><div><span style="white-space:pre-wrap"> </span><a href="http://review.source.kitware.com/#/c/16755/" target="_blank">http://review.source.kitware.com/#/c/16755/</a></div><div><br></div><div>I was running this code on Mac i5 with 4GB RAM, with both ITK and this program compiled in Debug…</div>
<div><br></div><div>Best,</div><div>Arnaud</div><div><div class="h5"><br><div><div>On Aug 7, 2014, at 5:20 PM, Mallikarjun K <<a href="mailto:mallikarjun49@gmail.com" target="_blank">mallikarjun49@gmail.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr">Hi Arnaud,<div><br></div><div>Thanks,Can you please tell me your machine confuguration. I am running 4GB RAM,i3 on windows7.</div><div>I have downloaded your project and tried to execute it and it is still the same problem Which I was facing earlier.Any suggestions .....</div>
<div><br></div><div>thank you </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 7, 2014 at 8:10 PM, Arnaud Gelas <span dir="ltr"><<a href="mailto:arnaudgelas@gmail.com" target="_blank">arnaudgelas@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 style="word-wrap:break-word">It takes 29s on my machine in debug to run 5 iterations with Delaunay conforming set to true<div>
<br></div><div><a href="https://gist.github.com/arnaudgelas/0f20ebdaf53956f79997" target="_blank">https://gist.github.com/arnaudgelas/0f20ebdaf53956f79997</a></div><div><br></div><div><br><div><div><div>On Aug 7, 2014, at 3:45 PM, Mallikarjun K <<a href="mailto:mallikarjun49@gmail.com" target="_blank">mallikarjun49@gmail.com</a>> wrote:</div>
<br></div><blockquote type="cite"><div><div dir="ltr">File path is correct.if it is '\'(backward slash) we have to add "D:\\" .since I used '/' it's not required to add "//".<div>
<br></div><div>please find the attached .vtk file </div>
<div><br></div><div>Thanks</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 7, 2014 at 7:01 PM, Arnaud Gelas <span dir="ltr"><<a href="mailto:arnaudgelas@gmail.com" target="_blank">arnaudgelas@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 style="word-wrap:break-word">Shouldn't it be <a>D://temp.vtk</a> ? Isn't it missing one '/' ?<div>
<br></div><div>Can you send this vtk file?<div><br><div><br><div><div>On Aug 7, 2014, at 3:23 PM, Mallikarjun K <<a href="mailto:mallikarjun49@gmail.com" target="_blank">mallikarjun49@gmail.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr">Hi Arnaud,<div><br></div><div>Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ?</div>
<div><br></div><div>/////</div><div><div>#include<iostream></div><div>#include<string></div><div><br></div><div>#include <vtkPolyDataWriter.h></div><div>#include <vtkPolyDataReader.h></div><div>#include <itkMeshFileWriter.h></div>
<div>#include <itkMeshFileReader.h></div><div>#include <itkMeshIOFactory.h></div><div>#include <itkMeshIOBase.h></div><div>#include <vtkTriangleFilter.h></div><div>#include <vtkCleanPolyData.h></div>
<div>#include "itkMesh.h"</div><div>#include "itkQuadEdgeMesh.h"</div><div>#include "itkQuadEdgeMeshTraits.h"</div><div>#include "itkSmoothingQuadEdgeMeshFilter.h"</div><div>#include "vtkSTLWriter.h"</div>
<div>#include <vtkSmartPointer.h></div><div><br></div><div>int main()</div><div>{</div><div><span style="white-space:pre-wrap"> </span>std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K</div>
<div><br></div><div><span style="white-space:pre-wrap"> </span>typedef itk::QuadEdgeMeshTraits<double, 3,double, double, double,double > qetraits;<span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType;</div>
<div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>itk::OnesMatrixCoefficients< MeshType > coeff0;</div><div><span style="white-space:pre-wrap"> </span>typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter;</div>
<div> </div><div><span style="white-space:pre-wrap"> </span>vtkSmartPointer<vtkPolyDataWriter> polyDatawriter=vtkSmartPointer<vtkPolyDataWriter>::New();</div><div><span style="white-space:pre-wrap"> </span>vtkSmartPointer<vtkPolyDataReader> polyDatareader=vtkSmartPointer<vtkPolyDataReader>::New();</div>
<div> </div><div> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New();</div><div><span style="white-space:pre-wrap"> </span></div><div> /* polyDatareader->SetFileName(Inputfilename.c_str() );</div>
<div><span style="white-space:pre-wrap"> </span>polyDatareader->ReleaseDataFlagOn();</div><div><span style="white-space:pre-wrap"> </span>polyDatareader->Update();*/</div><div><br></div><div><span style="white-space:pre-wrap"> </span>/*vtkSmartPointer<vtkTriangleFilter> triangleFilter =</div>
<div> vtkSmartPointer<vtkTriangleFilter>::New();</div><div> triangleFilter->SetInput(polyDatareader->GetOutput());</div><div> triangleFilter->Update();*/</div><div> </div><div><span style="white-space:pre-wrap"> </span>//</div>
<div><span style="white-space:pre-wrap"> </span>/* vtkSmartPointer<vtkCleanPolyData> clean = vtkSmartPointer<vtkCleanPolyData>::New();</div><div><span style="white-space:pre-wrap"> </span>#if (VTK_MAJOR_VERSION < 6)</div>
<div><span style="white-space:pre-wrap"> </span> clean->SetInput(triangleFilter->GetOutput() );</div><div><span style="white-space:pre-wrap"> </span>#else</div><div> clean->SetInputData(triangleFilter->GetOutput() );</div>
<div><span style="white-space:pre-wrap"> </span>#endif</div><div><span style="white-space:pre-wrap"> </span></div><div> clean->ConvertPolysToLinesOff();</div><div> clean->ConvertLinesToPointsOff();</div>
<div> clean->Update();</div><div><br></div><div><span style="white-space:pre-wrap"> </span>std::string Inputfilename2="D:/cleaned.vtk";*/</div><div><br></div><div><span style="white-space:pre-wrap"> </span>////</div>
<div><span style="white-space:pre-wrap"> </span>/*polyDatawriter->SetInput(clean->GetOutput());<span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>polyDatawriter->SetFileName(Inputfilename2.c_str());</div>
<div><span style="white-space:pre-wrap"> </span>polyDatawriter->ReleaseDataFlagOn();</div><div><span style="white-space:pre-wrap"> </span>polyDatawriter->Write(); */ </div><div> </div><div><span style="white-space:pre-wrap"> </span>typedef itk::MeshFileReader<MeshType> MeshReaderType;</div>
<div><span style="white-space:pre-wrap"> </span>MeshReaderType::Pointer Meshreader = MeshReaderType::New();</div><div> Meshreader->SetFileName(Inputfilename.c_str( ));</div><div><span style="white-space:pre-wrap"> </span>Meshreader->Update();</div>
<div><br></div><div><span style="white-space:pre-wrap"> </span>/*MeshType::Pointer mesh = Meshreader->GetOutput();</div><div> mesh->DisconnectPipeline();*/</div><div><span style="white-space:pre-wrap"> </span></div>
<div><br></div><div><span style="white-space:pre-wrap"> </span>QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ );</div><div><span style="white-space:pre-wrap"> </span>QEMeshSmoother->SetNumberOfIterations(1 );</div>
<div><span style="white-space:pre-wrap"> </span>QEMeshSmoother->SetRelaxationFactor( 0.5 );</div><div><span style="white-space:pre-wrap"> </span>QEMeshSmoother->SetDelaunayConforming(true);</div><div><span style="white-space:pre-wrap"> </span>QEMeshSmoother->SetCoefficientsMethod( &coeff0 );</div>
<div><br></div><div><span style="white-space:pre-wrap"> </span>QEMeshSmoother->ReleaseDataFlagOn();</div><div><br></div><div><span style="white-space:pre-wrap"> </span>QEMeshSmoother->Update();<span style="white-space:pre-wrap"> </span></div>
<div> </div><div><span style="white-space:pre-wrap"> </span>std::string Outputfilename="D:/tempOut.vtk";</div><div><br></div><div><span style="white-space:pre-wrap"> </span>typedef itk::MeshFileWriter<MeshType> MeshWriterType;</div>
<div><span style="white-space:pre-wrap"> </span>MeshWriterType::Pointer Meshwriter = MeshWriterType::New();</div><div> Meshwriter->SetFileName(Outputfilename.c_str( ));</div><div><span style="white-space:pre-wrap"> </span>Meshwriter->SetInput(QEMeshSmoother->GetOutput());</div>
<div> Meshwriter->Update();<span style="white-space:pre-wrap"> </span></div><div><br></div><div><span style="white-space:pre-wrap"> </span>polyDatareader->SetFileName(Outputfilename.c_str() );</div><div>
<span style="white-space:pre-wrap"> </span>polyDatareader->ReleaseDataFlagOn();</div><div><span style="white-space:pre-wrap"> </span>polyDatareader->Update();</div><div><br></div><div><span style="white-space:pre-wrap"> </span>vtkSmartPointer<vtkSTLWriter> stlWriter=vtkSmartPointer<vtkSTLWriter>::New();</div>
<div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>stlWriter->SetInput( polyDatareader->GetOutput());</div><div><span style="white-space:pre-wrap"> </span>stlWriter->SetFileName("D:/QEoutput.stl");</div>
<div><span style="white-space:pre-wrap"> </span>stlWriter->SetFileTypeToASCII();</div><div><span style="white-space:pre-wrap"> </span>stlWriter->Write();</div><div><span style="white-space:pre-wrap"> </span></div>
<div><span style="white-space:pre-wrap"> </span>//Here it stops and taking long time </div><div><br></div><div><span style="white-space:pre-wrap"> </span>return 0;</div><div><br></div><div><span style="white-space:pre-wrap"> </span></div>
<div>}</div></div><div>////</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 7, 2014 at 3:39 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">Hi Arnaud,<div><br></div><div>Thanks for your reply and valuable suggestions.</div><div class="gmail_extra">
<br></div><div class="gmail_extra">Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Thank you</div><div class="gmail_extra"><div><br><br><div class="gmail_quote">On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas <span dir="ltr"><<a href="mailto:arnaudgelas@gmail.com" target="_blank">arnaudgelas@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Malik,<div><br></div>
<div>First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?).</div><div><br></div><div>Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal).</div>
<div><br></div><div>At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages…</div>
<div>How large is your input mesh (number of points)?</div><div><br></div><div>You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement.</div>
<div>Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing).</div><div><br></div><div>HTH</div>
<span><font color="#888888">Arnaud</font></span><div><div><br></div><div><br><div><div>On Aug 6, 2014, at 10:42 AM, Mallikarjun K <<a href="mailto:mallikarjun49@gmail.com" target="_blank">mallikarjun49@gmail.com</a>> wrote:</div>
<br><blockquote type="cite"><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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style: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><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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">If you have it in vtk, I suggest using the vtk pipeline to smooth the data.<br>
<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></blockquote></div><br><br clear="all"><div><br></div></div><span><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>
_____________________________________<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>
</blockquote></div><br></div></div></div></blockquote></div><br><br clear="all"><div><br></div></div><span><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></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>
</blockquote></div><br></div></div></div></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>
</div><span><temp.vtk></span></blockquote></div><br></div></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>
</blockquote></div><br></div></div></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>
</blockquote></div><br></div></div></blockquote></div><br></div></body></html>