18 #ifndef itkQuadricDecimationQuadEdgeMeshFilter_h 19 #define itkQuadricDecimationQuadEdgeMeshFilter_h 31 template<
typename TInput,
typename TOutput,
typename TCriterion >
81 typedef std::map< OutputPointIdentifier, QuadricElementType >
100 OutputPointIdentifier
id[3];
102 id[0] = iEdge->GetOrigin();
103 id[1] = iEdge->GetDestination();
104 id[2] = iEdge->GetOnext()->GetDestination();
106 OutputPointType p[3];
108 for (
int i = 0; i < 3; i++ )
110 p[i] = outputMesh->GetPoint(
id[i]);
122 OutputPointIdentifier id_org = iEdge->GetOrigin();
123 OutputPointIdentifier id_dest = iEdge->GetDestination();
126 OutputPointType org = this->
m_OutputMesh->GetPoint(id_org);
127 OutputPointType dest = this->
m_OutputMesh->GetPoint(id_dest);
131 mid.SetToMidPoint(org, dest);
141 virtual void DeletePoint(
const OutputPointIdentifier & iIdToBeDeleted,
142 const OutputPointIdentifier & iRemaining) ITK_OVERRIDE;
148 OutputPointType
Relocate(OutputQEType *iEdge) ITK_OVERRIDE;
155 void operator=(
const Self &) ITK_DELETE_FUNCTION;
160 #ifndef ITK_MANUAL_INSTANTIATION 161 #include "itkQuadricDecimationQuadEdgeMeshFilter.hxx" Superclass::QueueMapType QueueMapType
OperatorType::Pointer OperatorPointer
TODO explicit specification for VDimension=3!!!
Superclass::OperatorType OperatorType
QuadEdgeMeshEulerOperatorJoinVertexFunction< OutputMeshType, OutputQEType > OperatorType
void QuadricAtOrigin(OutputQEType *iEdge, QuadricElementType &oQ, OutputMeshType *outputMesh)
Compute the quadric error at the origin of the edge.
OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
static const unsigned int OutputPointDimension
virtual void Initialize() override
Compute Quadric error for all edges.
Superclass::PriorityQueuePointer PriorityQueuePointer
OutputMeshType::EdgeCellType OutputEdgeCellType
CriterionType::MeasureType MeasureType
void operator=(const Self &) ITK_DELETE_FUNCTION
std::map< OutputPointIdentifier, QuadricElementType > QuadricElementMapType
OutputMeshType::PointType OutputPointType
virtual void DeletePoint(const OutputPointIdentifier &iIdToBeDeleted, const OutputPointIdentifier &iRemaining) override
Delete point.
OutputMeshType::PointIdentifier OutputPointIdentifier
QuadricElementMapType m_Quadric
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
virtual ~QuadricDecimationQuadEdgeMeshFilter()
Destructor.
PriorityQueueType::Pointer PriorityQueuePointer
SmartPointer< Self > Pointer
QuadricDecimationQuadEdgeMeshFilter()
Constructor.
OutputPointType Relocate(OutputQEType *iEdge) override
Compute the optimal position for a given edge iEdge.
OutputPointType::CoordRepType OutputCoordType
OutputMeshType * m_OutputMesh
OutputMeshType::Pointer OutputMeshPointer
OutputMeshType::PointsContainerPointer OutputPointsContainerPointer
OutputMeshType::QEType OutputQEType
PointType ComputeOptimalLocation(const PointType &iP)
std::map< OutputQEType *, PriorityQueueItemType * > QueueMapType
CoordType ComputeError(const PointType &iP) const
TODO this method should be really optimized!!!
Superclass::PriorityType PriorityType
OutputMeshType::CellsContainerIterator OutputCellsContainerIterator
Superclass::PriorityQueueType PriorityQueueType
QuadricElementMapType::iterator QuadricElementMapIterator
EdgeDecimationQuadEdgeMeshFilter< TInput, TOutput, TCriterion > Superclass
QueueMapType::iterator QueueMapIterator
Superclass::OperatorPointer OperatorPointer
Superclass::PriorityQueueItemType PriorityQueueItemType
CriterionType::PriorityQueueWrapperType PriorityQueueItemType
MeasureType MeasureEdge(OutputQEType *iEdge) override
Compute the measure value for iEdge.
PriorityQueueContainer< PriorityQueueItemType *, ElementWrapperPointerInterface< PriorityQueueItemType * >, PriorityType > PriorityQueueType
SmartPointer< const Self > ConstPointer
QuadEdgeMeshDecimationQuadricElementHelper< OutputPointType > QuadricElementType
void AddTriangle(const PointType &iP1, const PointType &iP2, const PointType &iP3, const CoordType &iWeight=static_cast< CoordType >(1.))
QuadricDecimationQuadEdgeMeshFilter Self
CriterionType::PriorityType PriorityType
Superclass::QueueMapIterator QueueMapIterator
InputMeshType::Pointer InputMeshPointer