<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta name="robots" content="noindex"> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>ITK: itkQuadEdgeMeshQuadricDecimation.h Source File</title> <link href="DoxygenStyle.css" rel="stylesheet" type="text/css"> </head><body bgcolor="#ffffff"> <!-- Section customized for INSIGHT : Tue Jul 17 01:02:45 2001 --> <center> <a href="index.html" class="qindex">Main Page</a> <a href="modules.html" class="qindex">Groups</a> <a href="namespaces.html" class="qindex">Namespace List</a> <a href="hierarchy.html" class="qindex">Class Hierarchy</a> <a href="classes.html" class="qindex">Alphabetical List</a> <a href="annotated.html" class="qindex">Compound List</a> <a href="files.html" class="qindex">File List</a> <a href="namespacemembers.html" class="qindex">Namespace Members</a> <a href="functions.html" class="qindex">Compound Members</a> <a href="globals.html" class="qindex">File Members</a> <a href="pages.html" class="qindex">Concepts</a></center> <!-- Generated by Doxygen 1.5.9 --> <div class="navpath"><a class="el" href="dir_02e23d841c198393a6e961e9a0678fff.html">Code</a> » <a class="el" href="dir_dd352b1cbb04f9ff09fa5f33693fed9f.html">Review</a> </div> <div class="contents"> <h1>itkQuadEdgeMeshQuadricDecimation.h</h1><a href="itkQuadEdgeMeshQuadricDecimation_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*=========================================================================</span> <a name="l00002"></a>00002 <span class="comment"></span> <a name="l00003"></a>00003 <span class="comment"> Program: Insight Segmentation & Registration Toolkit</span> <a name="l00004"></a>00004 <span class="comment"> Module: $RCSfile: itkQuadEdgeMeshQuadricDecimation.h,v $</span> <a name="l00005"></a>00005 <span class="comment"> Language: C++</span> <a name="l00006"></a>00006 <span class="comment"> Date: $Date: 2008-10-03 22:23:46 $</span> <a name="l00007"></a>00007 <span class="comment"> Version: $Revision: 1.4 $</span> <a name="l00008"></a>00008 <span class="comment"></span> <a name="l00009"></a>00009 <span class="comment"> Copyright (c) Insight Software Consortium. All rights reserved.</span> <a name="l00010"></a>00010 <span class="comment"> See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.</span> <a name="l00011"></a>00011 <span class="comment"></span> <a name="l00012"></a>00012 <span class="comment"> This software is distributed WITHOUT ANY WARRANTY; without even</span> <a name="l00013"></a>00013 <span class="comment"> the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span> <a name="l00014"></a>00014 <span class="comment"> PURPOSE. See the above copyright notices for more information.</span> <a name="l00015"></a>00015 <span class="comment"></span> <a name="l00016"></a>00016 <span class="comment">=========================================================================*/</span> <a name="l00017"></a>00017 <a name="l00018"></a>00018 <span class="preprocessor">#ifndef __itkQuadEdgeMeshQuadricDecimation_h</span> <a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define __itkQuadEdgeMeshQuadricDecimation_h</span> <a name="l00020"></a>00020 <span class="preprocessor"></span> <a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="itkQuadEdgeMeshEdgeMergeDecimationFilter_8h.html">itkQuadEdgeMeshEdgeMergeDecimationFilter.h</a>"</span> <a name="l00022"></a>00022 <span class="preprocessor">#include "<a class="code" href="itkQuadEdgeMeshDecimationQuadricElementHelper_8h.html">itkQuadEdgeMeshDecimationQuadricElementHelper.h</a>"</span> <a name="l00023"></a>00023 <a name="l00024"></a>00024 <span class="keyword">namespace </span>itk <a name="l00025"></a>00025 { <a name="l00030"></a>00030 <span class="keyword">template</span>< <span class="keyword">class</span> TInput, <span class="keyword">class</span> TOutput, <span class="keyword">class</span> TCriterion > <a name="l00031"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html">00031</a> <span class="keyword">class </span><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html">QuadEdgeMeshQuadricDecimation</a> : <a name="l00032"></a>00032 <span class="keyword">public</span> <a class="code" href="classitk_1_1QuadEdgeMeshEdgeMergeDecimationFilter.html">QuadEdgeMeshEdgeMergeDecimationFilter</a>< TInput, TOutput, TCriterion > <a name="l00033"></a>00033 { <a name="l00034"></a>00034 <span class="keyword">public</span>: <a name="l00035"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#d3b75888f5099312fd0104565de19faa">00035</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html">QuadEdgeMeshQuadricDecimation</a> <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Self</a>; <a name="l00036"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#e55eaeb5755b3410151eaf77f0ccd7f2">00036</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer< Self ></a> <a class="code" href="classitk_1_1SmartPointer.html">Pointer</a>; <a name="l00037"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#b1ddb470e6f4a6f3ae99bff7b9d694dd">00037</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer< const Self ></a> <a class="code" href="classitk_1_1SmartPointer.html">ConstPointer</a>; <a name="l00038"></a>00038 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1QuadEdgeMeshEdgeMergeDecimationFilter.html">QuadEdgeMeshEdgeMergeDecimationFilter</a>< <a name="l00039"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#889fd2fe4ec82889787e3c967a2299dc">00039</a> TInput, TOutput, TCriterion > <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Superclass</a>; <a name="l00040"></a>00040 <a name="l00042"></a>00042 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>( <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html">QuadEdgeMeshQuadricDecimation</a>, <a class="code" href="classitk_1_1QuadEdgeMeshEdgeMergeDecimationFilter.html">QuadEdgeMeshEdgeMergeDecimationFilter</a> ); <a name="l00043"></a>00043 <a name="l00045"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#d006afbf82f69ed68c56884586b6868c">00045</a> <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>( <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Self</a> ); <a name="l00046"></a>00046 <a name="l00047"></a>00047 <span class="keyword">typedef</span> TInput <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#d006afbf82f69ed68c56884586b6868c">InputMeshType</a>; <a name="l00048"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#eb61594bc18597e16b18a058e175cb2b">00048</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="itkFEMMacro_8h.html#539cce1a3282ba59952dedcbf9cdb23f">InputMeshType::Pointer</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#eb61594bc18597e16b18a058e175cb2b">InputMeshPointer</a>; <a name="l00049"></a>00049 <a name="l00050"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#9a132a341aa4bbba4f53a5ac8be8131f">00050</a> <span class="keyword">typedef</span> TOutput <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#9a132a341aa4bbba4f53a5ac8be8131f">OutputMeshType</a>; <a name="l00051"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#0b6438608cbdc1b99668ff0545f8820f">00051</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="itkFEMMacro_8h.html#539cce1a3282ba59952dedcbf9cdb23f">OutputMeshType::Pointer</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#0b6438608cbdc1b99668ff0545f8820f">OutputMeshPointer</a>; <a name="l00052"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#9762adcaa893bf7eebbb41ca5fa32717">00052</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> OutputMeshType::PointIdentifier <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#9762adcaa893bf7eebbb41ca5fa32717">OutputPointIdentifier</a>; <a name="l00053"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#422b57329fdcd2f73af0c08edf47c2bc">00053</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> OutputMeshType::PointType <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#422b57329fdcd2f73af0c08edf47c2bc">OutputPointType</a>; <a name="l00054"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#5bb986fc559959680a5ffb4613994f53">00054</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> OutputPointType::CoordRepType <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#5bb986fc559959680a5ffb4613994f53">OutputCoordType</a>; <a name="l00055"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#630594c8c0f4d8424748ce2e5807138e">00055</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> OutputMeshType::QEType <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#630594c8c0f4d8424748ce2e5807138e">OutputQEType</a>; <a name="l00056"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#54372d48aaba15595ff642c13d76dbf4">00056</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> OutputMeshType::EdgeCellType <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#54372d48aaba15595ff642c13d76dbf4">OutputEdgeCellType</a>; <a name="l00057"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#123f5c1ca985ae5b1d91dd4317fc1d21">00057</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> OutputMeshType::CellsContainerIterator <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#123f5c1ca985ae5b1d91dd4317fc1d21">OutputCellsContainerIterator</a>; <a name="l00058"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#cd5ab9dd8a90235eb6805af0d1788de3">00058</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> OutputMeshType::PointsContainerPointer <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#cd5ab9dd8a90235eb6805af0d1788de3">OutputPointsContainerPointer</a>; <a name="l00059"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#5e239c195ac744326b8cc3478f61effd">00059</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> OutputMeshType::PointsContainerIterator <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#5e239c195ac744326b8cc3478f61effd">OutputPointsContainerIterator</a>; <a name="l00060"></a>00060 <a name="l00061"></a>00061 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#0756ee8e09872aef720a06cc5223d78f">itkStaticConstMacro</a>( OutputPointDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, OutputMeshType::PointDimension ); <a name="l00062"></a>00062 <a name="l00063"></a>00063 <a name="l00064"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#d84155d54341a148fa92d2c16949488b">00064</a> <span class="keyword">typedef</span> TCriterion <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#d84155d54341a148fa92d2c16949488b">CriterionType</a>; <a name="l00065"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#c205edb08594fec0e2b78a851b9e6d49">00065</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> CriterionType::MeasureType <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#c205edb08594fec0e2b78a851b9e6d49">MeasureType</a>; <a name="l00066"></a>00066 <a name="l00067"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#2398b123d3fbb4568ce9916e818905b3">00067</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1QuadEdgeMeshEdgeMergeDecimationFilter.html#c63ec796aeeb387ceed46aef57537caf">Superclass::PriorityType</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#2398b123d3fbb4568ce9916e818905b3">PriorityType</a>; <a name="l00068"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#706009e3a6528e4257f7ad581920ea48">00068</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1QuadEdgeMeshEdgeMergeDecimationFilter.html#1692e66679b8706c3c8709c79eabab1e">Superclass::PriorityQueueItemType</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#706009e3a6528e4257f7ad581920ea48">PriorityQueueItemType</a>; <a name="l00069"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#f7c9544dda91c3edc96d700db2a4ce21">00069</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1QuadEdgeMeshEdgeMergeDecimationFilter.html#38c40f72eb9ebba4be6f96e541ad1ccb">Superclass::PriorityQueueType</a> <a class="code" href="classitk_1_1PriorityQueueContainer.html">PriorityQueueType</a>; <a name="l00070"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#f2239b34e0e83a96b6babf0a7f951113">00070</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1QuadEdgeMeshEdgeMergeDecimationFilter.html#f9620397ce17806387dc9f8cdc8fe47b">Superclass::PriorityQueuePointer</a> <a class="code" href="classitk_1_1SmartPointer.html">PriorityQueuePointer</a>; <a name="l00071"></a>00071 <a name="l00072"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#93e20f6fc7f36e776b55c673bd81423f">00072</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1QuadEdgeMeshEdgeMergeDecimationFilter.html#a750ede6f4e8599420cb667d5a8b8071">Superclass::QueueMapType</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#93e20f6fc7f36e776b55c673bd81423f">QueueMapType</a>; <a name="l00073"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#670966135ca3fdb85fa25cd3032362ca">00073</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1QuadEdgeMeshEdgeMergeDecimationFilter.html#3a03d93165c09d535088f09b15799801">Superclass::QueueMapIterator</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#670966135ca3fdb85fa25cd3032362ca">QueueMapIterator</a>; <a name="l00074"></a>00074 <a name="l00075"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#cfd810609ff4238def2d61c6a8c32680">00075</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1QuadEdgeMeshEdgeMergeDecimationFilter.html#47bf5fda66a66352e3587aaadbc12853">Superclass::OperatorType</a> <a class="code" href="classitk_1_1QuadEdgeMeshEulerOperatorJoinVertexFunction.html">OperatorType</a>; <a name="l00076"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#ae28913013a51b50785de04804b4afc5">00076</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1QuadEdgeMeshEdgeMergeDecimationFilter.html#312457ed7794c8db50c506d78a8ead22">Superclass::OperatorPointer</a> <a class="code" href="classitk_1_1SmartPointer.html">OperatorPointer</a>; <a name="l00077"></a>00077 <a name="l00078"></a>00078 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1QuadEdgeMeshDecimationQuadricElementHelper.html" title="TODO explicit specification for VDimension=3!!!">QuadEdgeMeshDecimationQuadricElementHelper< OutputPointType ></a> <a name="l00079"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#3196c767f6532d5ae0c58ba1292bb2fe">00079</a> <a class="code" href="classitk_1_1QuadEdgeMeshDecimationQuadricElementHelper.html" title="TODO explicit specification for VDimension=3!!!">QuadricElementType</a>; <a name="l00080"></a>00080 <a name="l00081"></a>00081 <span class="keyword">typedef</span> std::map< OutputPointIdentifier, QuadricElementType > <a name="l00082"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#7acabf3cedd24d0855cb2496ee414a1c">00082</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#7acabf3cedd24d0855cb2496ee414a1c">QuadricElementMapType</a>; <a name="l00083"></a>00083 <a name="l00084"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#02b620c7e814b6bc7806c472f4ec9717">00084</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> QuadricElementMapType::iterator <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#02b620c7e814b6bc7806c472f4ec9717">QuadricElementMapIterator</a>; <a name="l00085"></a>00085 <a name="l00086"></a>00086 <span class="keyword">protected</span>: <a name="l00087"></a>00087 <a name="l00088"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#a1c54584e312f4b7826a661c339c5e77">00088</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#a1c54584e312f4b7826a661c339c5e77">QuadEdgeMeshQuadricDecimation</a>() {} <a name="l00089"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#98b0fd727d908d7363148186e42a075c">00089</a> <span class="keyword">virtual</span> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#98b0fd727d908d7363148186e42a075c">~QuadEdgeMeshQuadricDecimation</a>() {} <a name="l00090"></a>00090 <a name="l00091"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#b22d0a090eb39e81a867497c65971dce">00091</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#7acabf3cedd24d0855cb2496ee414a1c">QuadricElementMapType</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#b22d0a090eb39e81a867497c65971dce">m_Quadric</a>; <a name="l00092"></a>00092 <a name="l00093"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#e6ebba177e3da0551f75981aeb57cc4b">00093</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#e6ebba177e3da0551f75981aeb57cc4b">Initialize</a>() <a name="l00094"></a>00094 { <a name="l00095"></a>00095 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#0b6438608cbdc1b99668ff0545f8820f">OutputMeshPointer</a> output = this-><a class="code" href="classitk_1_1MeshSource.html#591e055a2e79ba11022b7cbc6e117bd4">GetOutput</a>(); <a name="l00096"></a>00096 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#cd5ab9dd8a90235eb6805af0d1788de3">OutputPointsContainerPointer</a> points = output->GetPoints(); <a name="l00097"></a>00097 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#5e239c195ac744326b8cc3478f61effd">OutputPointsContainerIterator</a> it = points->Begin(); <a name="l00098"></a>00098 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#9762adcaa893bf7eebbb41ca5fa32717">OutputPointIdentifier</a> p_id; <a name="l00099"></a>00099 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#630594c8c0f4d8424748ce2e5807138e">OutputQEType</a> * qe; <a name="l00100"></a>00100 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#630594c8c0f4d8424748ce2e5807138e">OutputQEType</a> * qe_it; <a name="l00101"></a>00101 <a name="l00102"></a>00102 <span class="keywordflow">while</span>( it != points->End() ) <a name="l00103"></a>00103 { <a name="l00104"></a>00104 p_id = it->Index(); <a name="l00105"></a>00105 <a name="l00106"></a>00106 qe = output->FindEdge( p_id ); <a name="l00107"></a>00107 <span class="keywordflow">if</span>( qe != 0 ) <a name="l00108"></a>00108 { <a name="l00109"></a>00109 qe_it = qe; <a name="l00110"></a>00110 <span class="keywordflow">do</span> <a name="l00111"></a>00111 { <a name="l00112"></a>00112 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#7ad23b40c6e0294b96cd144bcb39d573">QuadricAtOrigin</a>( qe_it, <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#b22d0a090eb39e81a867497c65971dce">m_Quadric</a>[p_id] ); <a name="l00113"></a>00113 qe_it = qe_it->GetOnext(); <a name="l00114"></a>00114 } <span class="keywordflow">while</span>( qe_it != qe ); <a name="l00115"></a>00115 } <a name="l00116"></a>00116 it++; <a name="l00117"></a>00117 } <a name="l00118"></a>00118 } <a name="l00119"></a>00119 <a name="l00120"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#7ad23b40c6e0294b96cd144bcb39d573">00120</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#7ad23b40c6e0294b96cd144bcb39d573">QuadricAtOrigin</a>( <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#630594c8c0f4d8424748ce2e5807138e">OutputQEType</a>* iEdge, <a class="code" href="classitk_1_1QuadEdgeMeshDecimationQuadricElementHelper.html" title="TODO explicit specification for VDimension=3!!!">QuadricElementType</a>& oQ ) <a name="l00121"></a>00121 { <a name="l00122"></a>00122 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#0b6438608cbdc1b99668ff0545f8820f">OutputMeshPointer</a> output = this-><a class="code" href="classitk_1_1MeshSource.html#591e055a2e79ba11022b7cbc6e117bd4">GetOutput</a>(); <a name="l00123"></a>00123 <a name="l00124"></a>00124 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#9762adcaa893bf7eebbb41ca5fa32717">OutputPointIdentifier</a> <span class="keywordtype">id</span>[3]; <a name="l00125"></a>00125 <span class="keywordtype">id</span>[0] = iEdge->GetOrigin(); <a name="l00126"></a>00126 <span class="keywordtype">id</span>[1] = iEdge->GetDestination(); <a name="l00127"></a>00127 <span class="keywordtype">id</span>[2] = iEdge->GetOnext()->GetDestination(); <a name="l00128"></a>00128 <a name="l00129"></a>00129 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#422b57329fdcd2f73af0c08edf47c2bc">OutputPointType</a> p[3]; <a name="l00130"></a>00130 <a name="l00131"></a>00131 <span class="keywordflow">for</span>( <span class="keywordtype">int</span> i = 0; i < 3; i++ ) <a name="l00132"></a>00132 { <a name="l00133"></a>00133 p[i] = output->GetPoint( <span class="keywordtype">id</span>[i] ); <a name="l00134"></a>00134 } <a name="l00135"></a>00135 <a name="l00136"></a>00136 oQ.<a class="code" href="classitk_1_1QuadEdgeMeshDecimationQuadricElementHelper.html#ee957524445835a271c2a43b600526a8">AddTriangle</a>( p[0], p[1], p[2] ); <a name="l00137"></a>00137 } <a name="l00138"></a>00138 <a name="l00144"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#63639a44b8ed590c7b4726a944a14bca">00144</a> <span class="keyword">inline</span> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#c205edb08594fec0e2b78a851b9e6d49">MeasureType</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#63639a44b8ed590c7b4726a944a14bca" title="Compute the measure value for iEdge.">MeasureEdge</a>( <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#630594c8c0f4d8424748ce2e5807138e">OutputQEType</a>* iEdge ) <a name="l00145"></a>00145 { <a name="l00146"></a>00146 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#9762adcaa893bf7eebbb41ca5fa32717">OutputPointIdentifier</a> id_org = iEdge->GetOrigin(); <a name="l00147"></a>00147 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#9762adcaa893bf7eebbb41ca5fa32717">OutputPointIdentifier</a> id_dest = iEdge->GetDestination(); <a name="l00148"></a>00148 <a class="code" href="classitk_1_1QuadEdgeMeshDecimationQuadricElementHelper.html" title="TODO explicit specification for VDimension=3!!!">QuadricElementType</a> Q = <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#b22d0a090eb39e81a867497c65971dce">m_Quadric</a>[ id_org ] + <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#b22d0a090eb39e81a867497c65971dce">m_Quadric</a>[ id_dest ]; <a name="l00149"></a>00149 <span class="keywordflow">return</span> <span class="keyword">static_cast<</span> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#c205edb08594fec0e2b78a851b9e6d49">MeasureType</a> <span class="keyword">></span>( Q.<a class="code" href="classitk_1_1QuadEdgeMeshDecimationQuadricElementHelper.html#bdf770fe26ee862307d79b6a78b92d44" title="TODO this method should be really optimized!!!">ComputeErrorAtOptimalLocation</a>() ); <a name="l00150"></a>00150 } <a name="l00152"></a>00152 <a name="l00153"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#c9d801f8ad1bd411e1fe6b54da755e4c">00153</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#c9d801f8ad1bd411e1fe6b54da755e4c">DeletePoint</a>( <span class="keyword">const</span> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#9762adcaa893bf7eebbb41ca5fa32717">OutputPointIdentifier</a>& iIdToBeDeleted, <a name="l00154"></a>00154 <span class="keyword">const</span> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#9762adcaa893bf7eebbb41ca5fa32717">OutputPointIdentifier</a>& iRemaining ) <a name="l00155"></a>00155 { <a name="l00156"></a>00156 <a class="code" href="classitk_1_1QuadEdgeMeshEdgeMergeDecimationFilter.html#4dbda2a5b3db9849dcc322ae18245c7b">Superclass::DeletePoint</a>( iIdToBeDeleted, iRemaining ); <a name="l00157"></a>00157 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#b22d0a090eb39e81a867497c65971dce">m_Quadric</a>[iRemaining] += <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#b22d0a090eb39e81a867497c65971dce">m_Quadric</a>[iIdToBeDeleted]; <a name="l00158"></a>00158 } <a name="l00159"></a>00159 <a name="l00165"></a><a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#5611f12682a8da3038a89495d8e65b17">00165</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#422b57329fdcd2f73af0c08edf47c2bc">OutputPointType</a> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#5611f12682a8da3038a89495d8e65b17">Relocate</a>( <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#630594c8c0f4d8424748ce2e5807138e">OutputQEType</a>* iEdge ) <a name="l00166"></a>00166 { <a name="l00167"></a>00167 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#9762adcaa893bf7eebbb41ca5fa32717">OutputPointIdentifier</a> id_org = iEdge->GetOrigin(); <a name="l00168"></a>00168 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#9762adcaa893bf7eebbb41ca5fa32717">OutputPointIdentifier</a> id_dest = iEdge->GetDestination(); <a name="l00169"></a>00169 <a class="code" href="classitk_1_1QuadEdgeMeshDecimationQuadricElementHelper.html" title="TODO explicit specification for VDimension=3!!!">QuadricElementType</a> Q = <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#b22d0a090eb39e81a867497c65971dce">m_Quadric</a>[ id_org ] + <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#b22d0a090eb39e81a867497c65971dce">m_Quadric</a>[ id_dest ]; <a name="l00170"></a>00170 <span class="keywordflow">return</span> Q.<a class="code" href="classitk_1_1QuadEdgeMeshDecimationQuadricElementHelper.html#9b09b4adfd482a61c0d01da0bb197302">ComputeOptimalLocation</a>(); <a name="l00171"></a>00171 } <a name="l00173"></a>00173 <a name="l00174"></a>00174 <span class="keyword">private</span>: <a name="l00175"></a>00175 <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#a1c54584e312f4b7826a661c339c5e77">QuadEdgeMeshQuadricDecimation</a>( <span class="keyword">const</span> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#d3b75888f5099312fd0104565de19faa">Self</a>& ); <a name="l00176"></a>00176 <span class="keywordtype">void</span> operator = ( <span class="keyword">const</span> <a class="code" href="classitk_1_1QuadEdgeMeshQuadricDecimation.html#d3b75888f5099312fd0104565de19faa">Self</a>& ); <a name="l00177"></a>00177 }; <a name="l00178"></a>00178 <a name="l00179"></a>00179 } <a name="l00180"></a>00180 <span class="preprocessor">#endif</span> <a name="l00181"></a>00181 <span class="preprocessor"></span> </pre></div></div> <hr><address><small> Generated at Thu May 7 23:58:13 2009 for ITK by <a href="http://www.stack.nl/~dimitri/doxygen/index.html"> <img src="http://www.stack.nl/~dimitri/doxygen/doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53> </a> 1.5.9 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, © 1997-2000</small></address> </body> </html>