/usr/include/InsightToolkit/Review/itkQuadEdgeMeshParam.h is in libinsighttoolkit3-dev 3.20.1+git20120521-6build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | /*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: itkQuadEdgeMeshParam.h
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __itkQuadEdgeMeshParam_h
#define __itkQuadEdgeMeshParam_h
#include "itkQuadEdgeMeshToQuadEdgeMeshFilter.h"
#include "itkQuadEdgeMeshBorderTransform.h"
#include "itkQuadEdgeMeshParamMatrixCoefficients.h"
namespace itk
{
/**
* \class QuadEdgeMeshParam
*
* \brief Compute a planar parameterization of the input mesh.
* \note Here we have only implemented some parameterizations with fixed
* boundary.
*/
template< class TInputMesh, class TOutputMesh, class TSolverTraits >
class QuadEdgeMeshParam :
public QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
{
public:
/** Basic types. */
typedef QuadEdgeMeshParam Self;
typedef QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh,
TOutputMesh > Superclass;
typedef SmartPointer< Self > Pointer;
typedef SmartPointer< const Self > ConstPointer;
/** Input types. */
typedef TInputMesh InputMeshType;
typedef typename InputMeshType::Pointer InputMeshPointer;
typedef typename InputMeshType::ConstPointer InputMeshConstPointer;
typedef typename InputMeshType::CoordRepType InputCoordRepType;
typedef typename InputMeshType::PointType InputPointType;
typedef typename InputPointType::VectorType InputPointVectorType;
typedef typename InputMeshType::PointIdentifier InputPointIdentifier;
typedef typename InputMeshType::QEType InputQEType;
typedef typename InputMeshType::VectorType InputVectorType;
typedef typename InputMeshType::EdgeListType InputEdgeListType;
typedef typename InputMeshType::PixelType InputPixelType;
typedef typename InputMeshType::Traits InputTraits;
itkStaticConstMacro( InputVDimension, unsigned int,
InputMeshType::PointDimension );
typedef typename InputMeshType::PointsContainer InputPointsContainer;
typedef typename InputMeshType::PointsContainerConstIterator
InputPointsContainerConstIterator;
typedef typename InputMeshType::CellsContainerConstIterator
InputCellsContainerConstIterator;
typedef typename InputMeshType::EdgeCellType InputEdgeCellType;
typedef typename InputMeshType::PolygonCellType InputPolygonCellType;
typedef typename InputMeshType::PointIdList InputPointIdList;
typedef typename InputQEType::IteratorGeom InputQEIterator;
typedef std::map< InputPointIdentifier, InputPointIdentifier >
InputMapPointIdentifier;
typedef typename InputMapPointIdentifier::iterator
InputMapPoinIdentifierIterator;
/** Output types. */
typedef TOutputMesh OutputMeshType;
typedef typename OutputMeshType::Pointer OutputMeshPointer;
typedef typename OutputMeshType::ConstPointer OutputMeshConstPointer;
typedef typename OutputMeshType::CoordRepType OutputCoordRepType;
typedef typename OutputMeshType::PointType OutputPointType;
typedef typename OutputMeshType::PointIdentifier OutputPointIdentifier;
typedef typename OutputMeshType::QEType OutputQEType;
typedef typename OutputMeshType::VectorType OutputVectorType;
typedef typename OutputQEType::IteratorGeom OutputQEIterator;
typedef typename OutputMeshType::PointsContainerIterator
OutputPointsContainerIterator;
itkStaticConstMacro( OutputVDimension, unsigned int,
OutputMeshType::PointDimension );
typedef TSolverTraits SolverTraits;
typedef typename SolverTraits::ValueType ValueType;
typedef typename SolverTraits::MatrixType MatrixType;
typedef typename SolverTraits::VectorType VectorType;
typedef QuadEdgeMeshBorderTransform<
InputMeshType, InputMeshType > MeshBorderTransform;
typedef typename MeshBorderTransform::Pointer MeshBorderTransformPointer;
typedef MatrixCoefficients< InputMeshType > CoefficientsComputation;
public:
void SetCoefficientsMethod( CoefficientsComputation* iMethod )
{
this->m_CoefficientsMethod = iMethod;
}
itkNewMacro( Self );
itkTypeMacro( MeshParam, QuadEdgeMeshToQuadEdgeMeshFilter );
itkSetObjectMacro( BorderTransform, MeshBorderTransform );
itkGetObjectMacro( BorderTransform, MeshBorderTransform );
protected:
QuadEdgeMeshParam( );
virtual ~QuadEdgeMeshParam( ) {};
CoefficientsComputation * m_CoefficientsMethod;
MeshBorderTransformPointer m_BorderTransform;
// first is the id of the input mesh and second is the corresponding id
// in m_BoundaryPtMap
InputMapPointIdentifier m_BoundaryPtMap;
// first is the id of the input mesh and second is the corresponding id
// in m_InternalPtList
InputMapPointIdentifier m_InternalPtMap;
std::vector< OutputPointType > m_Border;
void CopyToOutputBorder( );
/**
* \brief From the list of all vertices from the input mesh InputList
* and the list of boundary vertices BoundaryList, Store in
* m_InternalPtList the list of interior vertices (i.e. vertices in
* InputList and not in BoundaryList )
*
* \note I consider ids of points are well chosen (from 0 to
* NumberOfPoints)
*/
void ComputeListOfInteriorVertices( );
/**
* \brief Fill matrix iM and vectors Bx and m_By depending on if one
* vertex is on the border or not.
* \param[in] iM
* \param[in,out] ioBx
* \param[in,out] ioBy
*/
void FillMatrix( MatrixType& iM, VectorType& ioBx, VectorType& ioBy );
/**
* \brief Solve linears systems : \f$ iM \cdot oX = iBx \f$ and
* \f$ iM \cdot oY = iBy \f$
*
* \param[in] iM
* \param[in] iBx
* \param[in] iBy
* \param[out] oX
* \param[out] oY
*/
void SolveLinearSystems( const MatrixType& iM,
const VectorType& iBx,
const VectorType& iBy,
VectorType& oX,
VectorType& oY );
void GenerateData( );
private:
QuadEdgeMeshParam( const Self& ); // purposely not implemented
void operator=( const Self& ); // purposely not implemented
};
} // end namespace itk
#include "itkQuadEdgeMeshParam.txx"
#endif
|