Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkTriangleHelper.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTriangleHelper.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-03-25 21:20:16 $
00007   Version:   $Revision: 1.8 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkTriangleHelper_h
00018 #define __itkTriangleHelper_h
00019 
00020 #include "itkCrossHelper.h"
00021 
00022 namespace itk
00023 {
00028 template< typename TPoint >
00029 class TriangleHelper
00030 {
00031 public:
00032   typedef TriangleHelper                          Self;
00033   typedef TPoint                                  PointType;
00034   typedef typename PointType::CoordRepType        CoordRepType;
00035   typedef typename PointType::VectorType          VectorType;
00036   typedef CrossHelper< VectorType >               CrossVectorType;
00037 
00038   itkStaticConstMacro( PointDimension, unsigned int, PointType::PointDimension );
00039 
00041   static bool IsObtuse( const PointType& iA, const PointType& iB, const PointType& iC );
00042 
00044   static VectorType ComputeNormal ( const PointType& iA,
00045     const PointType& iB,
00046     const PointType& iC );
00047 
00049   static CoordRepType Cotangent ( const PointType& iA,
00050                                   const PointType& iB,
00051                                   const PointType& iC );
00052 
00054   static PointType ComputeBarycenter (
00055       const CoordRepType& iA1, const PointType& iP1,
00056       const CoordRepType& iA2, const PointType& iP2,
00057       const CoordRepType& iA3, const PointType& iP3 );
00058 
00060   static CoordRepType ComputeAngle( const PointType& iP1, const PointType& iP2,
00061       const PointType& iP3 );
00062 
00064   static PointType ComputeGravityCenter (
00065       const PointType& iP1,
00066       const PointType& iP2,
00067       const PointType& iP3 );
00068 
00070   static PointType ComputeCircumCenter (
00071       const PointType& iP1,
00072       const PointType& iP2,
00073       const PointType& iP3 );
00074 
00076   static PointType ComputeConstrainedCircumCenter ( const PointType& iP1,
00077       const PointType& iP2, const PointType& iP3 );
00078 
00080   static CoordRepType ComputeArea ( const PointType& iP1, const PointType& iP2, const PointType& iP3 );
00081 
00082 protected:
00083   TriangleHelper( );
00084   virtual ~TriangleHelper( );
00085 
00086   void PrintSelf ( std::ostream& os, Indent indent ) const;
00087 
00088 
00089 private:
00090   TriangleHelper( const Self& ); // purposely not implemented
00091   void operator = ( const Self& ); // purposely not implemented
00092 };
00093 }
00094 
00095 #include "itkTriangleHelper.txx"
00096 #endif
00097 

Generated at Tue Sep 15 05:10:37 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000